mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-12 15:30:55 +00:00
ksp_theme: fix interrupt bug on older Apple IIs
This commit is contained in:
parent
762ebf13fe
commit
42e4f41997
@ -352,7 +352,8 @@ forever_loop:
|
||||
; Then it sets up the stack like an interrupt and calls 0x3fe
|
||||
|
||||
interrupt_handler:
|
||||
pha ; save A
|
||||
; pha ; save A
|
||||
; A saved by firmware to $45
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
@ -549,10 +550,13 @@ done_left_interrupt:
|
||||
|
||||
done_interrupt:
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
tay ; restore Y
|
||||
|
||||
pla
|
||||
tax ; restore X
|
||||
|
||||
lda $45 ; restore A
|
||||
|
||||
rti
|
||||
|
||||
|
||||
|
@ -338,8 +338,13 @@ forever_loop:
|
||||
; Then it sets up the stack like an interrupt and calls 0x3fe
|
||||
|
||||
interrupt_handler:
|
||||
pha ; save A
|
||||
; Should we save X and Y too?
|
||||
; pha ; firmware saves A to $45 for us
|
||||
txa ; save X
|
||||
pha
|
||||
tya
|
||||
pha ; save Y
|
||||
|
||||
|
||||
|
||||
bit $C404 ; can clear 6522 interrupt by reading T1C-L
|
||||
|
||||
@ -437,6 +442,12 @@ not_done:
|
||||
|
||||
done_interrupt:
|
||||
pla
|
||||
tay ; restore y
|
||||
pla
|
||||
tax ; restore X
|
||||
|
||||
lda $45 ; restore A
|
||||
|
||||
rti
|
||||
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user