Add seti and int operators

This commit is contained in:
2019-11-23 12:21:14 +01:00
parent f0e00ff018
commit 99f616e1e4
16 changed files with 153 additions and 66 deletions

View File

@@ -61,6 +61,8 @@ All symbols are reserved keywords and can therefore NOT be used as labels.
- `muli` multiply the first by the second argument and store the result in the third argument
- `shli` shift left the first argument by the number of positions given by the second argument and store the result in the third argument
- `shri` shift right the first argument by the number of positions given by the second argument and store the result in the third argument
- `seti` set the first register argument to the second argument
- `int` calls the interrupt specified by the first (integer) argument
### Control Flow
@@ -68,3 +70,9 @@ All symbols are reserved keywords and can therefore NOT be used as labels.
- `lti` execute next statement if argument 1 is less than argument 2 else skip the next statement
- `gti` execute next statement if argument 1 is greater than argument 2 else skip the next statement
- `eqi` execute the next statement if argument 1 is equal to argument 2 else skip the next statement
## Interupts
- 0..9 range:
- `0` put value of register A as ASCII character on stdout
- `1` put value of register A as decimal integer on stdout