Irmen de Jong
1d38c3582a
progstart() added to complement progend()
2024-11-13 19:29:50 +01:00
Irmen de Jong
4f9693055e
fix compiler crash when extsub has both FAC1 and FAC2 float parameters
2024-11-11 20:48:25 +01:00
Irmen de Jong
bf98ceca2c
make repeat support 65536 iterations
2024-11-11 01:58:27 +01:00
Irmen de Jong
1b528491c2
make %memtop exclusive i.e. the first address NOT to use (like kernal MEMTOP)
2024-11-10 23:35:25 +01:00
Irmen de Jong
84f5ffa426
fix generated labels prefix and filtering in the vice symbol dump file
2024-11-10 15:34:35 +01:00
Irmen de Jong
a50400b7d1
initial neo6502 target
2024-11-08 19:04:49 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
c702c4a6df
internal rename of romsub to extsub
2024-11-06 21:42:16 +01:00
Irmen de Jong
77e376f6bf
romsub @bank now also accepts a variable so the bank can be dynamic
2024-11-06 00:02:36 +01:00
Irmen de Jong
491e5dbcfb
move the program startup and cleanup machinery to the front of the program to keep it in system ram
2024-11-05 22:12:25 +01:00
Irmen de Jong
a5c7393561
tweaking program startup and cleanup stuff
2024-11-05 21:12:27 +01:00
Irmen de Jong
7fd3e9bb7d
also provide a X16-style JSRFAR implementation for the C64. Enable callfar() and callfar2() on the C64 and C128.
2024-11-05 19:26:58 +01:00
Irmen de Jong
459e9f8f3b
jsrfar stuff
2024-11-05 01:06:06 +01:00
Irmen de Jong
5b1143bcb3
C64: add support for calling romsub with bank ('jsrfar')
2024-11-04 23:26:21 +01:00
Irmen de Jong
fddd390d31
on the C64, if not using floats, disable basic ROM in startup to gain another 8Kb of RAM
...
MEMTOP is adjusted to $d000. This gives us 50 Kb of contiguous program RAM space. ($0801-$CFFF)
2024-11-04 22:11:44 +01:00
Irmen de Jong
85e87dfe2e
consolidate @rombank and @rambank into just @bank
2024-11-03 21:15:11 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +01:00
Irmen de Jong
7cfb33a448
tweak & fix if expression with word condition
2024-11-02 22:01:57 +01:00
Irmen de Jong
3b798097b9
added memtop to machine definition and asm source code check
...
added %memtop directive
2024-11-02 00:59:07 +01:00
Irmen de Jong
4b23b1dc86
don't always import math automatically anymore
2024-11-01 03:39:52 +01:00
Irmen de Jong
4b4af9b527
no longer silently add RTS to asmsubs that don't have one
2024-10-27 13:49:00 +01:00
Irmen de Jong
1f2d46628e
remove %option align_xxx (block level alignment, as we now have better alternatives)
2024-10-26 21:18:34 +02:00
Irmen de Jong
c9535049c8
%align directive and @align64
2024-10-26 20:58:35 +02:00
Irmen de Jong
9317cf8a35
sorting aligned vars to shrink prg size
2024-10-26 18:33:51 +02:00
Irmen de Jong
1cd754f05d
adding @alignword/page on individual variables
2024-10-26 17:00:38 +02:00
Irmen de Jong
97b8cb748d
more ifexpression codegen tweaks
2024-10-25 22:52:26 +02:00
Irmen de Jong
fdd18c615c
more ifexpresssion codegen tweaks
2024-10-23 21:04:55 +02:00
Irmen de Jong
c14f6cfc2b
more optimal if expression code
2024-10-22 23:49:24 +02:00
Irmen de Jong
9927af1095
about var inits
2024-10-22 01:08:42 +02:00
Irmen de Jong
a6159702da
defers are now only registered/called when flow of control actually reached the defer statement
...
a defer statement sets its corresponding bit in a bitmask that is shifted in the defer handler routine to see what defer blocks to call.
2024-10-21 00:55:51 +02:00
Irmen de Jong
9851d14fb9
added if expression: ubyte a = if b>0 44 else 55
...
it doesn't generate the best code yet, like regular ifs do.
2024-10-19 15:34:04 +02:00
Irmen de Jong
272a1001a8
fix bad optimization of floats.pop/push call
2024-10-18 21:04:18 +02:00
Irmen de Jong
ce7d094adb
Zig-like "defer" to clean up stuff when leaving the scope of the current routine.
2024-10-18 01:30:20 +02:00
Irmen de Jong
38ef394e15
IR codegen: global vars with numeric initialization value are now also put into the VARIABLESWITHINIT section rather than requiring explicit code instructions to initialize them in INITGLOBALS.
...
Note that something similar, such as putting those variables inline in the program initialized with their value and all, cannot be done for the 6502 codegen: the program needs a mechanism to reset ALL variables when it runs a second time.
2024-10-16 22:15:51 +02:00
Irmen de Jong
e9edffa9f0
remove support for array-to-array assignments (other than initialization of variable declaration)
...
Just use an explicit sys.memcopy(src, dest, sizeof(dest)) or assign array members individually.
2024-10-13 20:02:43 +02:00
Irmen de Jong
aef211e5f3
stricter array literal element type handling (number,bool,address-of).
...
More consistent implicit address-of handling if array literals contain by-ref identifiers (such as subroutine names)
2024-10-13 17:46:41 +02:00
Irmen de Jong
8d9bc2f5ff
fixing all sorts of things about assigning arrays to arrays
2024-10-12 12:33:46 +02:00
Irmen de Jong
eaa22a9d13
added callfar2() builtin function that allows to set A,X,Y and Carry arguments.
2024-10-08 21:36:04 +02:00
Irmen de Jong
e83d0ee820
fix crash in msb() when assigning to word again. Fix wrong register in lsb() and msb() in certain situations.
2024-10-02 02:40:16 +02:00
Irmen de Jong
3cf39e072e
fix C64 floating point sign issue
2024-09-30 21:56:34 +02:00
Irmen de Jong
a064ade1e0
better codegen for call() function
2024-09-29 23:18:51 +02:00
Irmen de Jong
df35aa7942
added (experimental) compression library
2024-09-29 18:59:53 +02:00
Irmen de Jong
cd49c5f88d
cx16: set rom bank to 0 at startup (for faster kernal API calls)
...
cx16: callfar() with constant address generates shorter asm
2024-09-28 20:58:29 +02:00
Irmen de Jong
1541ad2160
fix variable init order mistake in program startup
...
reset multiply bit at end of verafx.muls
2024-09-28 19:17:45 +02:00
Irmen de Jong
3f630ab1b0
RAW output now also properly initializes variables
2024-09-27 18:46:03 +02:00
Irmen de Jong
04cb684fd4
tweak program start initialization and fix cleanup at exit for atari and pet compiler targets
2024-09-27 02:14:54 +02:00
Irmen de Jong
d3e4481112
fix asm optimizer bug where it erroneously discarded rts
with a label
2024-09-22 21:41:41 +02:00
Irmen de Jong
2954f5f04d
Add clear_screen and set_screen_mode to gfx_lores. Fix boolean draw vs color param in some monogfx routines. Elaborate some docs.
2024-09-17 22:19:47 +02:00
Irmen de Jong
c7b1e8d772
fixed a variable scopedname issue where it took the fully scoped name instead of just the local name
...
this made 64tass not strip out that code if it was unused
2024-09-14 23:17:26 +02:00
Irmen de Jong
5986dcdd2f
add new containment check codegen for IR
2024-09-12 22:04:20 +02:00