Update spec for push and pop operations

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-26 10:25:46 -05:00
parent cd95011e7b
commit 44dc34e52d

7
vm.md
View File

@@ -200,14 +200,21 @@ wrapping around to 0.
* Push
* Opcode: 0x2002
* Params: Source
* When this instruction is executed, these actions occur:
* Set the value in memory at the current stack pointer to the source value.
* Increment the stack pointer by the size of value at the source.
* Pop
* Opcode: 0x2003
* Params: Dest
* When this instruction is executed, these actions occur:
* Decrement the stack pointer by the size of value at the destination.
* Copy the value at the stack pointer into the destination.
## Data movement
* Mov
* Opcode: 0x3000
* Params: Source, Dest
## Miscellaneous