diff --git a/docs/source/libraries.rst b/docs/source/libraries.rst index 803a6b8d6..fc86a9267 100644 --- a/docs/source/libraries.rst +++ b/docs/source/libraries.rst @@ -67,19 +67,6 @@ sys (part of syslib) 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! -``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`` Returns the current value of the CPU status register. diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 9bc3ce364..86c6e600c 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -960,9 +960,14 @@ callrom(bank, address, argumentaddress) ; NOTE: specific to cx16 compiler t rsave, rsavex 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 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