28 lines
437 B
ArmAsm
28 lines
437 B
ArmAsm
; irqEntry -- the interrupt memBlockIrq.lua injects: a native-mode handler
|
|
; that saves every register, gives the C code its own direct page (any
|
|
; interrupt code that runs C must: C keeps its scratch in the direct
|
|
; page) and DBR 0, runs irqNested and returns with RTI.
|
|
|
|
IRQ_D = 0x0200
|
|
|
|
.text
|
|
.globl irqEntry
|
|
irqEntry:
|
|
rep #0x30
|
|
pha
|
|
phx
|
|
phy
|
|
phb
|
|
phd
|
|
pea 0
|
|
plb
|
|
plb
|
|
lda #IRQ_D
|
|
tcd
|
|
jsl irqNested
|
|
pld
|
|
plb
|
|
ply
|
|
plx
|
|
pla
|
|
rti
|