From c2f062a3919302a2236848fb191e3d0d235a604f Mon Sep 17 00:00:00 2001 From: "Mark J. Reed" Date: Sat, 29 Oct 2022 17:10:06 -0400 Subject: [PATCH 1/2] fix: don't ignore shape argument to cx16.mouse_config2 --- compiler/res/prog8lib/cx16/syslib.p8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }} } From dc0edc4c2ba3b819b6555aa447c26f868eb59d96 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 29 Oct 2022 23:24:38 +0200 Subject: [PATCH 2/2] break also in for --- docs/source/syntaxreference.rst | 3 ++- examples/test.p8 | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) 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 13e8b08d5..01598c25f 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,17 +1,7 @@ %import textio -%import floats %zeropage basicsafe main { - float[10] flt - sub start() { - float ff = 9.0 - flt[1] = 42.42 - flt[1] = -9.0 - flt[1] = -ff - flt[1] = -flt[1] ; TODO also fix crash when selecting vm target: fpReg1 out of bounds - floats.print_f(flt[1]) - txt.nl() } }