summaryrefslogtreecommitdiff
path: root/twasm/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'twasm/README.md')
-rw-r--r--twasm/README.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/twasm/README.md b/twasm/README.md
index 6509be7..8d0ce3b 100644
--- a/twasm/README.md
+++ b/twasm/README.md
@@ -95,15 +95,15 @@ label definitions are stored and recalled from this table. The memory addresses
```
16 bytes
-+---------+
-| 127 64 |
-+---------+
-| address |
-+---------+
-| 63 0 |
-+---------+
-| hash |
-+---------+
++----------+---------+
+| 127 96 | 95 64 |
++----------+---------+
+| reserved | address |
++----------+---------+
+| 63 0 |
++--------------------+
+| hash |
++--------------------+
```
#### awaiting label table (ALT)
@@ -113,7 +113,7 @@ forward references are stored in this table to be filled in after assembly is ot
```
16 bytes
+----------+----------+------------------+---------+
-| 127 105 | 104 104 | 103 96 | 95 64 |
+| 127 101 | 100 | 99 96 | 95 64 |
+----------+----------+------------------+---------+
| reserved | abs flag | # bytes reserved | address |
+----------+----------+------------------+---------+
@@ -263,7 +263,7 @@ entries are as follows:
| 63 56 | 55 48 | 47 40 | 39 32 |
+----------+---------------+---------------+------------------+
| opcode | opcode | opcode | opcode |
-| dst=rel8 | dest=rel | dst=imm8 | dst=imm |
+| dst=rel8 | dst=rel | dst=imm8 | dst=imm |
+----------+---------------+---------------+------------------+
| 31 24 | 23 16 | 15 0 |
+----------+---------------+----------------------------------+
@@ -319,7 +319,8 @@ rel ; rel 16/32
rel8 ; rel 8
opX&8 ; low 8 bits are the operator flag that goes with opcode at offset X from
- ; the first opcode in the table entry
+ ; the first opcode in the table entry. High bit is (somewhat confusingly)
+ ; a flag for whether or not the operator comes with an `0F` prefix
```
note much room to expand. If an opcode doesn't exist, it should be 0x00
@@ -431,8 +432,7 @@ supported tokens are listed below
| db | 0x0100 | pseudo-operator |
| | 0x10XX | some memory address; `XX` is as specified below |
| | 0x20XX | some constant; `XX` is as specified below |
-| | 0x3XXX | some label definition; `XXX` is its entry index in the label table |
-| | 0x4XXX | some label reference; `XXX` is its entry index in the label table
+| | 0x3XXX | some label; `XXX` is its entry index in the label table |
| | 0xFEXX | used to pass some raw value `XX` in place of a token id to a couple of functions that mention this as a feature. If the function doesn't mention it, it will lead to undefined behaviour |
| | 0xFFFF | unrecognised token |