Skip to content

akluth/lvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lauravm

lauravm is a small stack/register virtual machine experiment written in C, with a tiny Perl assembler for the assembly fixtures in test/as.

Requirements

  • gcc
  • make
  • perl
  • a POSIX-like shell for the test scripts

Build

make

The VM binary is written to src/lauravm.

Run a Program

First assemble an .as source file:

as/as test/as/mov.as -o test/bin/mov

Then run it:

src/lauravm -i test/bin/mov -x

Useful 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

Test

make test

The test target assembles every fixture in test/as and runs the resulting programs with a stack dump enabled.

Instruction Set

See INSTRUCTION-SET.md for registers, supported instructions, and the binary file format.

About

lauraVM: PoC and fingerstretching execercise for a small virtual machine executing bytecode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors