diff --git a/js/cpu6502.ts b/js/cpu6502.ts index b4a7f1b..f39388c 100644 --- a/js/cpu6502.ts +++ b/js/cpu6502.ts @@ -997,11 +997,12 @@ export default class CPU6502 { mode: 'implied', }; } else { + let cpu = this; unk = { name: '???', op: function() { debug('Unknown OpCode: ' + toHex(b) + - ' at ' + toHex(this.pc - 1, 4)); + ' at ' + toHex(cpu.pc - 1, 4)); }, modeFn: this.implied, mode: 'implied'