From a5388c8b86dc38e5edd0eae8161edd88e23413ee Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Mon, 27 Jan 2020 18:42:15 -0500 Subject: [PATCH] Add more great ideas to the VM spec Signed-off-by: Alek Ratzloff --- vm.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vm.md b/vm.md index b409a64..e0e6e0d 100644 --- a/vm.md +++ b/vm.md @@ -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`