mirror of
https://github.com/cc65/cc65.git
synced 2024-11-16 02:10:52 +00:00
e6530d68dd
Note that the joystick driver doesn't support combined movements (like left/up or right/down). This should be fixed.
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
|
|
|