Commit Graph

106 Commits

Author SHA1 Message Date
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
8b8caa1c2e added math.randrange() and math.randrangew() 2024-02-10 22:16:13 +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
66a836d094 added support for reverse() on split word arrays 2024-01-16 00:52:09 +01:00
Irmen de Jong
0a356ba73a added containment check of float arrays 2024-01-14 14:14:09 +01:00
Irmen de Jong
38dc7fb7bd IR: added SCC and SCS instructions 2024-01-09 01:41:37 +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
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
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
73864c8101 added -check command line option 2023-12-26 15:45:55 +01:00
Irmen de Jong
f948917124 added floats.push() and floats.pop()
fixed vm pop.f
2023-12-26 15:19:49 +01:00
Irmen de Jong
0d44492086 push,pushw,pop and popw are no longer built-in functions but regular routines in sys 2023-12-26 14:47:31 +01:00
Irmen de Jong
796add0ee2 add string.isspace and string.isprint 2023-12-13 00:28:34 +01:00
Irmen de Jong
d91ca8b197 vm: added floats.str_f() 2023-12-07 23:10:27 +01:00
Irmen de Jong
745d192563 added floats.normalize() 2023-12-05 22:54:35 +01:00
Irmen de Jong
afbc91d1fc added string.isdigit, islower, isupper, isletter 2023-12-05 22:50:20 +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
2fa1d8f2e8 fix vm string hash 2023-11-27 01:27:50 +01:00
Irmen de Jong
1dff59e1d6 added string.hash() 2023-11-26 22:14:08 +01:00
Irmen de Jong
a83e9d9a0a added sys.save_prog8_internals() and restore_prog8_internals() 2023-11-21 22:00:43 +01:00
Irmen de Jong
faf05582f8 improved cx16 emudbg library 2023-11-17 15:07:21 +01:00
Irmen de Jong
d73709653d remove unused interned strings in the resulting code (for example from removed if/else blocks) 2023-11-12 05:28:24 +01:00
Irmen de Jong
7ebc9c79cf added string.append()
cleanup redundant diskio prefixes
2023-11-10 23:53:59 +01:00
Irmen de Jong
31177a2b1b added sys.disable_caseswitch() and sys.enable_caseswitch() 2023-11-07 00:27:34 +01:00
Irmen de Jong
723ab54f97 optimized all circle routines a little more. Added gfx2/monogfx safe_circle and safe_disc. Warning for when on const value. 2023-11-05 21:29:59 +01:00
Irmen de Jong
72f1a779f2 optimize monogfx.fill() and gfx2.fill(), also don't read outside screen area 2023-11-04 14:30:51 +01:00
Irmen de Jong
94f12732ab add math.diff() and math.diffw() 2023-10-27 22:36:43 +02:00
Irmen de Jong
32becdbced add monogfx lib to virtual target 2023-10-24 00:16:25 +02:00
Irmen de Jong
836bc9d456 added verafx.available() 2023-10-10 22:12:21 +02:00
Irmen de Jong
cd40088636 vm: added math.mul16_last_upper() 2023-09-28 03:18:49 +02:00
Irmen de Jong
9b9e6f4af5 added math.mul16_last_upper() to fetch the upper 16 bits of the last word multiplication 2023-09-25 23:59:57 +02:00
Irmen de Jong
28bf0b61ce added math.log2() and math.log2w() 2023-09-01 00:42:15 +02:00
Irmen de Jong
77f3852cdc added floats.parse_f() 2023-08-16 14:47:20 +02:00
Irmen de Jong
4e863ecdac vm: fixed abs() and word-to-string conversion 2023-07-08 22:57:16 +02:00
Irmen de Jong
e9163aa3a7 added cx16.save_virtual_registers() and cx16.restore_virtual_registers() 2023-06-24 21:04:47 +02:00
Irmen de Jong
0aac9350d5 rename math.atan() to math.atan2() 2023-06-18 13:05:36 +02:00
Irmen de Jong
ff7f3484e4 atan 2023-06-17 23:01:47 +02:00
Irmen de Jong
c0b398e0ce add various math.atan() routines 2023-06-17 00:43:33 +02:00
Irmen de Jong
ba25b7fee6 fix diskio.diskname(). cx16: add diskio.curdir() 2023-06-07 22:38:51 +02:00
Irmen de Jong
c098ad2b3b fix vm minf/maxf 2023-05-17 23:18:14 +02:00
Irmen de Jong
b43223cb7a added clamp() builtin function and floats.clampf() 2023-05-17 23:12:58 +02:00
Irmen de Jong
1af38e62bc removed floats.fabs() and floats.sqrt()/fsqrt() 2023-05-17 00:46:15 +02:00
Irmen de Jong
85cf0e311c Merge branch 'master' into version_9
# Conflicts:
#	codeGenIntermediate/src/prog8/codegen/intermediate/ExpressionGen.kt
#	docs/source/todo.rst
#	intermediate/src/prog8/intermediate/IRInstructions.kt
2023-05-14 20:47:09 +02:00
Irmen de Jong
905921a684 IR: new (sys)call instructions that encapsulate the full subroutine call
to fix the bugs resulting from nesting subroutine calls (as param to another call etc)
2023-05-14 15:20:25 +02:00
Irmen de Jong
319079de7a sqrt 2023-05-02 01:19:53 +02:00