Irmen de Jong
8dfa0bc38c
fix a compiler crash in certain vardecl initialization expressions
2023-11-28 21:01:58 +01:00
Irmen de Jong
ee4da1a757
fix floats.parse_f() to use new kernal routine address for VAL
...
gives error message if it detects issues f.ex. with new kernal version that moves the routine
2023-11-27 23:58:28 +01:00
Irmen de Jong
ae2d96c455
added peekf
and pokef
builtin functions. Fixed sizeof() to allow number argument as well.
2023-11-27 23:36:02 +01:00
Irmen de Jong
6d8fbe0877
fixed float array indexing with an expression
2023-11-27 20:54:49 +01:00
Irmen de Jong
2fa1d8f2e8
fix vm string hash
2023-11-27 01:27:50 +01:00
Irmen de Jong
533090a68e
fix expression result register of square, callfar, string compare functions in certain situations
2023-11-26 23:02:10 +01:00
Irmen de Jong
1dff59e1d6
added string.hash()
2023-11-26 22:14:08 +01:00
Irmen de Jong
2764d235a9
optimizing for x in 0 to something
2023-11-25 21:37:27 +01:00
Irmen de Jong
45debff89f
bmx: allow palette to be loaded into memory buffer instead of vram
2023-11-25 17:58:43 +01:00
Irmen de Jong
c45fbe6310
continue stmt added
2023-11-25 01:14:35 +01:00
Irmen de Jong
6a40f23578
cx16: added bmx library module and showbmx example
2023-11-24 23:39:05 +01:00
Irmen de Jong
82a15b5a16
65C02 cpu: use TRB and TSB instructions for in-place AND/OR.
2023-11-24 00:50:52 +01:00
Irmen de Jong
98570ac456
cx16: optimized sys.set_rasterline()
2023-11-23 00:02:04 +01:00
Irmen de Jong
ba67fd318b
renamed cx16.VERA_IRQ_LINE_L to VERA_IRQLINE_L and added VERA_SCANLINE_L, to align with official register naming.
...
Also added a multi-irq example for the X16 to show the updated irq handler semantics.
2023-11-22 18:36:24 +01:00
Irmen de Jong
08ac459a41
breaking change: sys.set_irq() and sys.set_rasterirq() no longer have useKernal parameter! The irq handler routine must return a boolean instead in the A register.
...
When it returns true it means run the system IRQ handler afterwards. When it returns false, the system handler is NOT ran afterwards.
2023-11-21 23:22:53 +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
62d3f01948
fix name check in inline asm
...
this no longer removes a subroutine that is otherwise only called from inlined asm.
2023-11-21 01:26:50 +01:00
Irmen de Jong
af5ca2d0b8
vm: treat floats as 64 bits doubles. 0.0 printed as "0".
2023-11-21 00:57:56 +01:00
Irmen de Jong
2637939e62
cx16.vaddr_clone now leaves vera CTRL selected port intact
2023-11-17 19:22:23 +01:00
Irmen de Jong
faf05582f8
improved cx16 emudbg library
2023-11-17 15:07:21 +01:00
Irmen de Jong
161c02ced3
message
2023-11-17 00:37:12 +01:00
Irmen de Jong
ff8de8e42d
removing redundant compares
2023-11-16 22:56:19 +01:00
Irmen de Jong
42db3085df
improve the way %option merge works, you can now merge your own code with library code for instance.
2023-11-14 23:04:13 +01:00
Irmen de Jong
0c9daf6eaf
fix compiler crash on ptrvar[n+1] = ptrvar[2]
2023-11-14 21:46:11 +01:00
Irmen de Jong
159f80d629
next version
2023-11-14 19:06:47 +01:00
Irmen de Jong
aa949165c7
diskio.f_open_w() error handling back to what it was before
...
Otherwise it eats the status message. Added comment that you have to check this manually to be sure if the call succeeded or not!
2023-11-12 21:14:06 +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
76c09da961
make pokemon() be like poke, but also return the old value in the memory location.
2023-11-09 22:48:44 +01:00
Irmen de Jong
ee2888e744
verafx.mult/muls now return upper 16 bits of the result in r0
2023-11-06 21:55:58 +01:00
Irmen de Jong
efe4df92dc
optimize when with const value (remove other choices from code)
2023-11-06 00:08:07 +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
e7178ee496
optimized comparison with word variables
2023-11-05 00:20:12 +01:00
Irmen de Jong
3277544295
optimize assigning word array value to byte variable
2023-11-04 00:33:50 +01:00
Irmen de Jong
f68b46fc60
add a %zpallowed option to specify the range of zeropage register that can be used
2023-11-03 00:19:25 +01:00
Irmen de Jong
16b24fadea
gfx2 future mode, upgrate to Kotlin 1.9.20
2023-11-01 23:18:44 +01:00
Irmen de Jong
2ceaa25181
optimized code for (infrequently used) logical operations on word array
2023-10-29 23:41:34 +01:00
Irmen de Jong
513611c5a6
IR: using EXT more
2023-10-29 02:57:21 +01:00
Irmen de Jong
7ec4ba40ad
optimize asmsub arg evaluation order and stack usage
2023-10-28 17:29:00 +02:00
Irmen de Jong
92374e122b
IR: optimize concat with msb 0 into ext
2023-10-28 12:53:41 +02:00
Irmen de Jong
94f12732ab
add math.diff() and math.diffw()
2023-10-27 22:36:43 +02:00
Irmen de Jong
d88c09b098
fix signed byte to word casting issue uw = 8888 + (bb as ubyte)
2023-10-17 22:54:33 +02:00
Irmen de Jong
893b383bdf
fix signed byte to word sign extension in assignment
2023-10-17 03:08:37 +02:00
Irmen de Jong
dd7c9d62e6
remove assigment splitter, it now caused code bloat instead of more efficient code
2023-10-16 02:07:22 +02:00
Irmen de Jong
97c5c90eff
fix codegen for var1>>=var2 and var1<<=var2 when var2 is zero
2023-10-16 00:04:21 +02:00
Irmen de Jong
1fb94e7a7b
monogfx and gfx2: flood fill uses optimized horizontal line drawing
2023-10-15 23:19:11 +02:00
Irmen de Jong
daca87c6d0
added -breakinstr compiler option
2023-10-15 21:55:09 +02:00
Irmen de Jong
203ec5fa46
implement taking address of array var with variable index
2023-10-15 20:24:48 +02:00
Irmen de Jong
9ea69c07b8
optimize word array reads with indexvar
2023-10-14 07:30:54 +02:00
Irmen de Jong
68e62e4bd2
added cx16.MCIOUT() kernal call
...
correct case of several other cx16 kernal calls.
corrected to upper case: cx16 kernal calls CLOSE_ALL, LKUPLA, LKUPSA, JSRFAR, PRIMM, MACPTR.
2023-10-09 22:44:36 +02:00
Irmen de Jong
a48ce35f0b
added %option verafxmuls
2023-10-05 22:06:33 +02:00
Irmen de Jong
ee81da14d6
cx16: removed monochrome modes from gfx2 (use monogfx instead). New screen mode numbering!
...
programs will now be a lot smaller than before if they use gfx2 (or monogfx if they were only using monochrome drawing)
monogfx also fixes some drawing errors with small horizontal lines, and stippled vertical lines.
2023-10-05 02:12:46 +02:00
Irmen de Jong
6395d1908e
cx16: added monogfx library module, replaces gfx2 for monochrome screenmodes.
2023-10-04 22:32:13 +02:00
Irmen de Jong
b7a622c68e
fix alignment of uninitialized arrays in aligned blocks (make them initialized with zeros so they don't end up in the BSS section)
...
fix alignment of uninitialized arrays in aligned blocks (make them initialized with zeros so they don't end up in the BSS section)
2023-10-04 00:12:36 +02:00
Irmen de Jong
a8507b437d
add verafx.transparency()
2023-10-03 01:47:52 +02:00
Irmen de Jong
e505bf9ccf
added "emudbg" library (cx16 only) to interface with the emulator
2023-10-02 22:23:09 +02:00
Irmen de Jong
c3f1f09ad1
added verafx.clear()
2023-10-02 01:34:56 +02:00
Irmen de Jong
70ee2026ff
fix gfx2 screen fill broken when using verafx
2023-10-02 00:12:48 +02:00
Irmen de Jong
690782bf60
added -verafxmul compiler option to use vera fx multiplication routine on cx16
2023-10-01 22:44:45 +02:00
Irmen de Jong
a684ea46e4
fix c64 zp test and improve error for text encoding problem
2023-09-29 01:25:05 +02:00
Irmen de Jong
8fbe13f99d
c64: $a5 removed from free ZP (it's actually used by kernal disk routines)
2023-09-29 00:28:04 +02:00
Irmen de Jong
452e9e275f
diskio module: set correct read or write i/o channel every time f_read or f_write is called
2023-09-28 23:39:37 +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
390263a34e
added cx16 verafx library module
2023-09-24 23:00:40 +02:00
Irmen de Jong
36e8f10d2b
vm: remove BEQR opcode -> CMP + BSTEQ
2023-09-23 11:42:58 +02:00
Irmen de Jong
cdf5a8f20f
vm: remove BNE opcode -> CMPI + BSTNE
2023-09-23 11:22:33 +02:00
Irmen de Jong
eb64d92333
vm: remove BEQ opcode -> CMPI + BSTEQ
2023-09-23 11:21:43 +02:00
Irmen de Jong
9d7131d9f6
vm: setting status bits
2023-09-22 22:50:20 +02:00
Irmen de Jong
229c1114dd
vm: fixed array initialization values with address-ofs
2023-09-19 23:54:18 +02:00
Irmen de Jong
885df9156f
todo
2023-09-19 00:08:17 +02:00
Irmen de Jong
c319233ddc
ir: added preparecall 'meta' instruction for functioncalls
2023-09-18 23:22:03 +02:00
Irmen de Jong
880c0a5da8
allow taking address of array element
2023-09-18 04:37:41 +02:00
Irmen de Jong
ccf6e32bf9
adding setlsb() and setmsb() builtin functions to 6502 codegen
2023-09-17 15:16:47 +02:00
Irmen de Jong
a1874f6f00
adding setlsb() and setmsb() builtin functions to 6502 codegen
2023-09-17 01:48:29 +02:00
Irmen de Jong
95e4490a8a
adding setlsb() and setmsb() builtin functions
2023-09-15 02:39:16 +02:00
Irmen de Jong
31c132c2eb
several optimizations and compiler error fix for @(&var) and @(&var+1)
2023-09-14 23:04:23 +02:00
Irmen de Jong
03e0d4b2e8
reducing expression codegen complexity (no longer splitting conditional expressions, and using r9 as temp var)
2023-09-13 01:08:42 +02:00
Irmen de Jong
0bbbb12ed2
fix bench8 examples
2023-09-05 23:40:54 +02:00
Irmen de Jong
b570bdaed7
fix codegen for array[i] += float expression
2023-09-05 22:38:52 +02:00
Irmen de Jong
c15c10a94e
fixed 'unroll CONSTANTEXPR' compiler errors
2023-09-05 01:03:35 +02:00
Irmen de Jong
eb018ae660
code optimization for bytearray[x] +/- bytearray[y]
...
use adc array,y or sbc array,y instead of tempvar
2023-09-04 23:01:53 +02:00
Irmen de Jong
7e5a9474fe
improve plasma example
2023-09-04 20:35:43 +02:00
Irmen de Jong
10d0b03a90
use less tempvars
2023-09-03 01:32:47 +02:00
Irmen de Jong
e1b3582f08
fix wordvar -= @(memory)
2023-09-03 01:12:26 +02:00
Irmen de Jong
95be1c9e22
fix optimized swapped in-place byte comparisons
2023-09-03 00:47:55 +02:00
Irmen de Jong
3b786c819d
avoid using temp var even more
2023-09-01 23:47:01 +02:00
Irmen de Jong
04959dbd8b
optimize asm: don't use temp var for some additions
2023-09-01 22:24:17 +02:00
Irmen de Jong
09a7a4bbe5
optimize comparison against zero
2023-09-01 02:28:11 +02:00
Irmen de Jong
ff35ba3696
added warnshadow cli option to enable assembler warnings about symbol shadowing
2023-08-28 16:41:46 +02:00
Irmen de Jong
77f3852cdc
added floats.parse_f()
2023-08-16 14:47:20 +02:00
Irmen de Jong
be06d871b6
fix code for bitwise shifts by zero
2023-08-14 21:49:13 +02:00
Irmen de Jong
f98ee326b4
error when doing txt.print('@') where "@" was intended (byte for string parameter)
2023-08-14 19:25:31 +02:00
Irmen de Jong
bc8126eb16
2x faster word multiplication routine
2023-08-14 18:11:30 +02:00
Irmen de Jong
4c8beefdcb
slightly faster integer bytes multiplication routine
2023-08-14 17:00:16 +02:00
Irmen de Jong
2c9e50873c
use math.square for optimized X*X calculation (words only).
...
Added IR SQUARE instruction.
2023-08-14 01:05:17 +02:00
Irmen de Jong
e3fbe37f9f
fixed optimized code for >= and <=
2023-08-12 13:45:08 +02:00
Irmen de Jong
dc870cd5ea
fixed optimized code for > and <
2023-08-12 13:15:32 +02:00
Irmen de Jong
b92e22e4a6
IR: fix for loop over range with step
2023-08-11 03:05:47 +02:00
Irmen de Jong
3e6d16a7a8
add error message for invalid step size in range expression
2023-08-11 02:35:52 +02:00