add some operators, stop printing whitespace while tokenising, add frame for pseudo-op support
This commit is contained in:
@@ -160,12 +160,13 @@ metadata about some tokens in the following form:
|
||||
|
||||
the `type` hex digit is defined as the following:
|
||||
|
||||
| hex | meaning | examples |
|
||||
|-----|----------|-|
|
||||
| 0x0 | ignored | |
|
||||
| 0x1 | operator | `mov`, `hlt` |
|
||||
| 0x2 | register | `rsp`, `al` |
|
||||
| 0xF | unknown | any token ID not represented in the lookup table |
|
||||
| hex | meaning | examples |
|
||||
|-----|-----------------|-|
|
||||
| 0x0 | ignored | |
|
||||
| 0x1 | operator | `mov`, `hlt` |
|
||||
| 0x2 | register | `rsp`, `al` |
|
||||
| 0x3 | pseudo-operator | `db` |
|
||||
| 0xF | unknown | any token ID not represented in the lookup table |
|
||||
|
||||
type metadata for the different types is as follows:
|
||||
|
||||
@@ -210,6 +211,17 @@ type metadata for the different types is as follows:
|
||||
11b ; 64 bit
|
||||
```
|
||||
|
||||
```
|
||||
1 byte
|
||||
+----------+
|
||||
| type 0x3 |
|
||||
+----------+
|
||||
| 31 24 |
|
||||
+----------+
|
||||
| reserved |
|
||||
+----------+
|
||||
```
|
||||
|
||||
#### `opcodes.by_id`
|
||||
|
||||
entries are as follows:
|
||||
@@ -396,6 +408,13 @@ supported tokens are listed below
|
||||
| call | 0x0059 | |
|
||||
| ret | 0x005A | |
|
||||
| cmp | 0x005B | |
|
||||
| jmp | 0x005C | |
|
||||
| je | 0x005D | |
|
||||
| jne | 0x005E | |
|
||||
| push | 0x005F | |
|
||||
| pop | 0x0060 | |
|
||||
| out | 0x0061 | |
|
||||
| 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 |
|
||||
|
||||
Reference in New Issue
Block a user