Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numpad/antvm
https://github.com/numpad/antvm
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/numpad/antvm
- Owner: numpad
- Created: 2017-04-02T14:08:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-04T22:07:14.000Z (almost 8 years ago)
- Last Synced: 2024-10-27T18:42:04.315Z (2 months ago)
- Language: C
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ant vm
### Instruction set
| mnemonic | opcode | parameter | description |
|----------|-------:|-----------|-------------|
| NOP | 0x00 | | do nothing |
| PSH | 0x01 | `byte` | load absolute value |
| LDM | 0x02 | `word` | load word at address |
| LDS | 0x03 | `word` | load bytes until encountering '\0' (included) |
| POP | 0x04 | | pop |
| RET | 0x0a | `byte` | return from function, parameter is number of return values |
| CALL | 0x0c | `word` | call function at |
| HLT | 0x0d | | stops execution, returns value on top of stack |
| JMP | 0x10 | `word` | jump to address |
| JEZ | 0x11 | `word` | jump to address if stack top is 0 |
| PUTC | 0x30 | | print accumulator value as ascii |