2015-09-19 13:55:43 +00:00
|
|
|
;
|
|
|
|
; IRQ handling (PCE version)
|
|
|
|
;
|
|
|
|
|
2015-11-26 20:06:20 +00:00
|
|
|
.export initirq, doneirq, IRQStub, __nmi
|
2015-09-19 13:55:43 +00:00
|
|
|
|
|
|
|
.import __INTERRUPTOR_COUNT__, callirq_y
|
|
|
|
|
|
|
|
.include "pce.inc"
|
|
|
|
.include "extzp.inc"
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "ONCE"
|
2015-09-19 13:55:43 +00:00
|
|
|
|
|
|
|
; a constructor
|
|
|
|
;
|
|
|
|
initirq:
|
|
|
|
rts
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
.code
|
|
|
|
|
|
|
|
; a destructor
|
|
|
|
;
|
|
|
|
doneirq:
|
|
|
|
rts
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
|
|
|
|
IRQStub:
|
|
|
|
phy
|
|
|
|
|
|
|
|
; Save the display-source flags (and, release the interrupt).
|
|
|
|
;
|
2015-09-29 16:39:58 +00:00
|
|
|
ldy VDC_CTRL
|
2015-09-19 13:55:43 +00:00
|
|
|
sty vdc_flags
|
|
|
|
|
|
|
|
ldy #<(__INTERRUPTOR_COUNT__ * 2)
|
|
|
|
beq @L1
|
|
|
|
phx
|
|
|
|
pha
|
|
|
|
|
|
|
|
jsr callirq_y
|
|
|
|
|
|
|
|
pla
|
|
|
|
plx
|
|
|
|
@L1: ply
|
2015-11-26 20:06:20 +00:00
|
|
|
__nmi: rti
|