https://github.com/dentosal/stackvm
Simple stack-based virtual machine
https://github.com/dentosal/stackvm
assembler virtual-machine
Last synced: 2 months ago
JSON representation
Simple stack-based virtual machine
- Host: GitHub
- URL: https://github.com/dentosal/stackvm
- Owner: Dentosal
- License: mit
- Created: 2017-07-24T21:29:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T21:13:05.000Z (almost 9 years ago)
- Last Synced: 2025-01-26T06:24:52.279Z (over 1 year ago)
- Topics: assembler, virtual-machine
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StackVM (to be renamed)
A simple stack-based virtual machine and assembler. Development in early stages, nothing should be considered stable.
## Project goals
* stack-based
* relatively simple
* quirkless
* extensible (using [Devices](#Devices))
Execution speed is not considered important. However, it would be possible to write quite performant virtual machine with current restrictions. Memory effiency is not good for string processing, though.
I'm planning to create at least one higher-level programming language that compiles to StackVM assembly. I have also been thinking about stackvm-llvm transpiler, as well as compiling to JVM, Python virtual machine, Javascript or webassembly.
## Devices
Devices add "extra" functionality, such as stdio, file system, networking, and so on. Devices are *pluggable*, meaning that they might not be available on all platforms or configurations. This makes it extremely easy to sandbox applications by disabling some devices or even by using mock devices.
They are versioned separately from the core. A program can require specific version of a device.
## Dependencies
Python 3.6 or newer.
## Running programs
To compile StackVM assembly:
./compile.py sourcefile.sasm
And running a StackVM binary file:
./run.py sourcefile.svmb
## Known issue
* Unicode support is still only partial, and sometimes even incorrect
## License
This project is released under the MIT license. See [LICENSE](/LICENSE) for more information.