LVM-3 is a virtual machine (VM) that implements the LC-3 architecture and can be used to run LC-3 programs on modern computers. The VM currently only supports Linux, but it can be easily ported to other operating systems with minor API changes.
lvm3 <path to program file>
The VM expects files that have been written in LC-3 assembly and preassembled into machine code.
Two examples have been provided in the programs
directory (credit to Ryan Pendleton and Justin Meiners).
- Linux
- Zig nightly build
- Build the executable:
zig build
- Build and run the executable:
zig build run -- <path to program file>
- Run the tests:
zig build test