blob: 3a313e9a91b99fbfd00e2ab4f7983822bebf9fa6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#+title: Oreo's Virtual Machine (OVM)
#+author: Aryadev Chavali
#+date: 2023-10-15
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 need to link with the object files for
[[file:lib/base.c][base.c]], [[file:lib/darr.c][darr.c]] and
[[file:vm/inst.c][inst.c]] to be able to properly target the OVM. The
basic idea is to create instructions via ~inst_t~ then using the
~inst(s)_write_*~ API to generate bytecode (and write to a file).
Then to execute the program, the virtual machine interpreter ~ovm.out~
is used.
|