get tokenising working a bit :p also some fixes and semantics

This commit is contained in:
andromeda
2026-03-08 10:56:20 +01:00
parent 63e3a1ea7e
commit 0d66e77976
2 changed files with 258 additions and 29 deletions

View File

@@ -21,8 +21,6 @@ I want to compile Bootler and Twasm with the Twasm assembler
| stack (rsp) |
+------------------------+
| input |
+------------------------+ <- this is lined up to a sector
| | <- and this is less than a sector
+------------------------+
| assembler |
+------ 0x00010000 ------+
@@ -37,11 +35,11 @@ each word represents a token on the token table.
each token gets loaded into the token table with the following form:
```
+----------+-----------------------+
| 31 16 | 15 0 |
+----------+-----------------------+
| reserved | token id |
+----------+-----------------------+
+----------+----------+
| 31 16 | 15 0 |
+----------+----------+
| reserved | token id |
+----------+----------+
```
### token IDs
@@ -152,4 +150,5 @@ supported tokens are listed below
| - | 0x0063 | |
| * | 0x0064 | |
| / | 0x0065 | |
| | 0xFEXX | token terminator byte as token, where `XX` is the byte |
| | 0xFFFF | unrecognised token |