include "cpu/z80/include/common.inc" global r_irq_count section vectors rorg RST_ENTRY jp _start rorg RST_IRQ jp irq_handler rorg RST_NMI jp nmi_handler section code irq_handler: push af push hl ld hl, (r_irq_count) inc hl ld (r_irq_count), hl pop hl pop af ei ret nmi_handler: jp _start section bss r_irq_count: dcb.w 1