diff --git a/compiler/res/prog8lib/conv.p8 b/compiler/res/prog8lib/conv.p8 index 259911773..63f937b67 100644 --- a/compiler/res/prog8lib/conv.p8 +++ b/compiler/res/prog8lib/conv.p8 @@ -508,8 +508,7 @@ asmsub ubyte2decimal (ubyte value @A) -> ubyte @Y, ubyte @A, ubyte @X { ; ---- A to decimal string in Y/A/X (100s in Y, 10s in A, 1s in X) %asm {{ ldy #uword2decimal.ASCII_0_OFFSET - bne uword2decimal.hex_try200 - rts + jmp uword2decimal.hex_try200 }} } diff --git a/compiler/res/prog8lib/cx16/textio.p8 b/compiler/res/prog8lib/cx16/textio.p8 index cb352c572..3876e92c6 100644 --- a/compiler/res/prog8lib/cx16/textio.p8 +++ b/compiler/res/prog8lib/cx16/textio.p8 @@ -238,7 +238,7 @@ _lx ldx #0 ; modified }} } -asmsub scroll_right() clobbers(A) { +asmsub scroll_right() clobbers(A,Y) { ; ---- scroll the whole screen 1 character to the right ; contents of the leftmost column are unchanged, you should clear/refill this yourself %asm {{ diff --git a/docs/source/programming.rst b/docs/source/programming.rst index df2fa8748..2aa2131f7 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -949,11 +949,13 @@ rsave, rsavex 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. + Note: the 16 bit 'virtual' registers of the Commander X16 are *not* saved, + but you can use ``cx16.save_virtual_registers()`` for that. 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. + Note: the 16 bit 'virtual' registers of the Commander X16 are *not* restored, + but you can use ``cx16.restore_virtual_registers()`` for that. Library routines