~rabbits/gyo

247ff765cf32247a84863597b362ea3aa9fb6499 — neauoire 1 year, 26 days ago f7584eb
Ordered cases by BCB value
3 files changed, 3 insertions(+), 3 deletions(-)

M src/gyo.c
M src/gyoasm.c
M src/gyoemu.c
M src/gyo.c => src/gyo.c +1 -1
@@ 26,8 26,8 @@ gyo_eval(uc15 *rom, uc3 *ram, uc15 pc)
		case BCZ:
			/* JSR,JCN,JMP */
			switch((inst >> 2) & 0x3) {
			case BCZ: rst[++rsp] = pc, pc = inst >> 0x4; break;
			case BCP: pc = dst[dsp--] & 0x2 ? (inst >> 0x4) : pc; break;
			case BCZ: rst[++rsp] = pc, pc = inst >> 0x4; break;
			case BCN: pc = inst >> 0x4; break;
			}
			break;

M src/gyoasm.c => src/gyoasm.c +1 -1
@@ 87,8 87,8 @@ asmtoken(char *token)
	/* jump */
	switch(token[0]) {
	case '#': /* LIT */ return (hepuc15(token) << 2) | BCP;
	case '>': /* JMP */ return (l = findlabel(token + 1)) ? (intuc15(l->addr) << 4) | (BCN << 2) | BCZ : error("Missing label", token);
	case '?': /* JCN */ return (l = findlabel(token + 1)) ? (intuc15(l->addr) << 4) | (BCP << 2) | BCZ : error("Missing label", token);
	case '>': /* JMP */ return (l = findlabel(token + 1)) ? (intuc15(l->addr) << 4) | (BCN << 2) | BCZ : error("Missing label", token);
	}
	/* opcode */
	opc = hepuc15("00MIL") | BCN; // 00 00 00 00 00 00 01 01 01 01 00 00 01 01 00

M src/gyoemu.c => src/gyoemu.c +1 -1
@@ 35,8 35,8 @@ void
disjmp(uc15 inst)
{
	switch((inst >> 2) & 0x3) {
	case BCZ: /* JCN */ putchar('?'), phep(inst >> 4, 5); return;
	case BCP: /* JMP */ putchar('>'), phep(inst >> 4, 5); return;
	case BCZ: /* JCN */ putchar('?'), phep(inst >> 4, 5); return;
	case BCN: /* JSR */ putchar(':'), phep(inst >> 4, 5); return;
	}
}