diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index 9ff5b8fb0..b6708e86f 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -393,9 +393,10 @@ asmsub kbdbuf_clear() { asmsub mouse_config2(ubyte shape @A) clobbers (A, X, Y) { ; -- convenience wrapper function that handles the screen resolution for mouse_config() for you %asm {{ + pha ; save shape sec jsr cx16.screen_mode ; set current screen mode and res in A, X, Y - lda #1 + pla ; get shape back jmp cx16.mouse_config }} } diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 467bf96ab..ae7ae24ce 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -715,7 +715,8 @@ And this is a loop over the values of the array ``fibonacci_numbers``:: uword number for number in fibonacci_numbers { - ; do something with number + ; do something with number... + break ; break out of the loop early } diff --git a/examples/test.p8 b/examples/test.p8 index 4297f2ba4..01598c25f 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -3,18 +3,5 @@ main { sub start() { - cx16.r0 = 42 - goto foobar -my_label: - txt.print_uwhex(cx16.r0, true) - txt.spc() - cx16.r0-- - if cx16.r0 - goto my_label - sys.exit(0) - -foobar: - txt.print("yeooo\n") - goto my_label } }