mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 15:05:14 +00:00
0205906707
git-svn-id: svn://svn.cc65.org/cc65/trunk@5986 b7a2c559-68d2-44c3-8de9-860c34a00d81
64 lines
858 B
ArmAsm
64 lines
858 B
ArmAsm
;
|
|
; IRQ handling (Oric version)
|
|
;
|
|
|
|
.export initirq, doneirq
|
|
.import callirq
|
|
|
|
.include "atmos.inc"
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
.segment "INIT"
|
|
|
|
initirq:
|
|
lda IRQVec
|
|
ldx IRQVec+1
|
|
sta IRQInd+1
|
|
stx IRQInd+2
|
|
lda #<IRQStub
|
|
ldx #>IRQStub
|
|
sei
|
|
sta IRQVec
|
|
stx IRQVec+1
|
|
cli
|
|
rts
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
.code
|
|
|
|
doneirq:
|
|
lda IRQInd+1
|
|
ldx IRQInd+2
|
|
sei
|
|
sta IRQVec
|
|
stx IRQVec+1
|
|
cli
|
|
rts
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
.segment "LOWCODE"
|
|
|
|
IRQStub:
|
|
cld ; Just to be sure
|
|
pha
|
|
txa
|
|
pha
|
|
tya
|
|
pha
|
|
jsr callirq ; Call the functions
|
|
pla
|
|
tay
|
|
pla
|
|
tax
|
|
pla
|
|
jmp IRQInd ; Jump to the saved IRQ vector
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
.data
|
|
|
|
IRQInd: jmp $0000
|