From eff904366530a4f4f8be5145cb10fcecd0e9cfbd Mon Sep 17 00:00:00 2001 From: n loewen Date: Tue, 29 Aug 2023 21:25:59 -0400 Subject: [PATCH] cpu - Fix: Include '$' before hex in debug-peeking for indirect ops --- src/cpu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu.js b/src/cpu.js index 9e40913..b3a210d 100644 --- a/src/cpu.js +++ b/src/cpu.js @@ -129,7 +129,7 @@ module.exports = class CPU { }, store_addr: (addr) => { - this.dbg.currentMnemonic = `STO addr; @addr: ${num2hex(this.memory[addr])}`; + this.dbg.currentMnemonic = `STO addr; @addr: $${num2hex(this.memory[addr])}`; this.memory[this.memory[addr]] = this.acc; this._incrementIP(2); }, @@ -143,7 +143,7 @@ module.exports = class CPU { }, load_addr: (addr) => { - this.dbg.currentMnemonic = `LDA addr; @ addr: ${num2hex(this.memory[addr])}`; + this.dbg.currentMnemonic = `LDA addr; @ addr: $${num2hex(this.memory[addr])}`; this.acc = this.memory[addr]; this._updateFlagNegative(); this._updateFlagZero(); @@ -263,7 +263,7 @@ module.exports = class CPU { }, hop_lit: (lit) => { - this.dbg.currentMnemonic = `HOP lit; IP+2: ${this.memory[this.IP+2]}, IP+3: ${this.memory[this.IP+3]}`; + this.dbg.currentMnemonic = `HOP lit; IP+2: $${this.memory[this.IP+2]}, IP+3: $${this.memory[this.IP+3]}`; if (this.acc === lit) { this._incrementIP(4); } else {