Skip to content

Latest commit

 

History

74 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provrb VM

A tiny custom virtual machine and assembly-like language written in C.

This project is a great example of a small interpreter pipeline:

  • read .pvb source files
  • tokenize instructions with a lexer
  • convert them into Instruction objects
  • execute them in a simulated machine with registers, flags, and a stack
  • support low-level syscall-like behavior

Why this project is interesting

It blends ideas from:

  • assembly language
  • virtual machines
  • interpreters
  • low-level systems programming
  • CPU-style control flow and branching

Quick example

_start:
    mov $5, rax
    mov $7, rbx
    add rbx, rax
    push rax
    print
    exit

This moves values into registers, adds them, pushes the result onto the stack, prints the stack, and exits.

Learn more

The full guide lives here:

  • docs/language-guide.md

It includes:

  • instruction references
  • syscall documentation
  • beginner-friendly explanations
  • recruiter-friendly summaries
  • examples you can run in the repo

Repo layout

  • src/lexer.c - parsing and tokenization
  • src/inst.h - instruction and syscall definitions
  • src/inst.c - execution logic and VM runtime
  • examples/ - sample programs
  • docs/ - language notes and reference material

Build and run

./build.sh

This compiles the VM and runs it against file.pvb.

Visuals

About

A virtual machine and lexer in C for a custom Aseembly-like programming language (.pvb)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages