mirror of
https://github.com/irmen/prog8.git
synced 2024-11-30 08:52:30 +00:00
fixed docs on rsave()/rrestore() builtin functions
This commit is contained in:
parent
7bccfc0006
commit
cdfef30c22
@ -67,19 +67,6 @@ sys (part of syslib)
|
|||||||
Efficiently set a part of memory to the given (u)word value.
|
Efficiently set a part of memory to the given (u)word value.
|
||||||
But the most efficient will always be to write a specialized fill routine in assembly yourself!
|
But the most efficient will always be to write a specialized fill routine in assembly yourself!
|
||||||
|
|
||||||
``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.
|
|
||||||
Note: the 16 bit 'virtual' registers of the Commander X16 are *not* saved.
|
|
||||||
|
|
||||||
``rrestore()``
|
|
||||||
Restores the CPU registers and the status flags from previously saved values.
|
|
||||||
Note: the 16 bit 'virtual' registers of the Commander X16 are *not* restored.
|
|
||||||
|
|
||||||
``read_flags() -> ubyte``
|
``read_flags() -> ubyte``
|
||||||
Returns the current value of the CPU status register.
|
Returns the current value of the CPU status register.
|
||||||
|
|
||||||
|
@ -960,9 +960,14 @@ callrom(bank, address, argumentaddress) ; NOTE: specific to cx16 compiler t
|
|||||||
|
|
||||||
rsave, rsavex
|
rsave, rsavex
|
||||||
Saves all registers including status (or only X) on the stack
|
Saves all registers including status (or only X) on the stack
|
||||||
|
It's not needed to rsave()/rsavex() before an asm subroutine that clobbers the X register
|
||||||
|
(which is used by prog8 as the internal evaluation stack pointer);
|
||||||
|
the compiler will take care of this situation automatically.
|
||||||
|
Note: the 16 bit 'virtual' registers of the Commander X16 are *not* saved.
|
||||||
|
|
||||||
rrestore, rrestorex
|
rrestore, rrestorex
|
||||||
Restore all registers including status (or only X) back from the cpu hardware stack
|
Restore all registers including status (or only X) back from the cpu hardware stack
|
||||||
|
Note: the 16 bit 'virtual' registers of the Commander X16 are *not* restored.
|
||||||
|
|
||||||
|
|
||||||
Library routines
|
Library routines
|
||||||
|
Loading…
Reference in New Issue
Block a user