LC3-rs is a Rust implementation of the LC-3 virtual machine. The project aims to provide a simple, fast, and educational LC-3 VM for studying computer architecture, assembly language, and emulation concepts. This repository contains the core emulator, useful tools, and documentation to help you learn and use the LC-3 system.
- Written in Rust for high performance and safety.
- Loads and executes LC-3 object files (
.obj). - Built-in support for standard LC-3 trap routines (I/O).
- Clear, modular codebase suited for learning and extension.
- Command-line interface for running and debugging LC-3 programs.
- Rust and Cargo (latest stable recommended)
Clone the repository and build with Cargo:
git clone https://github.com/matdexir/lc3-rs.git
cd lc3-rs
cargo build --releaseRun an LC-3 program:
cargo run --release -- path/to/program.objYou can pass an LC-3 object file as an argument to the executable:
./target/release/lc3-rs examples/hello.objsrc/— Rust source code for the emulator.examples/— Example LC-3 programs and object files.
Contributions, issues, and feature requests are welcome! Please open an issue or a pull request for any suggestions and improvements.
This project is licensed under the MIT License - see the LICENSE file for details.