kladdvara is my toy virtual machine for the Little Computer 3 (LC-3) architecture.
I referenced Justin Meiners and Ryan Pendleton's "Write your Own Virtual Machine" guide to write this; many thanks to them! Try kladdvara out with their sample programs.
The machine kladdvara emulates has a couple limitations at the moment. Its only I/O is teletype, so it only supports text-based applications. Trap routines are handled directly by the emulator; they're not written to be handled by LC-3 routines. The machine also skips reserved instructions instead of panicking.
kladdvara is purely a realtime interpreter, and it doesn't validate binaries before nor during runtime. This means that invalid binaries will simply crash the program.
This project uses Cargo.
Run the project for dev:
cargo runOr build it:
cargo buildkladdvara takes one argument: a path to an LC-3 binary.
Examples:
kladdvara 2048.objcargo run 2048.objGNU General Public License v3.0 or later. See license in LICENSE.md.