2022-03-22 18:02:46 +00:00
|
|
|
;
|
|
|
|
; IRQ handling (Atari 7800 version)
|
|
|
|
;
|
|
|
|
|
|
|
|
.export initirq, doneirq, IRQStub
|
|
|
|
|
|
|
|
.import __INTERRUPTOR_COUNT__, callirq
|
|
|
|
|
|
|
|
.include "atari7800.inc"
|
|
|
|
|
2022-04-16 16:16:14 +00:00
|
|
|
.code
|
2022-03-22 18:02:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
|
|
|
|
initirq:
|
|
|
|
doneirq:
|
|
|
|
rts
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
|
|
|
|
IRQStub:
|
|
|
|
cld ; Just to be sure
|
|
|
|
pha
|
|
|
|
lda #<(__INTERRUPTOR_COUNT__ * 2)
|
|
|
|
beq @L1
|
|
|
|
txa
|
|
|
|
pha
|
|
|
|
tya
|
|
|
|
pha
|
|
|
|
jsr callirq ; Call the functions
|
2022-04-16 16:16:14 +00:00
|
|
|
pla
|
2022-03-22 18:02:46 +00:00
|
|
|
tay
|
|
|
|
pla
|
|
|
|
tax
|
2022-04-16 16:16:14 +00:00
|
|
|
@L1: pla
|
2022-03-22 18:02:46 +00:00
|
|
|
rti
|
|
|
|
|