Skip to content

nachodall/lc3-vm-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LC-3 Virtual Machine

A full implementation of the LC-3 (Little Computer 3) architecture written in Rust. This project was developed as part of the LambdaClass Engineering Residency.

Features

  • Complete Instruction Set: Implements all standard LC-3 opcodes (ADD, AND, BR, JMP, JSR, JSRR, LD, LDI, LDR, LEA, NOT, ST, STI, STR, TRAP).
  • Hardware Accurate: Accurately replicates condition flags (N, Z, P) and memory-mapped I/O operations.
  • Interactive Software Support: Fully capable of executing complex .obj files, including interactive games with subroutine linkages and indirect memory addressing.

Prerequisites

To compile and run this VM, you need to have the Rust toolchain installed:

  • Rust / Cargo: 1.80.0 or later.

Usage

You can run any compiled LC-3 object file by passing its path as an argument.

# Run a basic Hello World program
cargo run -- assets/hello.obj

# Run LC-3 Rogue
# Controls: W, A, S, D to move the '@' character to the 'D' door.
cargo run -- assets/rogue.obj

# Run 2048
# Controls: W, A, S, D to slide tiles.
cargo run -- assets/2048.obj
# lc3-vm-rust

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors