Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smercer10/lvm3
Lightweight LC-3 virtual machine.
https://github.com/smercer10/lvm3
lc3 linux vm zig
Last synced: 7 days ago
JSON representation
Lightweight LC-3 virtual machine.
- Host: GitHub
- URL: https://github.com/smercer10/lvm3
- Owner: smercer10
- License: mit
- Created: 2024-07-20T07:31:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T16:14:32.000Z (4 months ago)
- Last Synced: 2024-07-30T20:25:21.053Z (4 months ago)
- Topics: lc3, linux, vm, zig
- Language: Zig
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LVM-3
LVM-3 is a virtual machine (VM) that implements the [LC-3 architecture](https://www.cs.utexas.edu/~fussell/courses/cs310h/lectures/Lecture_10-310h.pdf) 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.
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/smercer10/lvm3/blob/main/LICENSE)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/smercer10/lvm3/ci.yml?label=CI)](https://github.com/smercer10/lvm3/actions/workflows/ci.yml)## Usage
```bash
lvm3
```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](https://github.com/rpendleton) and [Justin Meiners](https://github.com/justinmeiners)).
## Build Locally
### Prerequisites
* Linux
* Zig nightly build### Commands
* Build the executable:
```bash
zig build
```* Build and run the executable:
```bash
zig build run --
```* Run the tests:
```bash
zig build test
```