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
dfa1d5e398
removed the ".w" word suffix (it confused the parser).
2020-09-19 23:27:40 +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
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
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
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
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
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
8d1a4588d3
added 'downto' range expression
2020-03-11 20:59:14 +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
b8816a0e2f
got rid of separate str_s datatype
2020-02-07 20:47:38 +01: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
2c3b8a9819
more ++ and -- code, 'dontuse' zeropage option
2019-08-04 22:35:27 +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
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
3e5deda46c
struct finished
2019-07-12 20:07:41 +02:00
Irmen de Jong
44fe2369d6
multitarget assignments removed
2019-07-10 10:11:37 +02:00
Irmen de Jong
a85743f241
docs about 'when' statement
2019-07-10 00:45:53 +02:00
Irmen de Jong
e8caf6d319
1.9
2019-07-09 08:42:38 +02:00
Irmen de Jong
f4f113da7b
parser for 'when' statement
2019-07-09 00:02:38 +02:00
Irmen de Jong
343978d164
for loop and cleaner iteration over values
2019-06-25 21:49:02 +02:00
Irmen de Jong
78fbbf7119
%asmbinary implemented
2019-04-17 01:33:07 +02:00
Irmen de Jong
0ee43294c4
check for file with %asmbinary, %asminclude
2019-04-17 00:55:42 +02:00
Irmen de Jong
e384822b2c
array size in vardecl is optional when initializer array value is given
2019-04-16 01:19:51 +02:00
Irmen de Jong
a9bbe0bc40
removed the memory keyword instead use & now (reuse the address-of operator to reduce the number of different concepts in the grammar)
2019-04-12 22:00:32 +02:00
Irmen de Jong
35aa954be8
doc
2019-04-12 01:06:46 +02:00
Irmen de Jong
9f302cc640
docs about '&' operator
2019-04-11 21:41:46 +02:00
Irmen de Jong
905d8a0c06
actually, get rid of integer pow() because a naive multiplication loop approach is way too slow
2019-03-31 18:04:19 +02:00
Irmen de Jong
83ace753b2
got rid of problematic signed POW operator, added compiler checks for this
2019-03-31 13:56:03 +02:00
Irmen de Jong
747c9604dd
improve ast check for multiple returnvalues assignment
2019-03-18 04:01:25 +01:00
Irmen de Jong
f5ba072294
removed str_p and str_ps pascal string types, fixes #10
2019-03-10 18:11:26 +01:00
Irmen de Jong
aa98104d54
doc
2019-03-07 02:46:24 +01:00
Irmen de Jong
5ea2f2d4db
docs about @zp tag
2019-02-28 00:13:59 +01:00
Irmen de Jong
7ff1af3934
avoid zp corruption issues and added zp mode for floating point (todo: allocate)
2019-02-03 00:26:07 +01:00
Irmen de Jong
fa8a3c997a
Expressions can now be split over multiple lines. Fixed datatype of len().
2019-01-26 17:32:26 +01:00
Irmen de Jong
5471c5211c
make %asminclude work, restructure prog8lib into separate asm file
2019-01-21 00:49:48 +01:00
Irmen de Jong
f1b2bd1cc4
got rid of separate '//' floordivision operator
2019-01-09 22:01:47 +01:00
Irmen de Jong
58854ef45b
doc fix
2019-01-08 02:25:22 +01:00
Irmen de Jong
04bbdf5991
div and mult by a power of 2 are now optimized into shifts. Added bit shift operators << and >>
2019-01-06 08:20:22 +01:00
Irmen de Jong
d203bfaf25
normal division is always float, implemented (u)byte integer division
2019-01-06 01:43:47 +01:00
Irmen de Jong
39a8b76534
force_output option added
2019-01-01 21:47:19 +01:00
Irmen de Jong
a319e6f9ec
direct memory access and sprite fixes
2018-12-31 04:48:26 +01:00
Irmen de Jong
aeb963673a
sprites example
2018-12-31 01:52:18 +01:00
Irmen de Jong
500777bf78
added direct memory access ("poke"/"peek")
2018-12-31 01:10:42 +01:00
Irmen de Jong
c1204b83bd
changed syntax of subroutine parameters (now the same as vardecls)
2018-12-19 02:51:22 +01:00
Irmen de Jong
7cb42de60e
more float asm operations, fix some % operator problems
2018-12-13 01:19:43 +01:00
Irmen de Jong
be819ba8a7
got the number guessing example fully working on c64 asm
2018-12-11 00:09:37 +01:00
Irmen de Jong
d6432df90d
got rid of 16-bit register pair variables (AX, AY, XY) they were complicating things too much
2018-11-02 22:06:57 +01:00
Irmen de Jong
5bf2c4a798
got rid of matrix type
2018-10-30 20:29:03 +01:00
Irmen de Jong
b52120139c
6502 start
2018-10-14 01:55:39 +02:00
Irmen de Jong
987915a77a
doc
2018-10-12 18:01:40 +02:00
Irmen de Jong
f5261a3425
added %zpreserved
2018-10-09 00:01:53 +02:00
Irmen de Jong
42394f561b
syntax checks on asmsubs
2018-10-08 22:35:39 +02:00
Irmen de Jong
34d26e42e1
fixed some type checks
2018-10-07 02:05:26 +02:00
Irmen de Jong
6edd5f9b30
can now declare for loop variable on the spot
2018-10-06 22:54:03 +02:00
Irmen de Jong
1d37841575
for, while, repeat, if, branch bodies are now (anonymous) symbol scopes
2018-10-06 18:42:06 +02:00
Irmen de Jong
42e4891fcf
allowing vardecl with non-const initial value assignment
2018-10-05 00:29:46 +02:00
Irmen de Jong
38e7d48492
implemented floating-point arrays
2018-10-02 02:20:42 +02:00
Irmen de Jong
0cdae48ce7
implemented array indexing
2018-10-01 22:23:16 +02:00
Irmen de Jong
623b42cc14
added single character literals (petscii byte value)
2018-09-30 23:07:26 +02:00
Irmen de Jong
02075f2cf2
changed subroutine syntax and fixed array/matrix initalizer values
2018-09-30 18:49:58 +02:00
Irmen de Jong
bf5c2e07a2
subroutines cannot use builtin function names for parameters
2018-09-27 23:58:14 +02:00
Irmen de Jong
91f9229b07
fixed memory vars in compiler, added invalid assignment check
2018-09-27 23:21:04 +02:00
Irmen de Jong
cef0aae927
compilation of builtin functions to opcode
...
untit tests for stackvm opcodes, value and parser literalvalue
2018-09-24 22:34:12 +02:00
Irmen de Jong
68037e4425
implemented while and repeat loops
2018-09-23 02:04:45 +02:00
Irmen de Jong
f84e06bdeb
tweak branches
2018-09-22 00:33:25 +02:00
Irmen de Jong
cba9e7670e
added floordivision operator //
2018-09-19 01:24:28 +02:00
Irmen de Jong
266f98a888
doc
2018-09-16 11:25:37 +02:00
Irmen de Jong
2591f4e27e
forloop in grammar
2018-09-16 03:00:32 +02:00
Irmen de Jong
1a40a88103
added remainder operator '%'
2018-09-16 00:59:12 +02:00
Irmen de Jong
e382be89db
changed source file suffix to .p8
2018-09-15 16:35:15 +02:00
Irmen de Jong
8ff72167a4
renamed project to Prog8
2018-09-15 16:21:05 +02:00
Irmen de Jong
ea94063689
now explicit separation between byte and word literal integers
2018-09-13 23:39:54 +02:00
Irmen de Jong
949e468543
more stackvm opcodes, and sort of finished the stackvm compiler
2018-09-13 03:16:44 +02:00
Irmen de Jong
efd3b1f5c6
matrix decl parsing and fixes
2018-09-12 03:07:49 +02:00
Irmen de Jong
e928997193
arrays are now a datatype as well
...
fixed array initializer checks
2018-09-06 22:28:37 +02:00
Irmen de Jong
3933fdab13
added lsb, msb functions.
...
fixed missing errormessages.
changed some zp options.
2018-09-06 21:13:49 +02:00
Irmen de Jong
e39ae3c346
branching instructions
2018-09-02 18:32:48 +02:00
Irmen de Jong
d4341b7afe
more builtin functions
2018-09-02 12:34:50 +02:00
Irmen de Jong
640457f35a
stuff
2018-09-01 19:40:28 +02:00
Irmen de Jong
26a7a3c8d0
zeropage
2018-08-16 23:10:28 +02:00
Irmen de Jong
4b7d656a2f
range initializers
2018-08-14 16:29:08 +02:00
Irmen de Jong
397fdc61cd
if statement
2018-08-14 14:33:36 +02:00
Irmen de Jong
69ff680eaf
fix functions
2018-08-14 02:22:59 +02:00
Irmen de Jong
64032d766e
%option
2018-08-13 10:51:05 +02:00
Irmen de Jong
aadd50cc27
optimizer first steps
2018-08-11 19:55:04 +02:00
Irmen de Jong
d702dd1e74
more grammar
2018-08-11 03:22:55 +02:00
Irmen de Jong
437c948c05
grammar
2018-08-09 01:54:43 +02:00
Irmen de Jong
cee0f5bd2a
more docs. restructure project. add antlr stuff.
2018-08-07 22:49:01 +02:00
Irmen de Jong
b34ae4c91c
new docs
2018-08-07 01:23:34 +02:00