mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
save X register automatically when calling sub that clobbers X
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user