411
411
/* Interrupt handling. */
413
#define DO_INTERRUPT(int_kind) \
415
BYTE ik = (int_kind); \
417
if (ik & (IK_IRQ | IK_NMI)) { \
418
if ((ik & IK_NMI) && 0) { \
419
} else if ((ik & IK_IRQ) && iff1 \
420
&& !OPINFO_DISABLES_IRQ(LAST_OPCODE_INFO)) { \
423
if (mon_mask[e_comp_space] & (MI_STEP)) { \
424
mon_check_icount_interrupt(); \
428
STORE((reg_sp), ((BYTE)(z80_reg_pc >> 8))); \
431
STORE((reg_sp), ((BYTE)(z80_reg_pc & 0xff))); \
434
if (im_mode == 1) { \
440
jumpdst = (LOAD(reg_i << 8) << 8); \
442
jumpdst |= (LOAD((reg_i << 8) + 1)); \
448
if (ik & (IK_TRAP | IK_RESET)) { \
449
if (ik & IK_TRAP) { \
450
export_registers(); \
451
interrupt_do_trap(cpu_int_status, (WORD)z80_reg_pc); \
452
import_registers(); \
453
if (cpu_int_status->global_pending_int & IK_RESET) \
456
if (ik & IK_RESET) { \
457
interrupt_ack_reset(cpu_int_status); \
461
if (ik & (IK_MONITOR)) { \
462
caller_space = e_comp_space; \
463
if (mon_force_import(e_comp_space)) \
464
import_registers(); \
465
if (mon_mask[e_comp_space]) \
466
export_registers(); \
467
if (mon_mask[e_comp_space] & (MI_BREAK)) { \
468
if (check_breakpoints(e_comp_space, (WORD)z80_reg_pc)) { \
472
if (mon_mask[e_comp_space] & (MI_STEP)) { \
473
mon_check_icount((WORD)z80_reg_pc); \
475
if (mon_mask[e_comp_space] & (MI_WATCH)) { \
476
mon_check_watchpoints((WORD)z80_reg_pc); \
413
#define DO_INTERRUPT(int_kind) \
415
BYTE ik = (int_kind); \
417
if (ik & (IK_IRQ | IK_NMI)) { \
418
if ((ik & IK_NMI) && 0) { \
419
} else if ((ik & IK_IRQ) && iff1 \
420
&& !OPINFO_DISABLES_IRQ(LAST_OPCODE_INFO)) { \
423
if (monitor_mask[e_comp_space] & (MI_STEP)) { \
424
monitor_check_icount_interrupt(); \
428
STORE((reg_sp), ((BYTE)(z80_reg_pc >> 8))); \
431
STORE((reg_sp), ((BYTE)(z80_reg_pc & 0xff))); \
434
if (im_mode == 1) { \
440
jumpdst = (LOAD(reg_i << 8) << 8); \
442
jumpdst |= (LOAD((reg_i << 8) + 1)); \
448
if (ik & (IK_TRAP | IK_RESET)) { \
449
if (ik & IK_TRAP) { \
450
export_registers(); \
451
interrupt_do_trap(cpu_int_status, (WORD)z80_reg_pc); \
452
import_registers(); \
453
if (cpu_int_status->global_pending_int & IK_RESET) \
456
if (ik & IK_RESET) { \
457
interrupt_ack_reset(cpu_int_status); \
461
if (ik & (IK_MONITOR)) { \
462
caller_space = e_comp_space; \
463
if (monitor_force_import(e_comp_space)) \
464
import_registers(); \
465
if (monitor_mask[e_comp_space]) \
466
export_registers(); \
467
if (monitor_mask[e_comp_space] & (MI_BREAK)) { \
468
if (monitor_check_breakpoints(e_comp_space, \
469
(WORD)z80_reg_pc)) { \
473
if (monitor_mask[e_comp_space] & (MI_STEP)) { \
474
monitor_check_icount((WORD)z80_reg_pc); \
476
if (monitor_mask[e_comp_space] & (MI_WATCH)) { \
477
monitor_check_watchpoints((WORD)z80_reg_pc); \
481
482
/* ------------------------------------------------------------------------- */