aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-01 18:41:01 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-01 18:41:01 +0000
commit044afc302e08d1089b2cde9c5245a18deea0fbb6 (patch)
treef8e1c8adee609d2b622429a347fc41e2843da404 /README.org
parentcb8b3f3b8c96a44d65cfd5056c8d973750ac7525 (diff)
downloadovm-044afc302e08d1089b2cde9c5245a18deea0fbb6.tar.gz
ovm-044afc302e08d1089b2cde9c5245a18deea0fbb6.tar.bz2
ovm-044afc302e08d1089b2cde9c5245a18deea0fbb6.zip
Updated README with build instructions
Diffstat (limited to 'README.org')
-rw-r--r--README.org31
1 files changed, 28 insertions, 3 deletions
diff --git a/README.org b/README.org
index 71d9437..ae91bdd 100644
--- a/README.org
+++ b/README.org
@@ -2,9 +2,34 @@
#+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
+A stack based virtual machine in C11, with a dynamic register setup
+which acts as variable space. Deals primarily in bytes, doesn't make
+assertions about typing and is very simple to target.
+* How to build
+Requires =GNU make=, a compliant C11 compiler. Code base has been
+tested against =gcc= and =clang=, but given how the project has been
+written without use of GNU'isms it shouldn't be an issue to compile
+using something like =tcc= or another compiler (look at
+[[file:Makefile::CC=gcc][here]] to change the compiler).
+
+To build everything simply run ~make~. This will build:
++ [[file:lib/inst.c][instruction bytecode system]] which allows one to
+ target the VM by writing and reading instruction bytecode
++ [[file:vm/main.c][VM executable]] which can execute bytecode (your
+ =java= executable)
++ [[file:asm/main.c][Assembler executable]] which can assemble
+ compliant assembly code to VM bytecode
++ [[file:examples/][Assembly examples]] which provide some source code
+ examples on common programs one may write. Use this to figure out
+ how to write compliant assembly.
+
+One may also build each component individually through the
+corresponding recipe:
++ ~make lib~
++ ~make vm~
++ ~make asm~
++ ~make examples~
+* Instructions to target the virtual machine
You need to link with the object files for
[[file:lib/base.c][base.c]], [[file:lib/darr.c][darr.c]] and
[[file:lib/inst.c][inst.c]] to be able to properly target the OVM.