- [NEW] Afegida l'opció de "break on interrupt"
This commit is contained in:
9
z80.cpp
9
z80.cpp
@@ -661,17 +661,22 @@ namespace z80
|
||||
if (!iff1) return;
|
||||
exit_from_halt = true;
|
||||
PUSH(rPC);
|
||||
uint16_t address;
|
||||
if (im==1) {
|
||||
rPC = 0x38;
|
||||
} else if (im==2) {
|
||||
const uint16_t address = (rI<<8) | 0xFE;
|
||||
address = (rI<<8) | 0xFE;
|
||||
rPC = READ_MEM_16(address);
|
||||
} else if (im==0) {
|
||||
printf("Interrupt mode 0!\n");
|
||||
z80debug::stop();
|
||||
return;
|
||||
}
|
||||
if (options[Z80_OPTION_BREAK_ON_INTERRUPT]) z80debug::stop();
|
||||
if (options[Z80_OPTION_BREAK_ON_INTERRUPT]) {
|
||||
printf("Break on interrupt! 0x%2x, PC: 0x%2x\n", address, rPC);
|
||||
z80debug::setcursor(rPC);
|
||||
z80debug::stop();
|
||||
}
|
||||
}
|
||||
|
||||
void RST(uint8_t vec)
|
||||
|
||||
Reference in New Issue
Block a user