shraddhaag/toyvm: A toy VM created for learning for the LC3 computer. - shraddhaag/toyvm

github.com · 2026-10-04 · by Long Nguyen ·github
A toy VM created for learning for the LC3 computer. - GitHub - shraddhaag/toyvm: A toy VM created for learning for the LC3 computer.

shraddhaag/toyvm

A toy VM created for learning for the LC3 computer. - shraddhaag/toyvm

7 stars · 0 forks

README

Toy VM VM for the Little Computer 3. This is created for the purpose of learning about VMs, disassemblers and property based testing. Inspired by Justin Meiners and Ryan Pendleton's Write Your Own VM.

To test out the LC3 instruction implementation, I am using 2 kind of tests:

Property based tests which makes use of Hegel's library for Golang, hegel-go, found in instructions_property_test.go. Traditional example based tests, found in instructions_test.go Inspired by Justin Meiners and Ryan Pendleton's Write Your Own VM.

Emulator Before implementing the VM itself, I wanted to understand:

What is the disassembled output for an LC3 compatible object file. What does the changing registers and memory look like?

Initially I implemented a disassembler. Later, I converted it into a full blown emulator! You can try it out here: lc3.shraddhaag.dev. Usage of LLMs The VM is written entirely by hand. The tests (both table based tests and property based tests) and the emulator are written with the aid of LLMs.

source

github.com · 1 images · 103 links

Comments (0)

No comments yet