Commit Graph

2028 Commits

Author SHA1 Message Date
Irmen de Jong
932bbd0381 allow casting of byte<->ubyte and word<->uword 2023-12-29 16:23:24 +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
dfce292294 allow chained comparisons i<x<j (desugared into: i<x and x<j) 2023-12-28 01:18:59 +01:00
Irmen de Jong
2eb137618e refactor block options 2023-12-26 22:13:08 +01:00
Irmen de Jong
0a4de45453 get rid of vardecl.declareddatatype 2023-12-26 19:33:58 +01:00
Irmen de Jong
ffdc658dc8 type error tweaks 2023-12-26 18:49:01 +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
8ae435549d added -slabshigh N and -slabsgolden for memory() slabs 2023-12-23 20:45:30 +01:00
Irmen de Jong
4cd9bb8f99 allow Python-style negative array indexing to count from the end 2023-12-23 16:37:28 +01:00
Irmen de Jong
ad9eaeafeb call now returns a word value 2023-12-22 22:24:11 +01:00
Irmen de Jong
6cd392909c added verafx.copy() routine for fast vram-to-vram copying ('blitting') 2023-12-22 17:52:43 +01:00
OODLER
e7698686fa
fixed a glitch in the prog8/vtui example (#117)
When the program starts, before the screen is modified, save_rec
is called to capture the cx16 logo.

The fix was to not do the second call to save_rec until after
vtui is used to draw the boxes on the screen.

Before the this fix, the initial replacement issue was of the
logo and not the portion of the screen originally modified by
vtui.
2023-12-20 23:49:47 +01:00
Irmen de Jong
6bc079c7b7 more asm symbol prefixing: variables with p8v_, subroutines with p8s_ etc
labels with p8l_ . All this to avoid symbol clashes in the generated assembly code.
Everything got its own distinguishing prefix so we're done with it once and for all and have only 1 breaking change moment.
2023-12-20 22:20:59 +01:00
Irmen de Jong
299419917e added symbol ambiguity error (variable vs block name for scoped symbols)
fixes #114
2023-12-20 00:28:15 +01:00
Irmen de Jong
69f6afe420 block names in asm now prefixed with p8b_ (instead of p8_)
as part of fixing var versus block symbol conflict handling
2023-12-19 23:00:20 +01:00
Irmen de Jong
e14b854d7b cx16: added audio kernal routines example 2023-12-19 01:47:05 +01:00
Irmen de Jong
8bd7c601c0 cx16: added all remaining audio kernal routines. added the three x16edit kernal entry points. 2023-12-18 22:16:44 +01:00
Irmen de Jong
997288fa03 added cbm.CLEARST() to reset ST to 0 2023-12-18 01:20:24 +01:00
Irmen de Jong
ae66fcac1e added call builtin function for indirect JSR 2023-12-17 15:45:28 +01:00
Irmen de Jong
a8be94de6b better error message when attempting to cast a float to integer 2023-12-15 22:28:06 +01:00
Irmen de Jong
b24df31c2b IR: fix codegen for routines returning in CPU Status register flag 2023-12-14 21:16:14 +01:00
Irmen de Jong
58400f53bc optimize: flip if true/else blocks if the else block only contains a jump (inverting the condition) 2023-12-13 22:06:53 +01:00
Irmen de Jong
a546c2247d optimize if-else handling of asmsub boolean result in status flags 2023-12-13 04:03:21 +01:00
Irmen de Jong
0da9142009 asm: also work for asmsub that return N or Z flag (Carry already worked) 2023-12-13 02:11:15 +01:00
Irmen de Jong
e98e951834 fix chained assignment and multi-vardecl RHS evaluation 2023-12-10 16:44:51 +01:00
Irmen de Jong
2668bf8519 fix void optimization issue 2023-12-09 21:48:22 +01:00
Irmen de Jong
ef1c665b9a allow underscores for numerical grouping 2023-12-09 13:13:34 +01:00
Irmen de Jong
e076b3aedc fix multi-var decl in nested scopes 2023-12-09 12:07:09 +01:00
Irmen de Jong
1bdc427d73 multi var declarations ubyte x,y,z 2023-12-08 22:18:21 +01:00
Irmen de Jong
6a639ce533 chained assignments x=y=z=42 2023-12-08 01:07:16 +01:00
Irmen de Jong
5a776dd690 improve KotlinJavaRuntime library ref 2023-12-06 22:52:39 +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
f998888d6d fix some unicode identifier issues 2023-12-05 17:38:23 +01:00
Irmen de Jong
b09e0a05bf some tweaks to errors about long integer literals 2023-12-03 02:45:26 +01:00
Irmen de Jong
c609e982fe allow const expression intermediate values to be 32 bits integers to avoid needless overflow errors. 2023-12-03 01:48:12 +01:00
Irmen de Jong
ead8c59bda allow all character encodings on all compilation targets. 2023-12-02 20:59:50 +01:00
Irmen de Jong
1509de390e various fixes
print_f() no longer prints a leading space.
Better error message if using float in for loop.
Fix crash when using non-const as when choice value.
VM print_f() more closely resembles the CBM version.
2023-12-02 18:23:54 +01:00
Irmen de Jong
88a1aa4f3d fix invalid optimization for integers (X/C1)*C2 , only ok for floats because of int rounding 2023-12-01 23:17:49 +01:00
Irmen de Jong
172e78e8f2 ir: ignore empty chunks instead of crashing 2023-12-01 22:49:20 +01:00
Irmen de Jong
e40ebd75a2 floats.parse_f uses kernal VAL if it's present 2023-11-30 23:50:50 +01:00
Irmen de Jong
992732f2cb bmx support to save partial screens ('stamps') 2023-11-30 22:17:57 +01:00
Irmen de Jong
b58a3ba1bb added cx16 sprites.move , movex and movey routines to move sprite by deltas 2023-11-30 20:49:47 +01:00
Irmen de Jong
afe521b0c9 simplify bmx loading 2023-11-29 21:57:17 +01:00
Irmen de Jong
5d9caef45f bmx can load "stamps" 2023-11-29 21:07:22 +01:00
Irmen de Jong
278e2f5605 preparing for working kernal FP VAL_1() call 2023-11-29 00:27:02 +01:00
Irmen de Jong
1e299bf360 better pokef() code 2023-11-28 23:04:27 +01:00