Motorola M6800 (6800) Exorciser / SWTPC emulator plus 6801 instruction set emulation
Revision | 92ef8a291a6240887b19ec9117ea774aba59ea9a (tree) |
---|---|
Time | 2022-09-03 00:57:21 |
Author | Joel Matthew Rees <joel.rees@gmai...> |
Commiter | Joel Matthew Rees |
Fixing the embarrassing CPX bug -- C flag, etc.
@@ -2482,7 +2482,13 @@ QUIT3 FDB BRAN | ||
2482 | 2482 | FCC 4,ABORT |
2483 | 2483 | FCB $D4 |
2484 | 2484 | FDB QUIT-7 |
2485 | -ABORT FDB DOCOL,SPSTOR,DEC,QSTACK,DRZERO,CR,PDOTQ | |
2485 | +ABORT FDB DOCOL,SPSTOR,DEC,QSTACK,DRZERO,CR | |
2486 | +* FDB CLITER | |
2487 | +* FCB $F1 ; reset | |
2488 | +* FDB EMIT,CLITER | |
2489 | +* FCB $D2 ; scroll mode | |
2490 | +* FDB EMIT | |
2491 | + FDB PDOTQ | |
2486 | 2492 | FCB 8 |
2487 | 2493 | FCC "Forth-68" |
2488 | 2494 | FDB FORTH,DEFIN |
@@ -326,7 +326,7 @@ void show_trace(int insn_no, struct trace_entry *t) | ||
326 | 326 | sprintf(buf3, "EA=%4.4X%s D=%4.4X", t->ea, buf_ea, t->data); |
327 | 327 | insn = (cputype == 0x6800) ? "???SUBD" : "SUBD"; |
328 | 328 | break; |
329 | - } case 0x8C: case 0x9C: case 0xAC: case 0xBC: /* CPX N,Z,V */ { | |
329 | + } case 0x8C: case 0x9C: case 0xAC: case 0xBC: /* CPX N,Z,V (, C -- 6801) */ { | |
330 | 330 | if (t->cc & 0x80) |
331 | 331 | sprintf(buf3, "EA=%4.4X%s D=%4.4X", t->ea, buf_ea, t->data); |
332 | 332 | insn = "CPX"; |
@@ -1016,7 +1016,8 @@ void sim(void) | ||
1016 | 1016 | v_flag = V(ix >> 8, w >> 8, f); |
1017 | 1017 | } else { /* assume 0x6801 compatible for now. */ |
1018 | 1018 | n_flag = N_16(fw); |
1019 | - v_flag = V_16(ix, w, fw); | |
1019 | + v_flag = V_16_SUB(ix, w, fw); | |
1020 | + c_flag = C_16_SUB(ix, w, fw); | |
1020 | 1021 | } |
1021 | 1022 | break; |
1022 | 1023 | } case 0x8D: /* BSR REL */ { |