diff options
Diffstat (limited to 'src/peripherals/eeprom.spec.ts')
| -rw-r--r-- | src/peripherals/eeprom.spec.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/peripherals/eeprom.spec.ts b/src/peripherals/eeprom.spec.ts index 75cd5ea..487ce41 100644 --- a/src/peripherals/eeprom.spec.ts +++ b/src/peripherals/eeprom.spec.ts @@ -63,7 +63,7 @@ describe('EEPROM', () => { it('should not erase the memory when writing if EEPM1 is high', () => { // We subtract 0x20 to translate from RAM address space to I/O register space - const { program } = asmProgram(` + const { program, instructionCount } = asmProgram(` ; register addresses _REPLACE TWSR, ${EECR - 0x20} _REPLACE EEARL, ${EEARL - 0x20} @@ -85,7 +85,7 @@ describe('EEPROM', () => { eepromBackend.memory[9] = 0x0f; // high four bits are cleared const runner = new TestProgramRunner(cpu, eeprom); - runner.runInstructions(program.length); + runner.runInstructions(instructionCount); // EEPROM was 0x0f, and our program wrote 0x55. // Since write (without erase) only clears bits, we expect 0x05 now. @@ -197,7 +197,7 @@ describe('EEPROM', () => { describe('EEPROM erase', () => { it('should only erase the memory when EEPM0 is high', () => { // We subtract 0x20 to translate from RAM address space to I/O register space - const { program } = asmProgram(` + const { program, instructionCount } = asmProgram(` ; register addresses _REPLACE TWSR, ${EECR - 0x20} _REPLACE EEARL, ${EEARL - 0x20} @@ -219,7 +219,7 @@ describe('EEPROM', () => { eepromBackend.memory[9] = 0x22; const runner = new TestProgramRunner(cpu, eeprom); - runner.runInstructions(program.length); + runner.runInstructions(instructionCount); expect(eepromBackend.memory[9]).toEqual(0xff); }); |
