Commit Graph

1009 Commits

Author SHA1 Message Date
Irmen de Jong
fbe231793b optimized and added "streaming" crc32 and crc16 routines to math module. Return value is put in different register now! r14+r15 instead of r0+r1! 2024-03-16 01:07:03 +01:00
Irmen de Jong
6a9269111e some changes in SMC routines for the cx16:
sys.poweroff_system() moved to cx16
sys.set_leds_brightness() moved to cx16 and changed to set_led_brightness, you can only change the activity led brightness.
2024-03-15 23:00:14 +01:00
Irmen de Jong
1818738fc8 fixed potential bug in cx16.kbdbuf_clear() is and it is now cbm.kbdbuf_clear() and is available on all cbm like targets 2024-03-14 22:12:29 +01:00
Irmen de Jong
7e1e7a0780 fix conv.str_ub and conv.str_b for missing tens digits 2024-03-13 23:03:25 +01:00
Irmen de Jong
51d708bbdd fix monogfx issue 2024-03-12 23:27:15 +01:00
Irmen de Jong
e63a8f0c01 fix vm textio prefix type 2024-03-11 22:22:30 +01:00
Irmen de Jong
80f39e8097 Merge branch 'booleans'
# Conflicts:
#	compiler/res/prog8lib/cx16/monogfx.p8
#	compiler/res/prog8lib/virtual/monogfx.p8
#	compiler/src/prog8/compiler/astprocessing/BoolRemover.kt
#	compiler/test/TestTypecasts.kt
#	docs/source/todo.rst
#	examples/cx16/highresbitmap.p8
#	examples/test.p8
#	httpCompilerService/src/prog8/http/TestHttp.kt
2024-03-11 01:00:48 +01:00
Irmen de Jong
3a9919a377 implemented a couple more diskio routines for the VM target 2024-03-09 17:36:39 +01:00
Irmen de Jong
f739e679e4 added sys.exit2 and sys.exit3 to set more result registers at program exit
todo
2024-03-09 03:30:05 +01:00
Irmen de Jong
52649a8e4f conv routines now return the string buffer address. 2024-03-08 02:12:46 +01:00
Irmen de Jong
bdfb01f6a0 VM: implemented a few core routines in diskio (load/save)
textelite can now load and save your progress like it already could in the real version
2024-03-06 23:21:01 +01:00
Irmen de Jong
6d29b00a80 fix monogfx horizontal line and text draw in invert mode 2024-03-05 22:38:34 +01:00
Irmen de Jong
4d7e96d423 add monogfx inverted (eor) draw mode 2024-03-03 23:28:37 +01:00
Irmen de Jong
449461e412 tweak monogfx stipple plot 2024-03-03 21:47:42 +01:00
Irmen de Jong
e55cde2a81 more nonstrictbool conversions 2024-03-03 19:43:48 +01:00
Irmen de Jong
c532e28841 fix several remaining bool return values in library routines 2024-03-02 23:19:39 +01:00
Irmen de Jong
37b346740b fix 6502 casting uword and float to bool 2024-03-02 23:19:39 +01:00
Irmen de Jong
fe9a9fc5cb new if tests 2024-03-02 23:19:39 +01:00
Irmen de Jong
a1574a7187 added txt.print_bool, several fixes 2024-03-02 23:19:39 +01:00
Irmen de Jong
c77cd0da39 ifelse more 2024-03-02 23:19:39 +01:00
Irmen de Jong
577333f2c4 new ifelse codegen 2024-03-02 23:19:39 +01:00
Irmen de Jong
1ca3f64bf0 libraries: add ==0 or !=0 to expressions that depend on implicit conversion from byte to bool 2024-03-02 23:19:20 +01:00
Irmen de Jong
d4b087ea3f added txt.bell() to make terminal beep/bell sound on most systems 2024-02-21 17:35:37 +01:00
Irmen de Jong
88458f5355 faster array copy and fix for length 256 2024-02-11 23:57:38 +01:00
Irmen de Jong
8b8caa1c2e added math.randrange() and math.randrangew() 2024-02-10 22:16:13 +01:00
Irmen de Jong
d7f72056fc rest of the array copying 2024-02-10 17:16:06 +01:00
Irmen de Jong
6eacf1bddd added a few more IR syscalls for often used copy routines 2024-02-09 23:56:44 +01:00
Irmen de Jong
386a391fd9 added string.lstripped() and string.ltrimmed() 2024-02-07 23:07:45 +01:00
Irmen de Jong
d33aed4ed5 added txt.petscii2scr() and txt.petscii2scr_str() 2024-02-07 22:36:43 +01:00
Irmen de Jong
24944ad49e added string.strip() and string.trim() and l/r variants.
fixed memsizer for pointers-to-ubyte.
2024-02-07 02:09:08 +01:00
Irmen de Jong
344a1b9eb8 cx16: added cx16.get_program_args() and cx16.set_program_args() 2024-02-04 11:35:13 +01:00
Irmen de Jong
a14c192ea3 also other targets 2024-01-18 22:31:34 +01:00
Irmen de Jong
03831a7394 added cx16.cpu_is_65816() 2024-01-18 19:30:18 +01:00
Irmen de Jong
66a836d094 added support for reverse() on split word arrays 2024-01-16 00:52:09 +01:00
Irmen de Jong
7de665d1e4 support for split wordarrays rol/ror and rol2/ror2
optimized rol and ror codegen

optimize/fix ror/ror2/rol/rol2 on word arrays
2024-01-15 03:22:37 +01:00
Irmen de Jong
0a356ba73a added containment check of float arrays 2024-01-14 14:14:09 +01:00
Irmen de Jong
41de8caa13 added sprites.set_mousepointer_image(), sprites.set_mousepointer_hand() and sprites.get_data_ptr() 2024-01-14 00:38:56 +01:00
Irmen de Jong
bc3f2db3de Fix call graph to no longer mark subroutines unused, that still get their variables referenced somewhere.
Revert palette.default_colors_16[] back to palette.set_default16.colors.
2024-01-11 22:12:01 +01:00
Irmen de Jong
06bedb7adb added palette.get_color() and palette.default_colors[] 2024-01-11 21:27:18 +01:00
Irmen de Jong
38dc7fb7bd IR: added SCC and SCS instructions 2024-01-09 01:41:37 +01:00
Irmen de Jong
aa4cd13c31 where to place vscode syntax files. 2024-01-08 00:09:21 +01:00
Irmen de Jong
8e6b91cb9e some optimizations 2024-01-06 00:44:00 +01:00
Irmen de Jong
334e6dca28 added string.contains().
fixed string and array containment check for length 1.
2024-01-05 20:46:26 +01:00
Irmen de Jong
19a2110ba2 fix exit() now actually correctly setting the return code in A
also, moved some cleanup stuff such as CLRCHN from exit() to the cleanup routine that is always called.
finally, also call the cleanup routine when  %option no_sysinit is used
2024-01-04 00:43:35 +01:00
Irmen de Jong
813007a5d8 adjusted options of library modules 2023-12-29 22:21:44 +01:00
Irmen de Jong
01bd648cb2 added math.crc16() and math.crc32() 2023-12-29 08:00:02 +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
a0594cbce3 const optimizer now knows about a bunch of library functions, such as math.* 2023-12-28 20:14:13 +01:00
Irmen de Jong
09c6cb4d6b replace unwritten vars by consts. Improved const eval.
Fixed some slight bugs in library code
2023-12-28 05:17:15 +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