cpu - Change debug printout formatting

This commit is contained in:
n loewen 2023-08-26 13:25:09 +01:00
parent d0b620f1ad
commit 41632b0a0f
1 changed files with 3 additions and 2 deletions

1
cpu.js
View File

@ -415,6 +415,7 @@ function logCPUState(debugInfo, debug = false, prettyPrintDisplay = false) {
}
console.log();
console.log(`Line ${debugInfo[CPU.previousIP].lineNumber}: ${debugInfo[CPU.previousIP].source}`);
console.log();
console.log('Mnemonic:', CPU.currentInstruction.mnemonic);
console.log(`Machine: $${num2hex(CPU.currentInstruction.opcode)} $${num2hex(CPU.currentInstruction.operand)}`);
console.log();