Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```