Moved IRQ hooking / unhooking from startup code to constructor / destructor to avoid linking in the hooking / unhooking code (and callirq) for the majority of cc65 prorams not linking in interruptors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5985 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
46
libsrc/lynx/irq.s
Normal file
46
libsrc/lynx/irq.s
Normal file
@@ -0,0 +1,46 @@
|
||||
;
|
||||
; IRQ handling (Lynx version)
|
||||
;
|
||||
|
||||
.export initirq, doneirq
|
||||
.import callirq
|
||||
|
||||
.include "lynx.inc"
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
initirq:
|
||||
lda #<IRQStub
|
||||
ldx #>IRQStub
|
||||
sei
|
||||
sta INTVECTL
|
||||
stx INTVECTH
|
||||
cli
|
||||
rts
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
|
||||
doneirq:
|
||||
; as Lynx is a console there is not much point in releasing the IRQ
|
||||
rts
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "LOWCODE"
|
||||
|
||||
IRQStub:
|
||||
phy
|
||||
phx
|
||||
pha
|
||||
cld
|
||||
jsr callirq
|
||||
lda INTSET
|
||||
sta INTRST
|
||||
pla
|
||||
plx
|
||||
ply
|
||||
rti
|
||||
Reference in New Issue
Block a user