From 51bc13fe5bbe2890ddd8a7a45b1f263134470ca0 Mon Sep 17 00:00:00 2001 From: n loewen Date: Thu, 24 Aug 2023 15:13:49 +0100 Subject: [PATCH] cpu - Change END to increment IP, to make debugging printout work when the only line in the program is an END --- cpu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cpu.js b/cpu.js index f71bb6a..3acd443 100644 --- a/cpu.js +++ b/cpu.js @@ -64,6 +64,7 @@ const Instructions = { end: () => { CPU.currentInstruction.mnemonic = 'END'; CPU.running = false; + CPU.IP = CPU.IP += 2; }, store_lit: (lit) => {