tweak temp float

This commit is contained in:
Irmen de Jong 2021-11-13 12:56:59 +01:00
parent 2177ba0ed2
commit 00c6f74481
4 changed files with 26 additions and 8 deletions

View File

@ -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 ----

View File

@ -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 ----

View File

@ -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)

View File

@ -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
}