Irmen de Jong
688dce6145
floats: added AYINT2 as a safe wrapper for AYINT. Internal float to word cast now also uses that.
2024-11-08 18:52:48 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
46b94c17d6
comment
2024-09-20 17:33:00 +02:00
markjreed
16a2b2f566
Add 24-bit integer-to-float routine and floating-point jiffy clock reader ( #150 )
...
* feat: add routine to convert 24-bit integer from A/X/Y to float in FAC1
* fix: remove duplicate definition
* fix: shift to appropriate exponent
2024-09-20 17:28:37 +02:00
Irmen de Jong
d8ec03874f
move the pi-related constants from system specific floats module into the shared one. Clarify some stuff.
2024-04-15 19:15:44 +02:00
Irmen de Jong
d33aed4ed5
added txt.petscii2scr() and txt.petscii2scr_str()
2024-02-07 22:36:43 +01:00
Irmen de Jong
e35cfd4971
get rid of the redundant 'f' suffix of several funtions in floats module (breaking change!)
...
Unfortunately a few routines (minf, maxf, clampf) remain unchanged, because removing the 'f' would make them clash with a builtin function.
floats.rndf -> floats.rnd
floats.parse_f -> floats.parse
floats.rndseedf -> floats.rndseed
floats.print_f -> floats.print
floats.str_f -> floats.tostr
2023-12-29 03:12:44 +01:00
Irmen de Jong
2b8f613a00
added %option ignore_unused to suppress warnings about unused vars and subs in that module/block.
...
Also improved error for invalid directive.
2023-12-26 23:37:59 +01:00
Irmen de Jong
38a22fbc99
allow %option no_symbol_prefixing also on module scope
2023-12-26 12:31:18 +01:00
Irmen de Jong
28c1b208c1
optimized calls for float *10 and +0.5
2023-12-06 01:18:07 +01:00
Irmen de Jong
745d192563
added floats.normalize()
2023-12-05 22:54:35 +01:00
Irmen de Jong
7d8b42d63e
allow Unicode letters in identifiers: things like 'knäckebröd' and 'π' are now valid identifiers. Added floats.π constant.
2023-12-05 01:36:54 +01:00
Irmen de Jong
77f3852cdc
added floats.parse_f()
2023-08-16 14:47:20 +02:00
Irmen de Jong
41af63b333
remove even more X register save/restore code
2023-07-15 22:26:54 +02:00
Irmen de Jong
cad18b8a3a
uniform symbol prefixing with p8_
2023-07-02 06:15:02 +02:00
Irmen de Jong
d936568b76
added divmod()
and divmodw()
builtin functions to efficiently compute division and remainder in a single call
2023-03-29 23:46:44 +02:00
Irmen de Jong
f7dd388954
remove unsupported floats.FTOSWRDAY routine. Fixes #96
2023-02-17 18:05:46 +01:00
Irmen de Jong
5d4bfffc7e
float.rndseedf() now takes float seed value and is consistent for all CBM compilation targets
2022-11-06 22:53:57 +01:00
Irmen de Jong
ec5adffdc2
rnd()/rndf() routines can now be seeded with new rndseed()/rndseedf() routines. fixes #80
2022-10-22 13:34:22 +02:00
Irmen de Jong
3054a1d32d
api change: removed swap() builtin function (too complex in codegen for little used function)
2022-06-06 16:01:11 +02:00
Irmen de Jong
a735939d1e
removed confusing GPL software license reference and copyright header from library files. (because of exclusion in output files)
...
Reworded software license and exclusion clause somewhat again in attempt to make it even clearer.
2022-05-30 20:12:20 +02:00
Irmen de Jong
0f9e87d7bb
fixed compiler crash when casting float to integer, fixed float to int cast value error on cx16
2022-05-03 23:43:38 +02:00
Irmen de Jong
7eea97d741
- floats: remove all floating point builtin functions and move them to the floats module instead
2022-04-22 00:45:54 +02:00
Irmen de Jong
7dbff5b9e6
abs: remove support for floats. Use floats.fabs() instead.
...
this solves: can't use abs() etc in pipe expression because return type depends on argument type
2022-04-14 00:38:31 +02:00
Irmen de Jong
ed30108961
removed '**' power-operator. Use floats.pow() instead.
2022-03-27 13:16:34 +02:00
Irmen de Jong
00c6f74481
tweak temp float
2021-11-13 12:56:59 +01:00
Irmen de Jong
1605791f1b
float swap() no longer uses evaluation stack but a single temp var instead + FAC1
2021-11-06 03:36:14 +01:00
Irmen de Jong
fd1f30f92b
removed %target directive (didn't add much, too confusing, only supported single target)
2021-09-04 15:01:16 +02:00
Irmen de Jong
0416aacbbd
fix %asminclude by removing scopelabel argument and improving docs to remove false promise about labels
2021-05-16 00:14:57 +02:00
Irmen de Jong
123473dfc8
cleanup
2021-04-06 00:16:29 +02:00
Irmen de Jong
061e1be0a4
removed ROM-float optimizations, too troublesome. Fixed LOG2 not being defined on Cx16 as well.
2020-12-21 23:22:02 +01:00
Irmen de Jong
800b5b2a43
cleaning up and correcting cc for builtin functions
2020-11-05 02:29:33 +01:00
Irmen de Jong
8d67056f84
fixed estack corruption caused by c64 print_f
2020-09-29 21:12:16 +02:00
Irmen de Jong
de06353194
auto select correct library to import based on target, instead of having c64- and cx16- prefix variants
...
some programs are now 100% source compatible between C64 and Cx16 targets!
import libraries have been rena;med
2020-09-21 00:50:09 +02:00