This repository has been archived on 2025-11-10 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
36bcd90c81f7dc0d7ab268a30768c80ff53eb93d
For each cycle, print the cycle and any changes. We track changes on the stack by remembering the previous stack pointer. For registers, I remember the previous array of registers and do a byte level compare of the current registers and the remembered ones. Produces pretty log messages and an easy way to track execution.
Oreo's Virtual Machine (OVM)
A stack based virtual machine in C11. Deals primarily in bytes, doesn't make assertions about typing and is very simple to target.
Instructions to target
You'll need inst.h for the instruction API. You
must convert user programs to instructions via inst_t, then emit
bytecode via insts_write_bytecode*.
This is all that is necessary to create a language which targets this virtual machine. To execute that bytecode, a user must use my virtual machine program.
Description
Languages
C
70.2%
C++
26.5%
Makefile
3.3%