mirror of
https://github.com/cc65/cc65.git
synced 2024-08-17 03:29:15 +00:00
41 lines
892 B
ArmAsm
41 lines
892 B
ArmAsm
|
;
|
||
|
; IRQ handling (CreatiVision version)
|
||
|
;
|
||
|
|
||
|
.export initirq, doneirq
|
||
|
.import callirq, irq2
|
||
|
|
||
|
.include "creativision.inc"
|
||
|
|
||
|
; ------------------------------------------------------------------------
|
||
|
|
||
|
.segment "ONCE"
|
||
|
|
||
|
initirq:
|
||
|
lda #<IRQStub
|
||
|
ldx #>IRQStub
|
||
|
jmp setvec
|
||
|
|
||
|
; ------------------------------------------------------------------------
|
||
|
|
||
|
.code
|
||
|
|
||
|
doneirq:
|
||
|
lda #<BIOS_IRQ2_ADDR
|
||
|
ldx #>BIOS_IRQ2_ADDR
|
||
|
setvec: sei
|
||
|
sta irq2+1
|
||
|
stx irq2+2
|
||
|
cli
|
||
|
rts
|
||
|
|
||
|
; ------------------------------------------------------------------------
|
||
|
|
||
|
.segment "CODE"
|
||
|
|
||
|
IRQStub:
|
||
|
cld ; Just to be sure
|
||
|
jsr callirq ; Call the functions
|
||
|
jmp BIOS_IRQ2_ADDR ; Jump to the BIOS IRQ vector
|
||
|
|