Commit Graph

3119 Commits

Author SHA1 Message Date
Irmen de Jong
b93fa75377 consolidate cbm textio routines 2024-03-28 00:39:58 +01:00
Irmen de Jong
681ce9c60c fix void warning 2024-03-27 23:05:41 +01:00
Irmen de Jong
dd0f0fe415 conv.str_ub and partners are now much shorter routines than before 2024-03-27 22:34:44 +01:00
Irmen de Jong
119040fc50 also add diskio.status_code() in other comp targets 2024-03-27 20:05:39 +01:00
adiee5
551e5688da
Add diskio.status_code() function (#130) 2024-03-27 19:42:47 +01:00
Irmen de Jong
56c1035581 Merge branch 'master' into multi-assign
# Conflicts:
#	docs/source/todo.rst
#	examples/test.p8
2024-03-26 22:09:16 +01:00
Irmen de Jong
ba1e907c79 fix divmod; out args are written to and should be potential constants 2024-03-26 22:04:44 +01:00
Irmen de Jong
2a3a27c56d bmx library: set bpp header field correctly on save 2024-03-26 22:01:10 +01:00
Irmen de Jong
993be6394e unit tests multi-assigns 2024-03-25 23:20:03 +01:00
Irmen de Jong
edc83305a4 allow multiple targets in AssignTarget 2024-03-22 21:51:08 +01:00
Irmen de Jong
ad4880997a no operand swap on logical expressions with shortcircuit evaluation (and,or are no longer associative!) 2024-03-20 22:34:48 +01:00
Irmen de Jong
592becc126 allow %breakpoint also in if/else blocks and other anonymous scopes 2024-03-19 23:31:21 +01:00
Irmen de Jong
c38765301e gfx2 screenmode tweak 2024-03-19 01:21:56 +01:00
Irmen de Jong
d14c61b160 added string.findstr(). string.find() returns 255 if not found.
also fix string assignment bug for sub args.
2024-03-17 23:18:33 +01:00
Irmen de Jong
fe2b67998c vm: fix load_raw, fix rng bug in textelite (carry flag shifting...) 2024-03-17 16:46:26 +01:00
Irmen de Jong
04df3c9f7f vm: implemented in-place array multiplication better 2024-03-17 13:39:05 +01:00
Irmen de Jong
de3d0b40dc fixed vm problem with branching instructions in global init chunk 2024-03-17 13:22:17 +01:00
Irmen de Jong
4db4a5f1b2 vm: txt.width() and height() now return the actual console terminal width and height if possible. 2024-03-16 22:40:08 +01:00
Irmen de Jong
5a0524ff4d various fixes 2024-03-16 18:48:06 +01:00
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
3535c1acda fix broken boolean != comparison optimization 2024-03-13 20:23:42 +01:00
Irmen de Jong
33c8caac8f get rid of containment expression restriction 2024-03-12 23:39:54 +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
2a8b65e29c test str to uword change in function params 2024-03-10 23:48:58 +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
eef8ae00b8 replace str return type by uword 2024-03-09 15:38:46 +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
f46896fd74 attempt to no longer have BuildVersion.kt in git, blocking easy pulls
(cherry picked from commit bfcf07c1a2)
2024-03-08 23:36:35 +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
267ea13e8c clearer error msg 2024-03-06 20:10:10 +01:00
Irmen de Jong
04f7b772a3 lib updates, removed unused and obsolete http and dbus modules 2024-03-05 23:42:35 +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
9826d7c494 optimize certain boolean comparisons more 2024-03-05 03:09:53 +01:00
Irmen de Jong
c6bf57b390 non strict bools should also replace not byte with byte==0 2024-03-04 23:25:34 +01:00
Irmen de Jong
bfcf07c1a2 attempt to no longer have BuildVersion.kt in git, blocking easy pulls 2024-03-04 20:45:59 +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
607275ec66 tweak 2024-03-03 19:52:46 +01:00
Irmen de Jong
e55cde2a81 more nonstrictbool conversions 2024-03-03 19:43:48 +01:00
Irmen de Jong
84afb374e6 nostrictbool array conversions 2024-03-03 17:48:52 +01:00
Irmen de Jong
f29d24e96a fixup split words array comparisons 2024-03-02 23:19:55 +01:00
Irmen de Jong
af17f903ee fix that if not fcall() wasn't transformed to a conditional branch instruction 2024-03-02 23:19:39 +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
dba0846866 optimize word >, word <= 2024-03-02 23:19:39 +01:00
Irmen de Jong
bed629998a fix large code for some compares 2024-03-02 23:19:39 +01:00
Irmen de Jong
2a1fec2ed2 fix codegen error for comparisons 2024-03-02 23:19:39 +01:00
Irmen de Jong
b941d6f1e4 new comparison tests 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
a5110b1f96 improved De Morgan rewrite rules 2024-03-02 23:19:39 +01:00
Irmen de Jong
006713fe13 optimize boolean to ubyte assignment (skip type cast) 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
7d8cdcbfea more bool fixes and optimizations in codegen 2024-03-02 23:19:39 +01:00
Irmen de Jong
10d12f73d6 IR/VM: testing the boolean changes, added in-place and/or. 2024-03-02 23:19:20 +01:00
Irmen de Jong
cd9119655c IR codegen 2024-03-02 23:19:20 +01:00
Irmen de Jong
41afeccd51 compiler stuff 2024-03-02 23:19:20 +01:00
Irmen de Jong
6b87cbb703 optimizers 2024-03-02 23:19:20 +01:00
Irmen de Jong
bc2b38daf4 added PtBool and other changes to intermediate Ast 2024-03-02 23:19:20 +01:00
Irmen de Jong
f40b7b62bb updated unit tests and some basic changes for them 2024-03-02 23:19:20 +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
4e1686f6e3 fix warnings in gradle build scripts 2024-02-22 10:34:51 +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
96b5a30f60 slightly less strict 2024-02-20 23:01:51 +01:00
Irmen de Jong
0e17a0474a added type check to catch invalid comparisons, fix maze example 2024-02-20 22:53:15 +01:00
Irmen de Jong
01bbc2234e fix absorption law optimization, add 2 additional optimizations 2024-02-14 23:12:54 +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
4dc50cb551 fix unused subroutine removal not removing all unused subs 2024-02-10 21:26:53 +01:00
Irmen de Jong
5522a305ab add -dumpvars option to dump all allocated variables (zp, normal ram, etc) 2024-02-10 18:42:31 +01:00
Irmen de Jong
d7f72056fc rest of the array copying 2024-02-10 17:16:06 +01:00
Irmen de Jong
906d9d858c implementing the array copys 2024-02-10 01:40:36 +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
e941d2665a preparing for new array copy codegen 2024-02-09 18:22:41 +01:00
Irmen de Jong
68669dbef0 fix & of pointervar indexing 2024-02-08 23:03:53 +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
8485b8429f optimizing +=1/-=1 2024-02-06 23:49:40 +01:00
Irmen de Jong
358215e4dd removed postIncrDecr (still allow ++/-- to be parsed into +=1/-=1) 2024-02-06 18:50: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
abcdfd8e28 optimize postincrdecr on memory a bit 2024-02-03 22:33:27 +01:00
Irmen de Jong
b0f5b6925d getting rid of pointer[idx] in ast, instead always use @(ptr+idx) 2024-02-03 19:22:04 +01:00
Irmen de Jong
ef79d0c43e fix temp variable name clash resulting in faulty code in certain common subexpression optimization 2024-02-03 19:20:28 +01:00
Irmen de Jong
78b4288005 avoid git's line ending translation for this test... 2024-02-03 14:57:25 +01:00
Irmen de Jong
680f5d21ee normalize DOS line endings to just \n, fixes source lines in asm for \r\n source files 2024-02-03 12:53:21 +01:00
Irmen de Jong
c71aa0895f get rid of certain redundant !=0 comparisons in logical expressions 2024-02-01 21:50:01 +01:00
Irmen de Jong
932035cdc5 flag "returning a statement" as a syntax error 2024-01-31 21:36:39 +01:00
Irmen de Jong
64d8943b7d fix error when trying to post-inc/decrement a character in a string 2024-01-28 16:47:55 +01:00
Irmen de Jong
1816bda7ea extra check 2024-01-26 00:12:31 +01:00
Irmen de Jong
d4a2031c07 fix certain assignment data type mismatch crash 2024-01-25 21:14:20 +01:00
Irmen de Jong
8cf0b6cf51 IR: optimize code for ==0 and !=0 augmented assigns 2024-01-25 00:30:47 +01:00
Irmen de Jong
64c132ee0a changed -breakinstr option so that you now specify the exact instruction to use for a %breakpoint.
also fixed a IR issue with x=not x.
2024-01-22 22:01:47 +01:00