• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

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

Revision890713b8fea67eee6c3c28e4d96bd001ed5de826 (tree)
Zeit2020-11-08 21:59:44
AutorJoel Matthew Rees <joel.rees@gmai...>
CommiterJoel Matthew Rees

Log Message

partially debugged sim6800.c, fig Forth needs to start over.

Ändern Zusammenfassung

Diff

--- a/fig-forth6801_exorsim.68c
+++ b/fig-forth6801_exorsim.68c
@@ -1,5 +1,7 @@
11 * OPT PRT
22
3+ OPT 6801
4+
35 * fig-FORTH FOR 6801
46 * ASSEMBLY SOURCE LISTING
57
@@ -920,17 +922,19 @@ USLASH FDB *+2
920922 LDA A #17
921923 PSH A
922924 TSX
923- LDA A 3,X
924- LDA B 4,X
925-USL1 CMP A 1,X
925+ LDD 3,X
926+USL1 CMPD 1,X
927+yo!
928+
929+ BCC USL3
930+ CMP A 1,X
926931 BHI USL3
927932 BCS USL2
928933 CMP B 2,X
929934 BCC USL3
930935 USL2 CLC
931936 BRA USL4
932-USL3 SUB B 2,X
933- SBC A 1,X
937+USL3 SUBD 1,X
934938 SEC
935939 USL4 ROL 6,X
936940 ROL 5,X
--- a/sim6800.c
+++ b/sim6800.c
@@ -217,7 +217,11 @@ void show_trace(int insn_no, struct trace_entry *t)
217217 sprintf(buf + strlen(buf), "%2.2X ", t->insn[0]);
218218
219219 if (t->insn[0] & 0x80) {
220+#ifdef SIM6801
221+ if ( ((t->insn[0] & 0x0F) < 0x0C) && ((t->insn[0] & 0x0F) != 0x03 ) ) {
222+#else
220223 if ((t->insn[0] & 0x0F) < 0x0C) {
224+#endif /* def SIM6801 */
221225 if (t->insn[0] & 0x40) {
222226 sprintf(operand, "B");
223227 } else {
@@ -257,7 +261,12 @@ void show_trace(int insn_no, struct trace_entry *t)
257261 insn = "SBC";
258262 break;
259263 }
260-#ifndef SIM6801
264+#ifdef SIM6801
265+ case 0x03: /* ACCMD should never get here at run time. */ {
266+ insn = "";
267+ break;
268+ }
269+#else
261270 case 0x03: /* ??? */ {
262271 goto invalid;
263272 break;
@@ -850,7 +859,11 @@ void sim(void)
850859 opcode = fetch();
851860
852861 if (opcode & 0x80) {
862+#ifdef SIM6801
863+ if ( ((opcode & 0x0F) < 0x0C) && ((opcode & 0x0F) != 0x03) ) {
864+#else
853865 if ((opcode & 0x0F) < 0x0C) {
866+#endif /* def SIM6801 */
854867 /* Get operand A */
855868 if (opcode & 0x40) {
856869 a = accb;