mii_emu/test/asm/002_jsr_rts.asm
Michel Pollet f7a56ebc01 Initial Commit
Cleaned up for release at last!

Signed-off-by: Michel Pollet <buserror@gmail.com>
2023-10-25 08:50:14 +01:00

26 lines
320 B
NASM

; 65c02 JSR/RTS/SBC/BEQ
.org $2000
;.verbose
CLC
LDA #$00
JSR skip
SEC
SBC #$03
BEQ back
JMP fail
skip LDA #$03
RTS
fail BRK ; JSR Failed!
; now test setting some address on the stack and call RTS
jump LDA #>pass
PHA
LDA #<pass
DEC
PHA
RTS
BRK
back BRA jump
BRK
rts_on NOP
pass BRK