diff --git a/compiler/res/prog8lib/c64/floats.p8 b/compiler/res/prog8lib/c64/floats.p8 index da8770ab5..ffa529993 100644 --- a/compiler/res/prog8lib/c64/floats.p8 +++ b/compiler/res/prog8lib/c64/floats.p8 @@ -12,7 +12,7 @@ floats { const float PI = 3.141592653589793 const float TWOPI = 6.283185307179586 - ubyte[5] tempvar_swap_float ; used for some swap() operations + float tempvar_swap_float ; used for some swap() operations ; ---- C64 basic and kernal ROM float constants and functions ---- diff --git a/compiler/res/prog8lib/cx16/floats.p8 b/compiler/res/prog8lib/cx16/floats.p8 index e5488ab9e..91aa35a27 100644 --- a/compiler/res/prog8lib/cx16/floats.p8 +++ b/compiler/res/prog8lib/cx16/floats.p8 @@ -13,7 +13,7 @@ floats { const float PI = 3.141592653589793 const float TWOPI = 6.283185307179586 - ubyte[5] tempvar_swap_float ; used for some swap() operations + float tempvar_swap_float ; used for some swap() operations ; ---- ROM float functions ---- diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 8d2451948..3caafecea 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,11 +3,12 @@ TODO For next compiler release (7.3) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +- fix compiler crashing on assembler and imageviewer (add unit tests) - add expression simplification to while and until loops as well. -Blocked by Commander-x16 v39 release -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Blocked by an official Commander-x16 v39 release +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - simplify cx16.joystick_get2() once this cx16 rom issue is resolved: https://github.com/commanderx16/x16-rom/issues/203 (I hope this will still be included into the final v39 roms release for the cx16) diff --git a/examples/test.p8 b/examples/test.p8 index a692e3997..22f77d78b 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,13 +1,30 @@ %import textio %import floats -%zeropage basicsafe +%zeropage dontuse main { sub start() { - ubyte bb - uword ww - uword @shared zz = not bb or not ww ; TODO WHY DOES THIS USE STACK EVAL-because of typecastings? + float[] farr = [1.111,2.222,3.333] + float f2 = 9.999 + + floats.print_f(f2) + txt.nl() + floats.print_f(farr[0]) + txt.nl() + txt.nl() + + swap(f2, farr[0]) + + floats.print_f(f2) + txt.nl() + floats.print_f(farr[0]) + txt.nl() + txt.nl() + +; ubyte bb +; uword ww +; uword @shared zz = not bb or not ww ; TODO WHY DOES THIS USE STACK EVAL-because it is a binaryexpression that isn't split }