cpu - Change debug printout formatting
This commit is contained in:
parent
d0b620f1ad
commit
41632b0a0f
5
cpu.js
5
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" }`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue