我试图在中断返回时切换正常的程序流程:
START
SEI
LDX #<IRQ
LDY #>IRQ
STX $FFFE
STY $FFFF
CLI
LOOP1
INC $D020
JMP LOOP1
LOOP2
INC $D021
JMP LOOP2
IRQ
STA SAVEA+1
STX SAVEX+1
STY SAVEY+1
// Some Routines
LDA #$00
PHA
LDA #<LOOP2
PHA
LDA #>LOOP2
PHA
SAVEA
LDA #$00
SAVEX
LDX #$00
SAVEY
LDY #$00
RTI
我根据该来源编写了此代码:http: //6502.org/tutorials/interrupts.html#1.3
但是PHA会导致崩溃,如何在中断中将正常流程LOOP1切换到LOOP2?