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.
Aryadev Chavali cb8b3f3b8c Fix off by one issues in register implementations
word register 0 refers to the first 8 bytes of the dynamic array.
Hence the used counter should be at least 8 bytes.  This deals with
those issues.  Also print more useful information in
vm_print_registers (how many byte|hword|word registers are currently
in use, how many are available).
2023-11-01 18:31:11 +00:00
2023-11-01 18:20:03 +00:00
2023-10-15 01:25:24 +01:00

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 need to link with the object files for base.c, darr.c and 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.

For clarity, one may build lib (make lib) then use the resulting object files to link and create bytecode for the virtual machine.

Description
No description provided
Readme 27 KiB
Languages
C 70.2%
C++ 26.5%
Makefile 3.3%