65816-llvm-mos/tests/memBlock/memBlockIrqEntry.s
2026-10-06 17:01:51 -05:00

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