From 41632b0a0f3907ee35026fef848f67122374432d Mon Sep 17 00:00:00 2001 From: n loewen Date: Sat, 26 Aug 2023 13:25:09 +0100 Subject: [PATCH] cpu - Change debug printout formatting --- cpu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpu.js b/cpu.js index 31e458b..9f083c4 100644 --- a/cpu.js +++ b/cpu.js @@ -415,8 +415,9 @@ function logCPUState(debugInfo, debug = false, prettyPrintDisplay = false) { } console.log(); console.log(`Line ${debugInfo[CPU.previousIP].lineNumber}: ${debugInfo[CPU.previousIP].source}`); - console.log(' Mnemonic:', CPU.currentInstruction.mnemonic); - console.log(` Machine: $${num2hex(CPU.currentInstruction.opcode)} $${num2hex(CPU.currentInstruction.operand)}`); + console.log(); + console.log('Mnemonic:', CPU.currentInstruction.mnemonic); + console.log(`Machine: $${num2hex(CPU.currentInstruction.opcode)} $${num2hex(CPU.currentInstruction.operand)}`); console.log(); console.log(`IP: $${num2hex(CPU.IP)} Acc: $${num2hex(CPU.Acc)} ONZC: ${num2bin_4bit(CPU.FLAGS)}`); console.log(`KEY: $${num2hex(CPU.memory[KEYPAD_ADDR])}  ${CPU.running ? "running" : "halted" }`);