Save and restore the accumulator in the interrupt handler.

This commit is contained in:
Jeremy Rand 2016-10-05 23:27:51 -04:00
parent 84a08225de
commit 9bb4f83010

View File

@ -85,6 +85,7 @@ _busy: .byte $00
.proc _interr .proc _interr
PHA
TXA ;SAVE REGISTERS TXA ;SAVE REGISTERS
PHA PHA
TYA TYA
@ -120,7 +121,7 @@ _busy: .byte $00
TAY TAY
PLA PLA
TAX TAX
LDA $45 PLA
RTI ;RETURN FROM INTERRUPT RTI ;RETURN FROM INTERRUPT
@L1: @L1: