mirror of
https://github.com/cc65/cc65.git
synced 2024-11-12 07:07:19 +00:00
49 lines
861 B
ArmAsm
49 lines
861 B
ArmAsm
;
|
|
; IRQ handling (PCE version)
|
|
;
|
|
|
|
.export initirq, doneirq, IRQStub, __nmi
|
|
|
|
.import __INTERRUPTOR_COUNT__, callirq_y
|
|
|
|
.include "pce.inc"
|
|
.include "extzp.inc"
|
|
|
|
; ------------------------------------------------------------------------
|
|
.segment "ONCE"
|
|
|
|
; a constructor
|
|
;
|
|
initirq:
|
|
rts
|
|
|
|
; ------------------------------------------------------------------------
|
|
.code
|
|
|
|
; a destructor
|
|
;
|
|
doneirq:
|
|
rts
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
IRQStub:
|
|
phy
|
|
|
|
; Save the display-source flags (and, release the interrupt).
|
|
;
|
|
ldy VDC_CTRL
|
|
sty vdc_flags
|
|
|
|
ldy #<(__INTERRUPTOR_COUNT__ * 2)
|
|
beq @L1
|
|
phx
|
|
pha
|
|
|
|
jsr callirq_y
|
|
|
|
pla
|
|
plx
|
|
@L1: ply
|
|
__nmi: rti
|