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;
}
}