Irmen de Jong
e0c5ccc16b
begun with converting builtin functions to new call convention
2020-11-02 23:00:20 +01:00
Irmen de Jong
8af2380a47
pair
2020-11-01 18:00:20 +01:00
Irmen de Jong
431f2a2088
optimized memset and memcopy on CX16, memcopy can deal with any size now
2020-11-01 08:00:32 +01:00
Irmen de Jong
47cbc7b1f9
added a custom-charset example for the c64
2020-10-31 02:26:59 +01:00
Irmen de Jong
8a6ef17fbf
option
2020-10-30 21:51:15 +01:00
Irmen de Jong
87862f772a
better handling of inferred type errors
2020-10-30 21:24:49 +01:00
Irmen de Jong
3ab641aa21
removed @stack in subroutine args and returnvalues, can only use variables or registers now
2020-10-30 15:02:42 +01:00
Irmen de Jong
3efa8da8e0
made versions of various builtin funcs returning value in registers
2020-10-30 14:35:20 +01:00
Irmen de Jong
44949460ed
change for subroutine return values via registers instead of stack
2020-10-28 00:29:34 +01:00
Irmen de Jong
ff3f985658
refactoring
2020-10-22 23:41:16 +02:00
Irmen de Jong
74b5124a42
removed restriction on array indexer expression again from docs and code... :)
2020-10-18 14:05:26 +02:00
Irmen de Jong
fdd91170dc
allow simple binary expressions as array indexing too, but not more
2020-10-17 22:43:35 +02:00
Irmen de Jong
353d6cfc55
doc about array index restriction
2020-10-17 20:35:36 +02:00
Irmen de Jong
7626c9fff7
only allow array indexing via a number, or a variable (eliminate complex expression calcs for array indexing, force explicit use of an index variable)
2020-10-17 19:57:55 +02:00
Irmen de Jong
2554bc7ef8
ordered the functions in the docs
2020-10-17 02:14:19 +02:00
Irmen de Jong
4d01a78731
introduced strcmp() builtin function
2020-10-16 19:00:06 +02:00
Irmen de Jong
9fb8526136
added conv.bin and hex string to number
2020-10-15 23:47:10 +02:00
Irmen de Jong
5060f0bb19
fixed assigning a memory byte from an array
2020-10-15 22:15:00 +02:00
Irmen de Jong
beaf6d449b
added short overview of the library modules
2020-10-15 21:30:03 +02:00
Irmen de Jong
5595564a1f
todo strcmp
2020-10-14 01:22:43 +02:00
Irmen de Jong
e5ee5be9c5
textelite
2020-10-10 04:42:17 +02:00
Irmen de Jong
bd237b2b95
it's now possible in more places to assign arrays and put array literals without the need to define explicit variable.
2020-10-10 04:30:28 +02:00
Irmen de Jong
d31cf766eb
added missing doc picture
2020-10-10 02:51:02 +02:00
Irmen de Jong
1c8e4dba73
added \' escape character
2020-10-10 01:28:57 +02:00
Irmen de Jong
4be381c597
fixed compiler optimizer crash because of conflicting expression replacements
2020-10-09 21:51:54 +02:00
Irmen de Jong
71fd98e39e
allow asmsub routines with multiple return values to be called (special case for return values in status register)
2020-10-07 00:33:42 +02:00
Irmen de Jong
71cd8b6d51
cx16 cross-compile teaser screenshot
2020-10-05 19:59:51 +02:00
Irmen de Jong
956b0c3fa7
added \xHH escape character to strings, allow strings of length zero.
2020-10-04 13:05:43 +02:00
Irmen de Jong
a6427e0949
added \$HH escape character to strings
2020-10-03 15:11:09 +02:00
Irmen de Jong
e83e021541
doc
2020-10-02 23:31:49 +02:00
Irmen de Jong
46fbe01df9
added codengeration for assigment of array of values to a struct variable (all members at once)
2020-10-02 22:37:52 +02:00
Irmen de Jong
4372de1e7e
allow creating arrays of pointers to other arrays. Usefullness is very limited though...
2020-09-29 00:03:47 +02:00
Irmen de Jong
af0fb88adf
allow creating string arrays. Fixed array index scaling for word arrays.
2020-09-28 02:23:36 +02:00
Irmen de Jong
066233eee8
todos
2020-09-27 22:05:44 +02:00
Irmen de Jong
d7ceda4d82
removed the automatic system reset at program exit, this did't work with the new init code
2020-09-25 22:12:14 +02:00
Irmen de Jong
f5db31b8ff
do..until condition can now refer to variables defined in the loop's inner scope.
2020-09-24 19:26:07 +02:00
Irmen de Jong
e1d0dbed0c
do..until condition can now refer to variables defined in the loop's inner scope.
2020-09-23 23:24:32 +02:00
Irmen de Jong
1d1fe364d0
added %option no_sysinit to avoid having the system re-initialization code executed at the start of the program
2020-09-23 23:01:47 +02:00
Irmen de Jong
2b9316c4ff
reworked program init logic so that it is included as the first thing inside main.start itself, to allow better stand alone asm
2020-09-23 22:29:21 +02:00
Irmen de Jong
c50cbbb526
typo
2020-09-23 18:50:32 +02:00
Irmen de Jong
4daf75a8cc
better checks for invalid %output and %launcher values. Added diskdir examples.
2020-09-23 00:22:36 +02:00
Irmen de Jong
6f78a32e64
diskdir
2020-09-22 23:12:43 +02:00
Irmen de Jong
af6731c9c8
preparing version 4.3
2020-09-22 21:50:56 +02:00
Irmen de Jong
af39502450
doc
2020-09-22 00:47:02 +02:00
Irmen de Jong
ae2619602d
lib renames in docs
2020-09-21 18:21:24 +02:00
Irmen de Jong
de06353194
auto select correct library to import based on target, instead of having c64- and cx16- prefix variants
...
some programs are now 100% source compatible between C64 and Cx16 targets!
import libraries have been rena;med
2020-09-21 00:50:09 +02:00
Irmen de Jong
3ff3f5e1cc
compiler errors in standard format so that you can click on them in IDE to jump to the line
2020-09-20 22:24:35 +02:00
Irmen de Jong
dfa1d5e398
removed the ".w" word suffix (it confused the parser).
2020-09-19 23:27:40 +02:00
Irmen de Jong
bf4da1655b
doc
2020-09-18 23:57:40 +02:00
Irmen de Jong
e6d945f835
doc
2020-09-18 23:35:02 +02:00
Irmen de Jong
4fe408f1fd
doc
2020-09-18 23:34:32 +02:00
Irmen de Jong
9b66a597bb
array literal const check added
2020-09-18 21:30:59 +02:00
Irmen de Jong
2a6d9d7e31
more optimal codegen for some typecasts
2020-09-15 03:26:57 +02:00
Irmen de Jong
32a7cd31da
more optimal codegen for if statements
2020-09-15 00:31:44 +02:00
Irmen de Jong
aff6b1fca5
added some more optimized mul_word asm routines
2020-09-14 23:03:18 +02:00
Irmen de Jong
49a0584c54
added a %target directive
2020-09-09 22:53:34 +02:00
Irmen de Jong
90c4a26d52
we don't implement asmsub params via @stack yet
2020-09-07 01:24:10 +02:00
Irmen de Jong
1377bed988
fix assembly for cx16 when zp is not basicsafe
2020-09-06 17:58:05 +02:00
Irmen de Jong
0f9ce319d4
readme
2020-08-30 18:36:02 +02:00
Irmen de Jong
0b55372b3b
cleanup cx16 things and added call signatures. c64graphics moved into built-in libraries.
2020-08-28 21:42:53 +02:00
Irmen de Jong
3ad7fb010f
clearer about emulator
2020-08-27 21:09:59 +02:00
Irmen de Jong
3f64d1bb5a
oops.
2020-08-27 21:04:08 +02:00
Irmen de Jong
4ffb194847
readme and version
2020-08-27 18:18:29 +02:00
Irmen de Jong
f08fc18ab5
renamed c64scr. to txt.
2020-08-27 18:10:22 +02:00
Irmen de Jong
4a4f8ff5db
subroutine parameters can be allocated on the zp now as well
2020-08-25 16:47:21 +02:00
Irmen de Jong
60a9209a14
plasma
2020-08-25 01:48:23 +02:00
Irmen de Jong
bd9ebf4603
flipped the order of the parameters of mkword() so it's now mkword(msb, lsb) for easier readability
2020-08-22 21:13:38 +02:00
Irmen de Jong
679965410a
todo
2020-08-22 17:13:23 +02:00
Irmen de Jong
20cdcc673b
identifiers can no longer start with an underscore. (this interfered with 64tass syntax)
2020-08-22 17:03:40 +02:00
Irmen de Jong
bfc8a26381
implemented bit shifting for non-const amounts
2020-08-22 16:13:52 +02:00
Irmen de Jong
edfd9d55ba
added sizeof() function
2020-08-20 13:50:28 +02:00
Irmen de Jong
77c1376d6d
proper error message for arrays that are declared too big
2020-08-18 14:47:52 +02:00
Irmen de Jong
c0887b5f08
removed 'continue' statement to be able to generate more optimized loop assembly code. started with for loop optimizations
2020-08-17 19:22:29 +02:00
Irmen de Jong
fbe3ce008b
slight expression rewrite in case of certain in-place assignments, to try to get the in-place variable operand to the leftmost position
2020-07-30 01:30:21 +02:00
Irmen de Jong
cd651aa416
use repeat
2020-07-26 13:50:14 +02:00
Irmen de Jong
c38508c262
introduced repeat loop. repeat-until changed to do-util.
...
forever loop is gone (use repeat without iteration count).
struct literal is now same as array literal [...] to avoid parsing ambiguity with scope blocks.
2020-07-25 16:56:34 +02:00
Irmen de Jong
0c461ffe2e
removed Register expression (directly accessing cpu register)
2020-07-25 14:14:24 +02:00
Irmen de Jong
71e678b382
fixed possible register subroutine arg clobbering
2020-07-04 17:05:36 +02:00
Irmen de Jong
3050156325
reverted subroutine inlining, it was a mistake
2020-07-04 01:02:36 +02:00
Irmen de Jong
d89f5b0df8
todo about fixing argclobbering
2020-07-03 23:49:17 +02:00
Irmen de Jong
76cda82e23
v2.2
2020-06-16 01:43:44 +02:00
Irmen de Jong
ceb2c9e4f8
added string value assignment, leftstr, rightstr, substr functions
2020-06-06 00:05:39 +02:00
Irmen de Jong
6408cc46a8
cmdrx16 github ref
2020-05-15 00:32:45 +02:00
Irmen de Jong
f5e6db9d66
big compiler speedup due to optimized scope lookups
2020-05-14 23:59:02 +02:00
Irmen de Jong
5ebd9b54e4
added some more optimized array assignments
2020-04-10 23:30:19 +02:00
Irmen de Jong
cc4e272526
the new assignment code (once complete) really is a big enough change to bump the version to 2.0
2020-04-09 00:24:37 +02:00
Irmen de Jong
d22780ee44
implemented asm for lsl array values
2020-04-03 21:45:52 +02:00
Irmen de Jong
267adb4612
doc
2020-03-29 03:06:51 +02:00
Irmen de Jong
bed34378be
doc
2020-03-28 14:24:00 +01:00
Irmen de Jong
4108a528e1
proepr compiler error when there's no main module
2020-03-26 23:22:01 +01:00
Irmen de Jong
5f3a9e189a
doc
2020-03-26 01:20:04 +01:00
Irmen de Jong
2f05ebb966
bitmap lines and circles
2020-03-25 01:07:42 +01:00
Irmen de Jong
a335ba519a
fix warnings about unreachable code
2020-03-24 22:37:42 +01:00
Irmen de Jong
f2bb238e9b
cleaned up various ast checks/mutations
2020-03-24 19:37:54 +01:00
Irmen de Jong
6dd44aaf0d
compiler main cleanup
2020-03-23 02:54:04 +01:00
Irmen de Jong
f89457ba68
fixed var initialization bug in anonymous scopes
2020-03-23 02:09:30 +01:00
Irmen de Jong
efef205fcf
doc
2020-03-23 01:24:54 +01:00
Irmen de Jong
0c561d8528
fixed subroutine parameter value issue
2020-03-23 00:13:46 +01:00
Irmen de Jong
3a99115070
Initial variable values semantics changed: now always sets value at program (re)start (except strings/arrays).
...
This may change later by introducing a compiler option to choose a strategy, perhaps.
2020-03-22 15:12:26 +01:00
Irmen de Jong
63c073c93f
got rid of the Simulator / AST VM
2020-03-22 02:50:34 +01:00
Irmen de Jong
4929c198ba
tweak error reporting, expanded lines and circles example
2020-03-22 00:43:46 +01:00
Irmen de Jong
21dbc6da97
doc
2020-03-21 12:51:32 +01:00
Irmen de Jong
f265199fbe
replaced typecastsAdder with version based on astwalker
2020-03-20 22:28:18 +01:00
Irmen de Jong
a326ffa00a
added warning about sgn() of unsigned type
2020-03-14 21:09:34 +01:00
Irmen de Jong
1de328b2e8
added forever-loop and optimizer
2020-03-14 18:11:04 +01:00
Irmen de Jong
4fd14f1366
doc updates
2020-03-14 15:20:04 +01:00
Irmen de Jong
64d682bfde
todo
2020-03-13 02:33:02 +01:00
Irmen de Jong
b182f7e693
optimizer removes unreachable code following call to exit()
2020-03-13 02:31:53 +01:00
Irmen de Jong
e6be428589
compiler warning for unreachable code following a call to exit()
2020-03-13 02:21:37 +01:00
Irmen de Jong
85c7f8314b
added exit(rc) builtin function to immediately exit the program with a return code in A register
2020-03-13 02:08:18 +01:00
Irmen de Jong
796d07a7f8
fix crash in asm code generated for bitshift operation with memory address operand
2020-03-13 01:26:53 +01:00
Irmen de Jong
2af86a10b2
remove stack error comments
2020-03-13 00:52:52 +01:00
Irmen de Jong
7fbe486dff
fix eval stack register X error in print_uw
2020-03-13 00:50:30 +01:00
Irmen de Jong
fbecedaf41
added error for unsupported sort(floatarray)
2020-03-11 23:33:06 +01:00
Irmen de Jong
8d1a4588d3
added 'downto' range expression
2020-03-11 20:59:14 +01:00
Irmen de Jong
66d2af4453
added '@' alternative string/char encoding
2020-03-11 00:41:58 +01:00
Irmen de Jong
ef6c731bb3
added '@' alternative string/char encoding
2020-03-11 00:32:50 +01:00
Irmen de Jong
98a638a2f3
split asmsub and romsub declarations
2020-03-10 23:09:31 +01:00
Irmen de Jong
e2cb031386
added 'void' keyword to explicitly ignore subroutine return values (and no longer get a warning)
2020-02-09 01:29:09 +01:00
Irmen de Jong
a0bc97b90c
fix byte array iteration for bb in [1,2,3]
...
improved array literal datatype detection
2020-02-09 00:45:53 +01:00
Irmen de Jong
885b22df40
fixed while and repeat warning messages line number
...
fixed invalid while and repeat asm label names
fixed boolean checking of numbers
2020-02-08 19:45:30 +01:00
Irmen de Jong
b8816a0e2f
got rid of separate str_s datatype
2020-02-07 20:47:38 +01:00
Irmen de Jong
772e48105e
fixed some type cast compiler errors in for loops
2019-08-26 23:38:59 +02:00
Irmen de Jong
89d469e77e
examples
2019-08-25 00:46:46 +02:00
Irmen de Jong
aa94300bdd
added output directory command line option
...
improved cli parser by using kotlinx.cli
2019-08-23 00:11:08 +02:00
Irmen de Jong
b79af624ae
added more asmgen for bitshift operations
2019-08-22 00:34:17 +02:00
Irmen de Jong
0f1485f30b
added sorted, sgn, reverse to the AstVm
2019-08-18 16:39:08 +02:00
Irmen de Jong
eb94c678bd
doc
2019-08-18 14:18:46 +02:00
Irmen de Jong
50d792a121
fix doc about for loops
2019-08-18 14:14:14 +02:00
Irmen de Jong
bb7b063757
revert inline var declaration in for loops
2019-08-18 03:16:23 +02:00
Irmen de Jong
1cc1f2d91d
reverse() added (byte+word)
2019-08-18 02:05:51 +02:00
Irmen de Jong
27f987f0ae
fixed bit shifts, added sgn() function
2019-08-17 16:44:28 +02:00
Irmen de Jong
3ae2597261
irq driven music player example
2019-08-17 13:13:15 +02:00
Irmen de Jong
68df1730f5
cleaned up some stuff, improved checking of asmsub statement body
2019-08-14 23:17:50 +02:00
Irmen de Jong
d62ab93b24
word >> 8 optimized to msb(word)
2019-08-14 22:28:44 +02:00
Irmen de Jong
b5c5560af8
info
2019-08-11 18:21:15 +02:00
Irmen de Jong
b44e76db57
fix any/all assembly routine, added asm for min/max/sum/ etc aggregates
...
removed avg function because of hidden internal overflow issues
2019-08-11 16:13:09 +02:00
Irmen de Jong
fe5b225732
asmsub stack arg
2019-08-11 12:29:18 +02:00
Irmen de Jong
d499e40a4b
doc tweaks
2019-08-11 10:56:36 +02:00
Irmen de Jong
7ddc01f883
added continuous compilation mode (file watching)
2019-08-05 23:36:24 +02:00
Irmen de Jong
2c3b8a9819
more ++ and -- code, 'dontuse' zeropage option
2019-08-04 22:35:27 +02:00
Irmen de Jong
a1cd202cd2
some more array asm
2019-08-04 15:33:00 +02:00
Irmen de Jong
b842493cf0
trying to fix arithmetic and funcion calls and var scoping issues
2019-08-03 13:21:38 +02:00
Irmen de Jong
4718f09cb7
trying to fix arithmetic and funcion calls
2019-08-03 01:51:12 +02:00
Irmen de Jong
fba149ee28
removed the ~ before block names
2019-07-29 23:11:13 +02:00
Irmen de Jong
411bedcc46
fixed assignment type error with structs
...
added structs example
2019-07-16 23:56:00 +02:00
Irmen de Jong
07d8caf884
string literal concatenation and repeating added again
2019-07-16 23:34:43 +02:00
Irmen de Jong
17be722e2b
arrays without init value are once again cleared with zeros
2019-07-15 23:05:04 +02:00
Irmen de Jong
78d7849197
fixes
2019-07-15 03:08:26 +02:00
Irmen de Jong
1f5420010d
prevent struct member vars from shuffling around, can take address of struct now
2019-07-13 01:16:34 +02:00