Compiler and binary runner
This commit is contained in:
@@ -4,14 +4,18 @@ A flash emulator with my own stuff
|
||||
|
||||
## Opcodes
|
||||
|
||||
| OP | INST | Action |
|
||||
| --- | ----------------- | -------------------------------------- |
|
||||
| 0 | \n | Goes to the next instruction |
|
||||
| 1 | HLT | Stops further emulation of the program |
|
||||
| 2 | REG (r), (n) | Sets a registry to a number |
|
||||
| 3 | ADD (r), (r), (r) | Adds |
|
||||
| 4 | SUB (r), (r), (r) | Subtracts |
|
||||
| 5 | MUL (r), (r), (r) | Multiplies |
|
||||
| 6 | DIV (r), (r), (r) | Divides |
|
||||
| 7 | LABEL (s) | Creates a label |
|
||||
| 8 | JMP (s) | Jumps into a label |
|
||||
| OP | INST | Action |
|
||||
| ---- | ----------------- | -------------------------------------- |
|
||||
| 0x01 | HLT | Stops further emulation of the program |
|
||||
| 0x02 | REG (r), (n) | Sets a registry to a number |
|
||||
| 0x03 | ADD (r), (r), (r) | Adds |
|
||||
| 0x04 | SUB (r), (r), (r) | Subtracts |
|
||||
| 0x05 | MUL (r), (r), (r) | Multiplies |
|
||||
| 0x06 | DIV (r), (r), (r) | Divides |
|
||||
| 0x07 | LABEL (s) | Creates a label |
|
||||
| 0x08 | JMP (s) | Jumps into a label |
|
||||
| 0x09 | RA | Registry |
|
||||
| 0x0A | RB | Registry |
|
||||
| 0x0B | RC | Registry |
|
||||
| 0x0C | RD | Registry |
|
||||
| 0x0D | \n | Goes to the next instruction |
|
||||
|
||||
Reference in New Issue
Block a user