All Projects → tarekwiz → Smallvm

tarekwiz / Smallvm

A very small and minimal virtual machine written in rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Smallvm

Hyperplatform
Intel VT-x based hypervisor aiming to provide a thin VM-exit filtering platform on Windows.
Stars: ✭ 925 (+1612.96%)
Mutual labels:  virtual-machine
Rooster
Example of primitive stack based virtual machine
Stars: ✭ 31 (-42.59%)
Mutual labels:  virtual-machine
Hypervbackup
Utility for backing up HyperV virtual machines
Stars: ✭ 43 (-20.37%)
Mutual labels:  virtual-machine
Awesome Virtualization
Collection of resources about Virtualization
Stars: ✭ 846 (+1466.67%)
Mutual labels:  virtual-machine
Multidocker
Creates a system where users are forced to login in dedicated independent docker containers.
Stars: ✭ 21 (-61.11%)
Mutual labels:  virtual-machine
Ebcvm
EFI Byte Code Virtual Machine in userspace
Stars: ✭ 34 (-37.04%)
Mutual labels:  virtual-machine
Malboxes
Builds malware analysis Windows VMs so that you don't have to.
Stars: ✭ 900 (+1566.67%)
Mutual labels:  virtual-machine
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (+1850%)
Mutual labels:  virtual-machine
Esta
Interpreted language and bytecode VM of my own design written in Rust [Unmaintained]
Stars: ✭ 28 (-48.15%)
Mutual labels:  virtual-machine
Chip8
A multiplatform CHIP-8 emulator done in SDL 2. Implements all the opcodes for CHIP and SCHIP specifications.
Stars: ✭ 41 (-24.07%)
Mutual labels:  virtual-machine
Burrow
https://wiki.hyperledger.org/display/burrow
Stars: ✭ 851 (+1475.93%)
Mutual labels:  virtual-machine
Sysbench Docker Hpe
Sysbench Dockerfiles and Scripts for VM and Container benchmarking MySQL
Stars: ✭ 14 (-74.07%)
Mutual labels:  virtual-machine
Seax
A VM-based runtime environment for functional programming languages
Stars: ✭ 36 (-33.33%)
Mutual labels:  virtual-machine
Atmosphere
Atmosphere cloud platform
Stars: ✭ 7 (-87.04%)
Mutual labels:  virtual-machine
Cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
Stars: ✭ 49 (-9.26%)
Mutual labels:  virtual-machine
Hbc
API of homomorphic binary operations such as binary comparisons or binary divisions using the library HElib
Stars: ✭ 23 (-57.41%)
Mutual labels:  virtual-machine
Python chip16
A full implementation (tested) of chip16 virtual machine, or emulator as you wish, using python and rendering with opengl.
Stars: ✭ 31 (-42.59%)
Mutual labels:  virtual-machine
Dockerpi
A Virtualised Raspberry Pi inside a Docker image
Stars: ✭ 1,064 (+1870.37%)
Mutual labels:  virtual-machine
Kvmtop
A monitoring tool for black box virtual machines from KVM hypervisor level
Stars: ✭ 51 (-5.56%)
Mutual labels:  virtual-machine
The Hack General Purpose Computer
Using HDL, from Boolean algebra and elementary logic gates to building a Central Processing Unit, a memory system, and a hardware platform, leading up to a 16-bit general-purpose computer. Then, implementing the modern software hierarchy designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform; Including Virtual machine,Compiler and Operating system.
Stars: ✭ 39 (-27.78%)
Mutual labels:  virtual-machine

smallvm

A very minimal virtual machine written in rust.

The virtual machine has:

  • 8 Registers
  • A stack
  • A heap
  • Data types include: u8, i8, u16, i16, u32, i32, u64, i64, f32, f64

Instruction Set

Root assembly instructions

Instruction Left Input Right Input Operation
NOP No Operation
MOV Register Variable Move variable to register
MOVR Register Register Move register contents to another register
JMP Register Jump to memory location
JE Register Jump if equal
JNE Register Jump not equal
JG Register Jump if greater
JL Register Jump if less
CMP Register Register Compare two registers
ADD Register Register Add 2 registers, push result to stack
SUB Register Register Subtract 2 registers, push result to stack
MUL Register Register Multiply 2 registers, push result to stack
DIV Register Register Divide 2 registers, push result to stack
AND Register Register Bitwise AND on 2 registers, push result to stack
OR Register Register Bitwise OR on 2 registers, push result to stack
XOR Register Register Bitwise Exclusive OR on 2 registers, push result to stack
SHR Register Variable Shift register to the right by Variable
SHL Register Variable Shift register to the left by Variable
VPUSH Variable Push variable contents on to stack
VPUSHR Register Push register contents on to stack
VPOP Variable Pops variable from stack to register
CALL Register Calls function at address in the register
RET Return from routine
HALT Halt CPU/Exit
VSTORE Address Variable Store var into VMHeap at specific address from stack
VLOAD Address Load var from VMHeap and push value to stack
VSTORER Address Register Store var in VMHeap from register contents
VLOADR Register Address Loads a variable from VMHeap to register

Debugging assembly instructions

Instruction Left Input Right Input Operation
PRINTR Register Print contents of register
PRINTV Address Print contents of variable at address

Example Program:

1 0 0 10    MOV(R0, 10)  
1 1 0 8     MOV(R1, 8)  
1 2 0 22    MOV(R2, 23) Location to jump to if R0 is greater than R1  
1 3 0 25    MOV(R3, 25) Location to jump to otherwise  
6 0 1       CMP(R0, R1)  
23 2        JG(R2) Jump if R0 is greater than R1  
3 3         JMP(R3)  
7 0         PRINTR(R0)  
22          HALT()  
7 1         PRINTR(R1)  
22          HALT()  
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].