visitExtendedInstruction method
void
visitExtendedInstruction()
Implementation
void visitExtendedInstruction() {
// offset the extended instruction by 300 in order to offset it safely from other instructions
// i.e. extended 1 = 301, extended 2 = 302, etc...
var i = readb() + 300;
if (ops.containsKey(i)) {
if (Debugger.enableDebug) {
if (Debugger.enableTrace && !Z.inBreak) {
Debugger.debug('>>> (0x${(programCounter- 1).toRadixString(16)}) ($i)');
Debugger.debug(Debugger.dumpLocals());
}
if (Debugger.enableStackTrace) {
Debugger.debug('Call Stack: $callStack');
Debugger.debug('Game Stack: $stack');
}
if (Debugger.isBreakPoint(programCounter- 1)) {
Z.inBreak = true;
Debugger.debugStartAddr = programCounter- 1;
}
}
ops[i]!();
} else {
throw GameException('Unsupported EXT Op Code: $i');
}
}