From d8d169566094c70417c646275b51918458f98dbf Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Wed, 27 Nov 2019 09:42:08 +0200 Subject: fix: SP not initialized on reset close #2 --- src/interrupt.spec.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/interrupt.spec.ts') diff --git a/src/interrupt.spec.ts b/src/interrupt.spec.ts index 06979ed..cc54e3c 100644 --- a/src/interrupt.spec.ts +++ b/src/interrupt.spec.ts @@ -5,6 +5,7 @@ describe('avrInterrupt', () => { it('should execute interrupt handler', () => { const cpu = new CPU(new Uint16Array(0x8000)); cpu.pc = 0x520; + cpu.data[94] = 0; cpu.data[93] = 0x80; // SP <- 0x80 cpu.data[95] = 0b10000001; // SREG <- I------C avrInterrupt(cpu, 5); -- cgit v1.2.3