save X register automatically when calling sub that clobbers X

This commit is contained in:
Irmen de Jong
2018-12-09 19:48:59 +01:00
parent b8150f645d
commit f070dc22bb
13 changed files with 249 additions and 588 deletions
+3
View File
@@ -650,6 +650,9 @@ rsave()
Saves the CPU registers and the status flags.
You can now more or less 'safely' use the registers directly, until you
restore them again so the generated code can carry on normally.
Note: it's not needed to rsave() before an asm subroutine that clobbers the X register
(which is used as the internal evaluation stack pointer).
The compiler will take care of this situation automatically.
rrestore()
Restores the CPU registers and the status flags from previously saved values.