David Schmenk
e51753e512
Fix expressios op priority sequence bug in parser
2024-12-13 07:21:20 -08:00
David Schmenk
b93b4d7c75
Fixes to compilers case statement to allow addresses. Update names to Forth words
2024-01-26 17:19:37 -08:00
dschmenk
9125b7bfd4
Error on local constants
2023-02-25 19:21:36 -08:00
dschmenk
cdb734d1ba
Allow to import module header itself
2023-02-25 16:16:46 -08:00
David Schmenk
f5b2db78a3
Allow importing self
2023-01-14 12:20:16 -08:00
David Schmenk
970d692592
Update code to ALPHA2
2022-12-20 09:58:26 -08:00
David Schmenk
1a208ef30a
Make sure ternary op has lower precedence than AND and OR
2020-01-20 11:39:58 -08:00
Ian Flanigan
ce0b92bf8c
Prefer pointer types in prefix operator parsing
...
This fixes issue #49 in the simplest way. Before, if the
dereferenced variable was a byte type, the result of the word
pointer dereference operator, `*`, would be a byte type. This
caused `*@a` to return a byte if `a` was a byte type. Now the
pointer type is used instead, causing `*@a` to return a word.
Prefix operator parsing allows some nonsensical constructions,
like `@*x`, but these were already possible before.
Before the output from:
```
include "inc/cmdsys.plh"
byte a
byte b
word x
a = 5
b = 6
x = $55FF
puti(*@a) // 5
putln()
puti(*(@a)) // 1541
putln()
puti(@*a) // 5
putln()
puti(^@x) // 255
putln()
puti(^(@x)) // 255
putln()
puti(@^x) // 255
putln()
done
```
was:
```
5
1541
5
255
255
255
```
now it is:
```
1541
1541
1541
255
255
255
```
2018-11-18 12:15:14 +00:00
David Schmenk
0f2a76dd55
Fix infunc for asm defs
2018-04-27 19:47:23 -07:00
David Schmenk
4db8271a25
TFTP server and fix FOR/NEXT in module init bug
2018-04-21 16:35:31 -07:00
David Schmenk
c1d849946f
BIG change so FOR/NEXT exits with proper terminal value in variable
2018-04-17 10:39:05 -07:00
David Schmenk
574911e389
Apple /// JIT WIP
2018-04-01 18:53:56 -07:00
David Schmenk
cb7f86a911
Order DFD by address
2018-03-21 16:23:32 -07:00
David Schmenk
5c9bc34844
Fix check for duplicate CASE and updates images
2018-03-16 16:57:42 -07:00
David Schmenk
ec0fdde747
Order caseblock values in ascending order
2018-03-16 14:52:27 -07:00
David Schmenk
d165509293
Allow CONST/PREDEF before IMPORT
2018-03-16 07:39:42 -07:00
David Schmenk
f9a007398f
CASE checking and limit to 64 cases on self-hosted compiler
2018-03-16 07:00:22 -07:00
David Schmenk
b8714745dd
Add BRGT/BRLT FOR/NEXT optimization
2018-03-15 11:16:58 -07:00
David Schmenk
023030831c
Sync all VMs and update images
2018-03-10 08:30:39 -08:00
David Schmenk
a8553cfdb7
re-arrange some ops
2018-03-05 15:40:43 -08:00
David Schmenk
eff01c5f12
Short circuit AND/OR
2018-03-05 10:55:19 -08:00
David Schmenk
6de120ec89
New WHEN/IS for hosted compiler
2018-03-05 08:58:21 -08:00
David Schmenk
3ee19e86f6
SWITCH/CASE table optimization
2018-03-04 21:36:23 -08:00
David Schmenk
e1090c012c
Better WHILE/LOOP
2018-03-04 15:00:40 -08:00
Dave Schmenk
2b2e464c9b
More immidiate ops, add/sub next branches
2018-03-04 10:18:31 -08:00
Dave Schmenk
793b1760a0
Constant op codes
2018-03-03 18:55:39 -08:00
Dave Schmenk
40c3dcd197
Better FOR/NEXT ops
2018-03-02 21:43:09 -08:00
David Schmenk
b986e1da38
PLASM compiler patch #1
2018-02-07 12:01:55 -08:00
David Schmenk
b360a8af53
Make sure stack depth is decremented (and not pointer)
2018-01-15 14:27:11 -08:00
David Schmenk
87f9be31d8
Sometimes a small change has large repercussions
2018-01-13 11:53:21 -08:00
David Schmenk
0fe0782137
Clean up statement sequence output and PLASM constant evaluation
2018-01-07 22:21:36 -08:00
David Schmenk
72463cb690
value parsing cleanup
2018-01-06 22:29:12 -08:00
Dave Schmenk
e335b22445
Set fixup address as code offset
2018-01-04 22:20:09 -08:00
David Schmenk
a5910609ef
PLASM code complete
2018-01-04 14:45:44 -08:00
David Schmenk
eb0c669452
Better accessed control
2018-01-03 18:34:20 -08:00
David Schmenk
cf9f20e0c9
Only add accessed externals to the Extern Symbol Directory
2018-01-03 15:59:07 -08:00
David Schmenk
8a58ef8b5f
Free up unneeded opcodes. Makes thing a little more simple
2018-01-01 10:29:28 -08:00
David Schmenk
7843bc41ce
More robust stack depth checking and var parsing
2017-12-24 20:35:39 -08:00
David Schmenk
70ba7d0e0e
More consistent stack depth tracking
2017-12-23 20:49:17 -08:00
Dave Schmenk
01b5418c8b
Optimize longjmp
2017-12-22 21:37:50 -08:00
David Schmenk
3c1be6c92f
Add longjmp library to slean up PLASM
2017-12-21 21:00:35 -08:00
David Schmenk
1778247a8a
Add special LVALUE 'drop'
2017-12-21 13:16:26 -08:00
David Schmenk
f79b94ba96
Enable strict parameter/return count checking
2017-12-13 14:40:31 -08:00
David Schmenk
a9bd3ebbeb
Ternary operators for PLASMA! And Floating point string conversion WIP
2017-11-18 15:27:50 -08:00
Dave Schmenk
98a107d734
Fix parseing to check for extraneous/buggy syntax
2017-11-03 17:08:54 -07:00
David Schmenk
b5cac6dc3d
Quick hack to flag var: and var=> without follow-on value as error
2017-08-12 16:28:29 -07:00
David Schmenk
50f066e527
Fix DEFCNT for lambda functions
2017-08-07 07:34:56 -07:00
David Schmenk
9eb0e7286a
Undo lambda funcs when RVALUE only statements
2017-08-02 20:42:18 -07:00
David Schmenk
64fe1b2e70
Lambda functions working except double parsed in function list ???
2017-08-02 16:05:14 -07:00
David Schmenk
e65adf2050
Lambda WIP
2017-07-30 13:22:24 -07:00