Add more great ideas to the VM spec

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-01-27 18:42:15 -05:00
parent b16974c7c4
commit a5388c8b86

6
vm.md
View File

@@ -41,6 +41,11 @@ CPU flags are addressed by bit index, going from right to left.
* Overwriting a register without its value being used
* Mixing arithmetic with bit twiddling on the same target
## Register ideas
* NULL - a register that will always be zero for reading and will not change after writing.
* Other possible names: Z, NIL
# Instructions
## Arithmetic
@@ -48,7 +53,6 @@ CPU flags are addressed by bit index, going from right to left.
Arithmetic instructions store their result in the first register specified. Overflow is handled by
wrapping around to 0.
* Add
* **Params**: REG1, REG2
* `REG1 = REG1 + REG2`