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
Irmen de Jong
8dfa0bc38c
fix a compiler crash in certain vardecl initialization expressions
2023-11-28 21:01:58 +01:00
Irmen de Jong
fde136fb7b
bmx module only supports 320 or 640 image widths for now
2023-11-28 20:38:52 +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
1b2296ad5b
move cx16 irq examples to new API, fix some bugs in the handler
2023-11-22 23:25:39 +01:00
Irmen de Jong
16851746d6
new X16 irq handler routines and examples
2023-11-22 20:03:21 +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
a6756d2cea
removed diskio.set_drive(), just set the diskio.drivenumber variable directly
...
there already wasn't a getter
2023-11-19 22:15:56 +01:00
Irmen de Jong
8e2c304b3c
txt.waitkey() now returns the key that was pressed
2023-11-17 20:31:19 +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
36758f41a4
fixed diskio.f_open_w() error handling, finally added f_seek_w() to be able to seek in files for writing.
2023-11-11 14:26:40 +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
f70fa42eac
more accurate palette conversion
2023-11-08 01:33:55 +01:00
markjreed
5698de6cf4
feat: requirements.txt for convertsprite.py ( #112 )
2023-11-08 01:32:41 +01:00
Irmen de Jong
c5a333a904
CX16: diskio.f_write() now uses fast MCIOUT block writes, including hiram bank boundary wrap-over
2023-11-08 01:12:49 +01:00
Irmen de Jong
70436f5dca
cx16.vpeek() use VERA_DATA0 instead of 1, to not cause ADDRSEL to be != 0 (interferes with kernal)
2023-11-07 22:09:53 +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
0904712a00
remove last trace of getTempVar (arry index expression)
...
tiny optimization
2023-10-27 21:41:52 +02:00
Irmen de Jong
335213b55f
tweaks
2023-10-21 02:16:58 +02:00
Irmen de Jong
3dc5a0e7f8
some arrays can be in BSS
2023-10-18 23:59:37 +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
68539d6cc9
micro tweaks adpcm.p8
2023-10-13 00:55:56 +02:00
Irmen de Jong
f75fd0811e
restructure play-adpcm example code, stream-wav can now play stereo adpcm wavs
2023-10-11 17:37:42 +02:00
Irmen de Jong
a37769aafe
cx16 adpcm example is now able to decode and play stereo music as well as mono.
2023-10-10 02:41:20 +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
a5cd3728c9
3d rotation multiplications now using verafx acceleration
2023-10-05 22:36:30 +02:00
Irmen de Jong
a48ce35f0b
added %option verafxmuls
2023-10-05 22:06:33 +02:00
Irmen de Jong
433832b329
gfx2.clear_screen and monogfx.clear_screen() now have color parameter to clear the screen with
...
this is much faster than filling a rectangle of the full screen size with a color.
2023-10-05 21:00:39 +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
ae6eeadf54
doc about range step value has to be a constant
2023-09-25 23:19:32 +02:00
Irmen de Jong
5268b05060
added bonkram chunk to chunkfile example
2023-09-25 22:24:40 +02:00
Irmen de Jong
390263a34e
added cx16 verafx library module
2023-09-24 23:00:40 +02:00
Irmen de Jong
55646edc3e
added cx16 chunkedfile example
2023-09-24 20:56:36 +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
00b0ec58b4
update to Antlr 4.13.1
2023-09-14 21:11:55 +02:00
Irmen de Jong
a1d0e5bb65
added list of software to docs
2023-09-13 21:51:48 +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
b500a0d477
c64: added a couple of routines that calculate the correct memory locations for video ram and sprite pointers etc. based on current VIC-II memory setup.
...
the examples with sprites, now use it.
2023-09-08 21:27:38 +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
8c0843cc87
fix an invalid 6502 instruction on c64 in certain float assignment
2023-09-05 21:54:52 +02:00
Irmen de Jong
31458ffd81
examples cleanup and improving c64 graphics module (shift bitmap to higher ram area)
2023-09-05 20:39:12 +02:00
Irmen de Jong
c15c10a94e
fixed 'unroll CONSTANTEXPR' compiler errors
2023-09-05 01:03:35 +02:00
Irmen de Jong
9fca978725
optimized plasma examples even more
2023-09-05 00:23:50 +02:00
Irmen de Jong
b125901717
added cx16 plasma example
2023-09-04 23:54:13 +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
5cd4b874ea
tweak sprites module
2023-09-01 21:25:19 +02:00
Irmen de Jong
9cc0cda0fb
added sprites library module (cx16 only)
2023-09-01 17:35:07 +02:00
Irmen de Jong
09a7a4bbe5
optimize comparison against zero
2023-09-01 02:28:11 +02:00
Irmen de Jong
2dc2429735
tweaks to the cx16 sprite example
2023-08-31 23:24:46 +02:00
Irmen de Jong
83d4592526
tweaks to the cx16 sprite example
2023-08-31 22:33:49 +02:00
Irmen de Jong
2d528c26ae
added cx16 sprite demo
2023-08-31 16:56:52 +02:00
Irmen de Jong
aa4d23a3d5
fix register stack saving on certain expression code that was broken on 6502 but not on 65c02
2023-08-29 11:50:35 +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
Irmen de Jong
dff1d9e4dd
cleanup range expression doc
2023-08-09 22:58:04 +02:00
Irmen de Jong
7c0bde7310
parser: allow curly brace on next line for asmsub too
...
downgrade antlr4 one version again to what is used in IntelliJ's antlr plugin, to avoid potential version conflicts
2023-08-09 20:01:12 +02:00
Irmen de Jong
a82d21ac05
fixed gfx2.plot in mode 1+5 with certain combinations of color and stipple
2023-08-08 00:01:43 +02:00
Irmen de Jong
0bf8378fcb
fixed gfx2.horizontal_line problem with monochrome stippling mode (regression since version 9.0)
...
todo
2023-08-07 22:56:07 +02:00
Irmen de Jong
017ef8a837
optimization of > and <= in expressions
2023-08-07 21:23:31 +02:00
Irmen de Jong
0d63cdcb96
optimization of < and >= in expressions
2023-08-07 04:54:35 +02:00
Irmen de Jong
68a6f99c9f
optimization of < in expressions
2023-08-07 02:32:07 +02:00
Irmen de Jong
60781bcfc4
optimization of == and != in expressions
2023-08-07 01:25:41 +02:00
Irmen de Jong
77fa2e2722
optimization in + or - assignment to word array
2023-08-05 23:28:40 +02:00
Irmen de Jong
c36afd872e
optimization in assignment to memory
2023-08-04 23:54:11 +02:00
Irmen de Jong
7e58a4c130
optimization in assignment to array
2023-08-04 23:06:55 +02:00
Irmen de Jong
19a4bf1088
clean up AugmentableAssignmentAsmGen a bit
2023-08-04 21:48:02 +02:00
Irmen de Jong
f2c62bee7e
docs
2023-08-01 22:49:55 +02:00
Irmen de Jong
1ae950a638
Merge branch 'remove_evalstack'
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
2023-07-31 21:57:43 +02:00
Irmen de Jong
9bb16e293c
vm: fix postincr/decr on indexed pointervariables
2023-07-31 19:37:30 +02:00
Irmen de Jong
a0ab0bd3e2
Merge branch 'master' into remove_evalstack
...
# Conflicts:
# examples/test.p8
2023-07-29 18:57:06 +02:00
Irmen de Jong
b89ad4b328
don't optimize empty where choice away! It would call the else clause incorrectly.
2023-07-29 18:25:52 +02:00
Irmen de Jong
c5219dfb3f
fix assignment of register into byte array
2023-07-28 22:16:01 +02:00
Irmen de Jong
e1b6bb154a
Merge branch 'master' into remove_evalstack
...
# Conflicts:
# compiler/res/prog8lib/cx16/gfx2.p8
# docs/source/todo.rst
# examples/test.p8
2023-07-28 02:09:45 +02:00
Irmen de Jong
970642244b
optimized gfx2.text() for hires 4c mode
2023-07-26 04:17:44 +02:00
Irmen de Jong
3b90be2d9e
gfx2.text() per-pixel positioning implemented for screen modes 1 and 5
2023-07-25 00:43:45 +02:00
Irmen de Jong
4575a8fffe
cx16: added cx16.vaddr_autoincr() and cx16.vaddr_autodecr()
2023-07-21 22:40:07 +02:00
Irmen de Jong
d5707b7bf3
rebuilding floating point stack evaluation (using cpu stack)
2023-07-20 00:45:04 +02:00
Irmen de Jong
9f247901d4
Merge branch 'master' into remove_evalstack
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# compiler/src/prog8/buildversion/BuildVersion.kt
# examples/test.p8
2023-07-16 23:45:04 +02:00
Irmen de Jong
5659742d97
fixed assigning byte to word not clearing msb sometimes
2023-07-16 23:16:32 +02:00
Irmen de Jong
450eaf7c4a
fixed lsb() to uword problem
2023-07-16 20:05:59 +02:00
Irmen de Jong
47485e4b49
added more missing codegen for bit shifts
2023-07-16 17:42:10 +02:00
Irmen de Jong
64254e758d
cleaned up cx16 keyboardhandler example and some compiler warnings for redundant else
2023-07-16 13:23:53 +02:00
Irmen de Jong
c1aa5d4e47
IR: optimized when statement translation
2023-07-16 12:10:46 +02:00
Irmen de Jong
ab8173637a
remove redundant asm optimizer
2023-07-16 11:15:28 +02:00
Irmen de Jong
3841cef497
implemented missing bitshift codegen (non-stack)
2023-07-15 22:26:56 +02:00
Irmen de Jong
b717f1c7eb
little refactor of huge if statement
2023-07-15 22:26:56 +02:00
Irmen de Jong
41af63b333
remove even more X register save/restore code
2023-07-15 22:26:54 +02:00
Irmen de Jong
84925ab69c
remove eval stack options
2023-07-15 22:24:19 +02:00
Irmen de Jong
b3cb9b7fe2
added optimizer to remove needless pha/pla pairs
2023-07-15 22:19:48 +02:00
Irmen de Jong
b8284a147d
allow boolean when conditions, optimize into a regular if
2023-07-11 21:33:29 +02:00
Irmen de Jong
795f80b4ec
fix forloop 6502 codegen in case of descending word values
2023-07-11 00:33:12 +02:00
Irmen de Jong
6b6427492d
fix forloop 6502 codegen in case of descending word values
2023-07-10 23:10:16 +02:00
Irmen de Jong
6055b8c3dc
IR: fix forloop codegen for steps != 1
2023-07-10 21:36:44 +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
5037033fcf
ir: EXT and EXTS opcodes now have 2 registers to avoid type clash
2023-07-08 22:42:11 +02:00
Irmen de Jong
4ced8889d3
cx16: fix signature return values of cx16.screen_mode(), add get_screen_mode() and set_screen_mode() convenience routines
2023-07-08 11:37:29 +02:00
Irmen de Jong
d26967a87d
ir doc
2023-07-07 22:35:05 +02:00
Irmen de Jong
071a80360f
ir: fix some problem with comparison against zero
2023-07-07 21:17:28 +02:00
Irmen de Jong
d2154f5f2e
remove empty when choices, fixes ir compilation error on those
2023-07-07 20:34:24 +02:00
Irmen de Jong
334d382bfa
ir: JUMPI instruction added to support indirect jumps
2023-07-07 19:10:39 +02:00
Irmen de Jong
90c4b00f74
ir: fix any() all() reverse() sort() on memory mapped arrays and on byte arrays
2023-07-07 17:25:32 +02:00
Irmen de Jong
71261525e8
fix containment check on memory mapped arrays
2023-07-07 17:07:34 +02:00
Irmen de Jong
3126959576
ir: several fixes
2023-07-07 16:53:32 +02:00
Irmen de Jong
f9200a2b75
fix IR loader for romsub calls (calls to an address)
2023-07-02 23:41:15 +02:00
Irmen de Jong
c544b7f5ba
fixing up p8_ prefixing
2023-07-02 21:15:05 +02:00
Irmen de Jong
bb95484c8a
uniform symbol prefixing with p8_
2023-07-02 06:15:09 +02:00
Irmen de Jong
0f6a98751a
tiny optimization
2023-07-02 06:13:22 +02:00
Irmen de Jong
aac5a4c27f
optimize word repeat loop codegen
2023-07-02 04:51:22 +02:00
Irmen de Jong
d3f6415387
vm: fix repeat 256
2023-07-02 02:38:35 +02:00
Irmen de Jong
e7b631b087
allow comment lines inside array initializer value
2023-06-27 23:30:37 +02:00
Irmen de Jong
a9f5dc036c
fix cpu stack corruption in array assignment codegen
2023-06-27 18:49:49 +02:00
Irmen de Jong
0a83b51e00
allow more curly brace styles
2023-06-27 01:59:22 +02:00
Irmen de Jong
eab63ecc6c
allow curly brace on next line also after subroutine and when
2023-06-27 01:29:25 +02:00
Irmen de Jong
b0794cf35e
added hiram bank number to -varshigh
2023-06-27 00:27:34 +02:00
Irmen de Jong
eae41de27d
improve errors generated for undefined symbols
2023-06-25 15:19:51 +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
8c617515ba
don't prefix 3-letter symbols too aggressively (could cause some compilation errors)
2023-06-23 23:36:59 +02:00
Irmen de Jong
04e4e71f2e
uword == str is now possible (sugar for string.compare)
2023-06-22 00:20:30 +02:00
Irmen de Jong
a587482edf
optimize dangling else
2023-06-18 13:46:02 +02:00
Irmen de Jong
0aac9350d5
rename math.atan() to math.atan2()
2023-06-18 13:05:36 +02:00
Irmen de Jong
f56c12ee4e
cx16 spotlight example
2023-06-18 12:49:22 +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
380f557c45
vm: implement split incr/decr
2023-06-03 22:22:13 +02:00
Irmen de Jong
9314c346da
-target option is now required; c64 no longer the default
2023-06-03 19:14:45 +02:00
Irmen de Jong
bfaad1388c
IR: handle split arrays without new custom opcodes
2023-06-03 01:51:02 +02:00
Irmen de Jong
bb35a80177
%option splitarrays now also at module level
2023-05-31 21:50:41 +02:00
Irmen de Jong
24fc95ac81
fix atari target syslib
2023-05-31 20:58:00 +02:00
Irmen de Jong
bb9d29b061
fix an array literal assignment type error for word arrays
2023-05-30 22:46:37 +02:00
Irmen de Jong
b9d8ec1463
add -splitarrays command line option
2023-05-30 19:08:34 +02:00
Irmen de Jong
bbc02752c9
use split word arrays in various examples, fix codegen issue, docs
2023-05-29 15:34:33 +02:00
Irmen de Jong
82898f7bba
fix some split array issues in 6502 codegen
2023-05-28 22:24:56 +02:00
Irmen de Jong
4a00a5ba9e
use split word arrays in various examples
2023-05-28 13:51:58 +02:00
Irmen de Jong
3ac9036c79
more split array stuff for 6502
2023-05-27 22:44:45 +02:00
Irmen de Jong
c94e292176
more split array stuff
2023-05-27 12:47:11 +02:00
Irmen de Jong
e18119e24c
Merge branch 'master' into split-arrays
2023-05-26 19:25:57 +02:00
Irmen de Jong
52a77db60f
adding split array type
2023-05-26 19:11:07 +02:00
Irmen de Jong
cdbccad21e
optimized gfx2 plot and horizontal_line a bit more
2023-05-23 20:29:17 +02:00
Irmen de Jong
e15bc68c9b
added gfx2.fill() flood fill routine
2023-05-23 00:50:10 +02:00
Irmen de Jong
0c94e377fc
Merge branch 'v8_maintenance'
2023-05-21 16:09:31 +02:00
Irmen de Jong
c69c17de42
cx16 avoid ram bank issue with RDTIM in sys.wait() and c64.RDTIM16()
2023-05-21 15:03:33 +02:00
Irmen de Jong
7215efe167
fix expr eval error in certain situations
...
such as pokew() with 2 complex operands
2023-05-20 17:42:35 +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
f37f062cdc
fix for loop pre-check
2023-05-17 00:33:55 +02:00
Irmen de Jong
7e734214dc
v8_maintenance branch made
2023-05-15 23:01:43 +02:00
Irmen de Jong
05d152746f
Merge branch 'master' into version_9
2023-05-15 22:43:03 +02:00
Irmen de Jong
415c599310
update cx16 keyhandler example to r43 keyboard changes
2023-05-14 23:38:16 +02:00
Irmen de Jong
70cd4fedbe
Revert "update cx16 keyhandler example to r43 keyboard changes"
...
This reverts commit 1e6d7673bc
.
2023-05-14 23:29:04 +02:00
Irmen de Jong
1e6d7673bc
update cx16 keyhandler example to r43 keyboard changes
2023-05-14 23:11:24 +02:00
Irmen de Jong
b4963b725b
Merge branch 'master' into version_9
...
# Conflicts:
# compiler/res/version.txt
2023-05-14 22:19:23 +02:00
Irmen de Jong
0371ffa4ce
'amiga' example using iso font
2023-05-14 21:55:35 +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
630c8a5faa
IR: fix romsub encoding
2023-05-14 18:08:06 +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
1e469b3b0f
Merge branch 'master' into version_9
...
# Conflicts:
# docs/source/todo.rst
# examples/test.p8
2023-05-09 22:45:21 +02:00
Irmen de Jong
bff3c4f95c
IR now converts IRInlineAsmChunk (of type IR) into regular code chunks directly.
...
.p8ir files usually won't contain <INLINEASM> nodes any longer
2023-05-09 21:04:31 +02:00
Irmen de Jong
4c8898a639
fix typecheck crash on certain byte to word assignments
2023-05-08 23:02:48 +02:00
Irmen de Jong
97df33ab1a
IR: fix byte to word assignment not doing value extension
2023-05-08 22:47:00 +02:00
Irmen de Jong
d5d6dd3614
optimize typecast expr
2023-05-08 03:30:14 +02:00
Irmen de Jong
6c233c6a0a
optimize add/sub expr
2023-05-08 02:41:34 +02:00
Irmen de Jong
6db715d879
optimize multiplication expr
2023-05-08 02:10:54 +02:00
Irmen de Jong
ab02e8a546
optimize more carry flag assembly
2023-05-07 23:55:34 +02:00
Irmen de Jong
8cbfe64f19
optimize some carry flag assembly
2023-05-07 23:27:49 +02:00
Irmen de Jong
fd1e9971e4
asmsub Pc params and returnvalue must be boolean
2023-05-07 22:59:30 +02:00
Irmen de Jong
68336a76c5
optimized word comparison expressions
2023-05-07 20:40:48 +02:00
Irmen de Jong
393e914a86
optimized word equality comparison expressions
2023-05-07 18:55:17 +02:00
Irmen de Jong
ffb54110e9
optimized byte comparison expressions
2023-05-07 15:15:58 +02:00
Irmen de Jong
21bc505d85
for loops no longer execute when from var already reached beyond the end
2023-05-03 00:43:03 +02:00
Irmen de Jong
d81fdf6d6b
for loops...
2023-05-02 22:55:58 +02:00
Irmen de Jong
87d3109ffb
diskio f_seek_w() abandoned due to unreliability
2023-05-02 19:33:49 +02:00
Irmen de Jong
180dbbb521
cleaning up the diskio modules
...
for cx16: removed cx16diskio (merged everything into its regular diskio module)
for cx16: the load() and load_raw() routines that took an extra ram bank parameter are gone. You have to cx16.rambank() yourself before calling load().
2023-05-02 03:31:11 +02:00
Irmen de Jong
53e18a5387
Api change: drivenumber parameter removed from all routines in diskio and cx16diskio modules
2023-05-02 01:48:56 +02:00
Irmen de Jong
319079de7a
sqrt
2023-05-02 01:19:53 +02:00
Irmen de Jong
025bf900a5
min max docs, added floats.minf() and maxf()
2023-05-02 01:19:53 +02:00
Irmen de Jong
c07eda15b1
adding min() and max()
2023-05-02 01:19:53 +02:00
Irmen de Jong
4274296cf3
api change: new 'cbm' module that now contains the common CBM kernal variables and routines.
2023-05-02 01:19:53 +02:00
Irmen de Jong
76a203d4df
api change: rename builtin func sqrt16 to sqrtw
2023-05-02 01:19:53 +02:00
Irmen de Jong
f465b2e2a0
some improvements to IR peephole optimizer
2023-05-02 00:29:04 +02:00
Irmen de Jong
9cdd5fe7f2
fix byte to word sign extension error in certain cases
2023-04-29 17:14:50 +02:00
Irmen de Jong
25846ea18a
fix zsound stream example (missing sound file)
2023-04-29 13:02:24 +02:00
Irmen de Jong
5b2d29bef6
improved and added a few system routines for the cx16
2023-04-18 23:20:28 +02:00
Irmen de Jong
efd7d6f0c0
tweak IR call args setting now via special SETPARAM instruction
2023-04-14 02:10:39 +02:00
Irmen de Jong
7c1d5cadd7
fix sort and reverse on strings on 6502 codegen
2023-04-10 19:33:24 +02:00
Irmen de Jong
dd1592b03b
ir syscalls args via stack instead of fixed r65500+
2023-04-10 18:02:37 +02:00
Irmen de Jong
9b952fbc44
tweaking IR instruction set branch instructions
2023-04-09 22:17:19 +02:00
Irmen de Jong
5665a7f0cb
also track ir reg types
2023-04-07 22:24:17 +02:00
Irmen de Jong
4a0f15eb88
some loose ends
2023-04-06 21:19:21 +02:00
Irmen de Jong
d8214d4f12
fix IR array indexing for newexpr
2023-04-03 03:13:35 +02:00
Irmen de Jong
47d0f0ea40
implement missing operators in IR code gen
2023-04-01 02:29:33 +02:00
Irmen de Jong
d936568b76
added divmod()
and divmodw()
builtin functions to efficiently compute division and remainder in a single call
2023-03-29 23:46:44 +02:00
Irmen de Jong
01461a196d
implementing optimized comparisons
2023-03-25 00:08:21 +01:00
Irmen de Jong
04832f052a
working on doing comparison codegen differently
2023-03-25 00:08:21 +01:00
Irmen de Jong
1b81c7fb22
fix warnings
2023-03-24 22:50:01 +01:00
Irmen de Jong
a7df4dcf25
added cx16 bubbleuniverse example
2023-03-24 01:59:00 +01:00
Irmen de Jong
8e56a61f95
tweak
2023-03-20 22:41:58 +01:00
Irmen de Jong
d265271148
fix rpn variable depth clobber and type error
2023-03-20 22:18:10 +01:00
Irmen de Jong
b40e397b28
fix rpn result type mismatch
2023-03-20 00:58:48 +01:00
Irmen de Jong
df2d7d4734
fix RPN comparison exprs
2023-03-19 16:08:48 +01:00
Irmen de Jong
374464a1f8
weird condition operator...
2023-03-19 01:32:20 +01:00
Irmen de Jong
6e4ae034b2
more Rpn optimizations
2023-03-19 00:48:12 +01:00
Irmen de Jong
52b560e72d
more Rpn optimizations
2023-03-18 19:13:32 +01:00
Irmen de Jong
9b971ad222
fix PeekW and PokeW optimizations
2023-03-18 17:36:32 +01:00
Irmen de Jong
3613162d09
fix RPN string comparisons
2023-03-18 16:55:03 +01:00
Irmen de Jong
3a272e998d
Merge branch 'master' into rpn-expressions
2023-03-18 14:42:38 +01:00
Irmen de Jong
d4c750beb4
fix cx16/bdmusic and sincos examples
2023-03-18 14:42:15 +01:00
Irmen de Jong
94c06e13f4
implementing Rpn optimizations 2
2023-03-18 12:43:45 +01:00
Irmen de Jong
e8bebe5a75
implementing Rpn optimizations
2023-03-18 01:13:02 +01:00
Irmen de Jong
9241479da4
add "-rpn" command line switch to transform exprs to RPN in codegen
2023-03-17 22:28:22 +01:00
Irmen de Jong
92276b5769
IR fix unneeded register allocated for array indexing with variable
2023-03-14 21:24:44 +01:00
Irmen de Jong
592f74124c
fix startup subroutine linking in VM
2023-03-12 16:09:55 +01:00
Irmen de Jong
f350137a14
fix array in place assignments
...
fixes balls and snow examples amongst others
2023-03-10 04:07:50 +01:00
Irmen de Jong
6c34672549
array in-place assignment problem
2023-03-10 02:02:47 +01:00
Irmen de Jong
6e9025ebf2
cx16 fix irq statusbit handling and kefrenbars example
2023-03-03 21:58:08 +01:00
Irmen de Jong
3922691b3c
limit to 48828 hz sample rate (vera max)
2023-03-03 18:04:21 +01:00
Irmen de Jong
0545b77cf4
ask for filename
2023-03-03 17:24:16 +01:00
Irmen de Jong
6b3f39fa1a
oops
2023-03-03 17:17:19 +01:00
Irmen de Jong
3114ab87dc
add 8 bit sample width support
2023-03-03 17:12:44 +01:00
Irmen de Jong
00bc99cc7b
added cx16/stream-wav example, refactor pcmaudio code
2023-03-03 14:18:13 +01:00
Irmen de Jong
ded2483fc0
cx16 startup code now properly turns off mouse cursor
2023-02-27 23:35:42 +01:00
Irmen de Jong
e62ea388e0
tweak cx16 adpcm example
2023-02-24 01:38:03 +01:00
Irmen de Jong
d9e4f39ddc
memset BSS section to zero all at once, less individual var=0 assigns
2023-02-21 00:26:21 +01:00
Irmen de Jong
92a07b87d2
clearer
2023-02-20 02:32:36 +01:00
Irmen de Jong
adc15c24ef
introduce bss segments
2023-02-19 18:12:37 +01:00
Irmen de Jong
9ca6860ffa
tweak
2023-02-19 15:08:16 +01:00
Irmen de Jong
86c22636eb
Merge branch 'master' into codegen-on-new-ast
2023-02-09 23:05:54 +01:00
Irmen de Jong
fe29d8a23f
tweak codegen of inline sub
2023-02-09 21:59:09 +01:00
Irmen de Jong
7b59bc8d12
avoid division by zero if host fs hyperload is used which loads instantly
2023-02-08 01:37:49 +01:00
Irmen de Jong
c75b1581d2
lookup via new ST
2023-02-05 01:15:23 +01:00
Irmen de Jong
109e118aba
fix sub return register
2023-02-03 21:16:44 +01:00
Irmen de Jong
e94319145f
test
2023-01-26 01:41:44 +01:00
Irmen de Jong
48c9349ce9
working on codegen fixes
2023-01-25 01:57:25 +01:00
Irmen de Jong
99c62aab36
Merge branch 'master' into codegen-on-new-ast
...
# Conflicts:
# examples/test.p8
2023-01-24 01:51:20 +01:00
Irmen de Jong
74b69e191e
restructure keyboardhandler example due to X register bug, discussed in #94
2023-01-24 01:30:57 +01:00
Irmen de Jong
8cda8a727c
update vtui example to vtui 1.0
2023-01-24 01:00:21 +01:00
Irmen de Jong
4403e4ed62
optimize node renames
2023-01-22 18:26:37 +01:00
Irmen de Jong
9b209823f6
simple test
2023-01-22 17:10:52 +01:00
Irmen de Jong
4e103a1963
making snow example more interesting
2022-12-22 13:04:26 +01:00
Irmen de Jong
bf0604133c
fix error in IR for inline asm and BSS vars.
2022-12-04 16:48:44 +01:00
Irmen de Jong
a82b2da16e
Fix some FP related assignment issues in 6502 codegen.
2022-12-04 13:03:38 +01:00
Irmen de Jong
17bedac96c
vm: memory is randomized on start instead of 0. P8ir file now has BSS segment. Vm clears BSS vars to 0.
2022-12-03 17:46:06 +01:00
Irmen de Jong
f470576822
it's now possible to use symbols that are the same name as 6502 instructions
...
because these are now prefixed internally before generating assembly.
2022-11-30 18:39:56 +01:00
Irmen de Jong
10760a53a8
optimize cmp word equal/notequal
2022-11-29 20:14:35 +01:00
Irmen de Jong
eee805183c
don't overwrite temp vars in complex comparison expressions. Fixes #89
2022-11-29 04:13:25 +01:00
Irmen de Jong
b8fb391022
- ir codegen now allows subroutine having the same name as its block
...
this is not possible for the 6502 codegen due to 64tass scoping limitation
2022-11-28 21:54:33 +01:00
Irmen de Jong
3c698f1584
fileseek for writing not right now
2022-11-27 21:52:18 +01:00
Irmen de Jong
2fad52d684
the adpcm example can now read wav files directly (so no need anymore to extract the binary frame data from them)
2022-11-27 21:37:40 +01:00
Irmen de Jong
ec64a68a71
fixed compiler crash: unsigned = (-(unsigned as word) as uword)
2022-11-27 17:25:47 +01:00
Irmen de Jong
db55562f6a
fixed adpcm playback
2022-11-27 16:36:30 +01:00
Irmen de Jong
0d0ce6eec1
adpcm plays pcm
2022-11-24 21:03:50 +01:00
Irmen de Jong
7b6c742178
fixed diskio.f_read() for small read sizes
2022-11-24 00:23:37 +01:00
Irmen de Jong
f870e4965a
added cx16diskio.f_seek() function to seek to a position in an opened file
...
f_open uses channel 12 now, f_open_w uses 13
2022-11-23 01:48:04 +01:00
Irmen de Jong
c21913a66b
ir: keep order of children in block
2022-11-22 02:04:24 +01:00
Irmen de Jong
153b422496
cx16: retain display mode (composite etc)
2022-11-20 19:19:01 +01:00
Irmen de Jong
d8e87bd881
make uword xx = 1<<shift into a word shifting
2022-11-16 01:39:34 +01:00
Irmen de Jong
922033c1b2
main block element order now remains the same as in source
2022-11-16 00:32:00 +01:00
Irmen de Jong
836a2700f2
func(x>>1) no longer uses slow stack eval
2022-11-15 02:49:40 +01:00
Irmen de Jong
00c059e5b1
adding cx16/adpcm example
2022-11-15 01:17:28 +01:00
Irmen de Jong
f4f355c74a
added cx16/diskspeed example
2022-11-14 17:55:55 +01:00
Irmen de Jong
2d78eaa48d
fix gfx2 text color, added cx16 snow example
2022-11-12 22:08:07 +01:00
Irmen de Jong
9d7b9771c2
p8ir file format is now valid XML
2022-11-11 23:35:52 +01:00
Irmen de Jong
3dcf628fdb
fixed subroutine name shadow check
2022-11-10 22:51:37 +01:00
Irmen de Jong
e614e9787a
ir: write values as hex into p8ir file
2022-11-08 21:59:05 +01:00
Irmen de Jong
5d4bfffc7e
float.rndseedf() now takes float seed value and is consistent for all CBM compilation targets
2022-11-06 22:53:57 +01:00
Irmen de Jong
207cdaf7a4
fix kefrenbars example (use gfx2 instead of kernal routines)
2022-11-06 17:33:30 +01:00
Irmen de Jong
7315b581ce
added gfx2.pget(x,y) to get the pixel color value
2022-11-06 13:40:55 +01:00
Irmen de Jong
38efaae7b2
ir/vm: syscall params in high base register to avoid push/pop
2022-11-06 12:52:09 +01:00
Irmen de Jong
469e042216
vm: replaced prog8_lib.string_compare and others with syscalls
2022-11-04 23:12:13 +01:00
Irmen de Jong
0f1a4b9d8f
fixed certain type check error when passing boolean value to ubyte function parameter
...
fixed virtual machine string comparison syscall
2022-11-03 23:06:03 +01:00
Irmen de Jong
7303c00296
vm: prog8lib.wordarray_contains() fixed
2022-11-03 22:48:47 +01:00
Irmen de Jong
562d722ad5
codegen: added missing codegen for float array inplace modification
2022-11-03 20:08:46 +01:00
Irmen de Jong
144c1ba3a6
ir: fix float instruction value in formatspec
2022-11-03 19:08:38 +01:00
Irmen de Jong
dc0edc4c2b
break also in for
2022-10-29 23:34:59 +02:00
Irmen de Jong
434515d957
fix: array[x] = ~array[x] no longer crashes the codegen
2022-10-27 23:56:38 +02:00
Irmen de Jong
e9a4a905ef
preparing to fix the array indexing compiler issue
2022-10-26 23:53:17 +02:00