diff --git a/chip-z80/support.js b/chip-z80/support.js index 2d6232c..8f44d6b 100644 --- a/chip-z80/support.js +++ b/chip-z80/support.js @@ -47,9 +47,9 @@ function halfStep(){ eval(clockTriggers[cycle]); if (clk) {setLow('clk'); } else {setHigh('clk'); } - // DMB: It's almost certainly wrong to execute the on both clock edges + // DMB: It's almost certainly wrong to execute these on both clock edges handleBusRead(); - handleBusWrite; + handleBusWrite(); } function goUntilSyncOrWrite(){ diff --git a/chip-z80/testprogram.js b/chip-z80/testprogram.js index 85814c2..5c85bdd 100644 --- a/chip-z80/testprogram.js +++ b/chip-z80/testprogram.js @@ -16,6 +16,11 @@ readTriggers[0x8000]="var c=consolegetc; consolegetc=undefined; (c)"; testprogram = [ 0xD9, // EXX + 0x21, 0x00, 0x01, // LD HL,$0100 + 0x36, 0xCC, // LD (HL),$CC + 0x00, // NOP + 0x7E, // LD A, (HL) + 0x00, // NOP 0x21, 0x34, 0x12, // LD HL,$1234 0x31, 0xfe, 0xdc, // LD SP,0xDCFE 0xe5, // PUSH HL