Add irq handling, PAL/NTSC detection and clock()
This commit is contained in:
36
libsrc/atari7800/irq.s
Normal file
36
libsrc/atari7800/irq.s
Normal file
@@ -0,0 +1,36 @@
|
||||
;
|
||||
; IRQ handling (Atari 7800 version)
|
||||
;
|
||||
|
||||
.export initirq, doneirq, IRQStub
|
||||
|
||||
.import __INTERRUPTOR_COUNT__, callirq
|
||||
|
||||
.include "atari7800.inc"
|
||||
|
||||
.code
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
@L1: pla
|
||||
rti
|
||||
|
||||
Reference in New Issue
Block a user