Page 1 of 1

PRINT USR 5631, which registers are free to use during USR?

Posted: Mon Jun 10, 2019 2:51 pm
by 1bvl109
As can be seen from https://skoolkit.ca/disassemblies/rom/asm/5615.html this simply performs a

Code: Select all

EXX
RET
in the original 48K-ROM and does all kinds of strange things.
https://skoolkit.ca/disassemblies/rom/asm/13491.html warns "For a successful return to BASIC, HL' must on exit from the machine code contain the address of the 'end-calc' instruction at 10072." Is this all there is to know? Do other registers as HL' and SP also need to be considered?

Re: PRINT USR 5631, which registers are free to use during USR?

Posted: Mon Jun 10, 2019 11:52 pm
by Seven.FFF
Just SP, IY, and HL’. IY points to the BASIC sysvars, so the ROM gets very confused if you move that.

Re: PRINT USR 5631, which registers are free to use during USR?

Posted: Sat Jun 15, 2019 10:42 am
by 1bvl109
Thanks.