still_alive: make interrupts work on older Apple IIs

This commit is contained in:
Vince Weaver 2018-09-04 12:16:24 -04:00
parent 6591a180ab
commit b08d7e5851
3 changed files with 13 additions and 3 deletions

View File

@ -1,8 +1,8 @@
Still Alive for the Apple II
in roughly 20k
in roughly 16k
By Deater (Vince Weaver)
vince@deater.net
BACKGROUND
~~~~~~~~~~

View File

@ -11,7 +11,11 @@
; Then it sets up the stack like an interrupt and calls 0x3fe
interrupt_handler:
pha ; save A ; 3
; pha ; save A ; 3
txa
pha
tya
pha
; Should we save X and Y too?
; inc $0404 ; debug (flashes char onscreen)
@ -286,6 +290,12 @@ done_interrupt:
exit_interrupt:
pla ; restore a ; 4
tay
pla
tax
lda $45 ; restore A saved by firmware
; needed on older (pre-enhanced IIe)
rti ; return from interrupt ; 6

Binary file not shown.