Fix typos in some of the opcode binary layouts

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-03 18:00:24 -05:00
parent 214f0b8aed
commit 329e61e087

16
vm.md
View File

@@ -23,7 +23,8 @@ CPU registers are addressed by a value between 0-63 (6 bits). All registers are
* SP - Stack pointer * SP - Stack pointer
* FP - Frame pointer * FP - Frame pointer
* FLAGS - CPU flags * FLAGS - CPU flags
* (9 unused registers) * NULL - Always zero for reading and will never change after writing.
* (8 unused registers)
* STATUS - Generic status code * STATUS - Generic status code
* R0-R49 * R0-R49
@@ -43,7 +44,6 @@ CPU flags are addressed by bit index, going from right to left.
## Register ideas ## Register ideas
* NULL - a register that will always be zero for reading and will not change after writing.
* Other possible names: Z, NIL * Other possible names: Z, NIL
# Instructions # Instructions
@@ -269,7 +269,7 @@ wrapping around to 0.
opcode reg1 unused opcode reg1 unused
/ / / / / /
+----------------------------------------+ +----------------------------------------+
| 0001000000000000 | ...... | XXXXXXXXXX | | 0001000100000000 | ...... | XXXXXXXXXX |
+----------------------------------------+ +----------------------------------------+
``` ```
@@ -287,7 +287,7 @@ wrapping around to 0.
opcode reg1 unused opcode reg1 unused
/ / / / / /
+----------------------------------------+ +----------------------------------------+
| 0001000000000001 | ...... | XXXXXXXXXX | | 0001000100000001 | ...... | XXXXXXXXXX |
+----------------------------------------+ +----------------------------------------+
``` ```
* Jnz * Jnz
@@ -304,7 +304,7 @@ wrapping around to 0.
opcode reg1 unused opcode reg1 unused
/ / / / / /
+----------------------------------------+ +----------------------------------------+
| 0001000000000002 | ...... | XXXXXXXXXX | | 0001000100000002 | ...... | XXXXXXXXXX |
+----------------------------------------+ +----------------------------------------+
``` ```
@@ -398,7 +398,7 @@ wrapping around to 0.
opcode opcode
/ /
+------------------+ +------------------+
| 0010011000000000 | | 1111000000000000 |
+------------------+ +------------------+
``` ```
* Nop * Nop
@@ -410,7 +410,7 @@ wrapping around to 0.
opcode opcode
/ /
+------------------+ +------------------+
| 0010011000000001 | | 1111000000000001 |
+------------------+ +------------------+
``` ```
@@ -499,6 +499,4 @@ A VM must provide support for the following meta-values:
* Interrupts * Interrupts
* MMIO regions * MMIO regions
* Execution pipeline
* Helps to define when certain side effects happen (e.g. when the IP increments)
* Paging? * Paging?