Add Not and Inv instructions to spec
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
13
vm.md
13
vm.md
@@ -74,6 +74,19 @@ wrapping around to 0.
|
||||
* Or
|
||||
* **Params**: REG1, REG2
|
||||
* `REG1 = REG1 | REG2`
|
||||
* Inv
|
||||
* **Params**: REG1
|
||||
* `REG1 = ~REG1`
|
||||
* Not
|
||||
* **Params**: REG1
|
||||
* ```
|
||||
if REG1 == 0 {
|
||||
REG1 = 0;
|
||||
} else {
|
||||
REG1 = 1;
|
||||
}
|
||||
```
|
||||
* Boolean NOT; equivalent of C's `!` unary operator
|
||||
* Xor
|
||||
* **Params**: REG1, REG2
|
||||
* `REG1 = REG1 ^ REG2`
|
||||
|
||||
Reference in New Issue
Block a user