https://github.com/nomemory/lc3-vm
A LC3 virtual machine implementation in a few lines of C code
https://github.com/nomemory/lc3-vm
Last synced: over 1 year ago
JSON representation
A LC3 virtual machine implementation in a few lines of C code
- Host: GitHub
- URL: https://github.com/nomemory/lc3-vm
- Owner: nomemory
- Created: 2021-11-26T22:54:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T01:40:19.000Z (over 3 years ago)
- Last Synced: 2025-03-29T22:08:17.953Z (over 1 year ago)
- Language: C
- Size: 23.4 KB
- Stars: 373
- Watchers: 8
- Forks: 61
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lc3-vm
Blog article:
https://www.andreinc.net/2021/12/01/writing-a-simple-vm-in-less-than-125-lines-of-c
A LC3 virtual machine implementation in a few lines of C code.
Code is experimental. Things are not final.
The machine should be able to run simple LC3 programs.
Compile the sample program:
`gcc -Wall -std=c11 simple_program.c`
Compile the `vm`:
`gcc -Wall -std=c11 vm.c vm_dbg.c`
Run the program:
`./a.out simple_program.obj`