Skip to content
/ rbvm Public

Register-based virtual machine capable of arithmetic and jumps.

License

Notifications You must be signed in to change notification settings

mkashirin/rbvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBVM

Elementary register-based virtual machine (RBVM) implemented in Rust.

Usage

To start up a REPL execute the following:

rbvm repl

To run a file with a program:

rbvm run <FILE>

Opcode specification

RBVM instructions are built as the following specification describes:

+---------------------------------------------------+
| 32 bits ->                                        |
|---------------------------------------------------|
| Opcode     | 24-bit pad ->                        |
| Opcode     | Register   | 16-bit pad ->           |
| Opcode     | Register   | Register   | 8-bit pad  |
| Opcode     | Register   | Integer    | 8-bit pad  |
| Opcode     | Register   | Register   | Register   |
+---------------------------------------------------+

About

Register-based virtual machine capable of arithmetic and jumps.

Topics

Resources

License

Stars

Watchers

Forks

Languages