From 3200e97324f10b2840817fffafbe4368dc3cb219 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 26 Oct 2023 10:22:26 +0100 Subject: Updated README for targeting VM --- README.org | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index 562ad67..3a313e9 100644 --- a/README.org +++ b/README.org @@ -5,10 +5,11 @@ 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 [[file:src/inst.h][inst.h]] for the instruction API. You -must convert user programs to instructions via ~inst_t~, then emit -bytecode via ~insts_write_bytecode*~. +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). -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. +Then to execute the program, the virtual machine interpreter ~ovm.out~ +is used. -- cgit v1.2.3-13-gbd6f