• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Motorola M6800 (6800) Exorciser / SWTPC emulator plus 6801 instruction set emulation


Commit MetaInfo

Révision92ef8a291a6240887b19ec9117ea774aba59ea9a (tree)
l'heure2022-09-03 00:57:21
AuteurJoel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Message de Log

Fixing the embarrassing CPX bug -- C flag, etc.

Change Summary

Modification

--- a/fig-forth6801_exorsim.68c
+++ b/fig-forth6801_exorsim.68c
@@ -2482,7 +2482,13 @@ QUIT3 FDB BRAN
24822482 FCC 4,ABORT
24832483 FCB $D4
24842484 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
24862492 FCB 8
24872493 FCC "Forth-68"
24882494 FDB FORTH,DEFIN
--- a/sim6800.c
+++ b/sim6800.c
@@ -326,7 +326,7 @@ void show_trace(int insn_no, struct trace_entry *t)
326326 sprintf(buf3, "EA=%4.4X%s D=%4.4X", t->ea, buf_ea, t->data);
327327 insn = (cputype == 0x6800) ? "???SUBD" : "SUBD";
328328 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) */ {
330330 if (t->cc & 0x80)
331331 sprintf(buf3, "EA=%4.4X%s D=%4.4X", t->ea, buf_ea, t->data);
332332 insn = "CPX";
@@ -1016,7 +1016,8 @@ void sim(void)
10161016 v_flag = V(ix >> 8, w >> 8, f);
10171017 } else { /* assume 0x6801 compatible for now. */
10181018 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);
10201021 }
10211022 break;
10221023 } case 0x8D: /* BSR REL */ {