| Name | Size | |
|---|---|---|
| .gitignore | 13 B | log stats plain blame |
| Cargo.lock | 6.7 KiB | log stats plain blame |
| Cargo.toml | 63 B | log stats plain blame |
| README.md | 2.0 KiB | log stats plain blame |
| assembler | 105 B | log stats plain |
| detailed_demo.mp4 | 2.8 MiB | log stats plain blame |
| examples | 222 B | log stats plain |
| flake.lock | 564 B | log stats plain blame |
| flake.nix | 751 B | log stats plain blame |
| vm | 105 B | log stats plain |
tonkobali
Rust project for the Programming with Rust elective at FMI.
This is a small SUBLEQ-based virtual machine and assembler for it.
More information can be found in the READMEs of the appropriate crates.
Some example programs are provided in examples.
Detailed demo
Usage
Install cargo on your system.
For Nix-capable machines you may get an environment with everything you need with:
nix develop
To assemble and then execute the math.s program just execute:
cargo run --bin assembler -- ./examples/math.s
cargo run --bin vm -- ./program.bin
Wait until you see a prompt with HALTED with red background to the left of your cursor.
You're now in the interface of the virtual machine.
Then enter 1000.1001, you should get the following output:
1000: 55 1
To exit the vm enter quit.
Resources
Name
The name of this project has some logic behind it.
"SUBLEQ" can be shortened to "SL". "SL" also stands for Sierra Leone, a small african country. Sierra Leone is divided into 16 districts, the two center-most being "Tonkolili" and "Bombali".
Therefore, "tonkobali" represents the composition of the two central components inside SL. Before, the vm crate was called "tonkolili" and assembler - "bombali". These names were dropped because they were confusing.
