In the C64 BASIC2 ROM there is a routine at $A38A. It is called FNDFOR, and amongst its functions is the ability to be used to help remove the last GOSUB's return address from BASIC's stack. In BASIC2 I'd simply SYS to the address at REMGSB to call it.
Code: Select all
REMGSB LDA #$FF
STA $4A
JSR $A38A
TXS
CMP #$8D
BNE ERROR
PLA
PLA
PLA
PLA
PLA
RTS
ERROR JMP $A8E0
But for the routines at $A38A (FNDFOR) and $A8E0 (14 bytes in from RETURN) will I instead need to use routines in the X16 BASIC ROM that reside at $C5B8 and $CC64 respectively? Again, this is based on info extracted from the *.sym files.
I'm asking because when I disassemble the BASIC ROM (Bank 4, right?) at these locations, I'm seeing quite different code...
Thanks in advance!