https://github.com/noot/stack-machine
simple c implementation of a virtual stack machine
https://github.com/noot/stack-machine
Last synced: about 2 months ago
JSON representation
simple c implementation of a virtual stack machine
- Host: GitHub
- URL: https://github.com/noot/stack-machine
- Owner: noot
- Created: 2018-06-16T20:36:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-29T22:35:36.000Z (about 8 years ago)
- Last Synced: 2025-01-13T11:13:27.576Z (over 1 year ago)
- Language: C
- Size: 236 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stack-machine
simple c implementation of a virtual stack machine
# to run
./stackVM program.S
./stackVM program.S program1.S
and so on.
# opcodes
```
00 halt
01 push
02 pop
03 add
04 sub
05 mod
10 b
11 bnz
12 bz
13 ret
1E swap
1F cmp
FF nop
```
any invalid opcode is assumed to be a nop