From 9bb4f83010e9677cf8df9ec007a317559c0a474b Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Wed, 5 Oct 2016 23:27:51 -0400 Subject: [PATCH] Save and restore the accumulator in the interrupt handler. --- mocktest/speech.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mocktest/speech.s b/mocktest/speech.s index e2f7dc8..5f0ae85 100644 --- a/mocktest/speech.s +++ b/mocktest/speech.s @@ -85,6 +85,7 @@ _busy: .byte $00 .proc _interr + PHA TXA ;SAVE REGISTERS PHA TYA @@ -120,7 +121,7 @@ _busy: .byte $00 TAY PLA TAX - LDA $45 + PLA RTI ;RETURN FROM INTERRUPT @L1: