lauravm is a small stack/register virtual machine experiment written in C,
with a tiny Perl assembler for the assembly fixtures in test/as.
gccmakeperl- a POSIX-like shell for the test scripts
makeThe VM binary is written to src/lauravm.
First assemble an .as source file:
as/as test/as/mov.as -o test/bin/movThen run it:
src/lauravm -i test/bin/mov -xUseful VM options:
-i program binary program to run
-s stack-size stack size in integer slots, defaults to 256
-x print a register and stack summary after execution
-h print usage
make testThe test target assembles every fixture in test/as and runs the resulting
programs with a stack dump enabled.
See INSTRUCTION-SET.md for registers, supported instructions, and the binary
file format.