wlvm
Virtual machine with associated language written in Rust
Installation
cargo install wlvm
Virtual Machine datasheet
Registers
There are 6 multi purposes registers, marked from a to f.
There are 3 special registers :
- sp : The stack pointer
- ip : The instruction pointer
- st : The stack top value
Instruction Set
- psh \ : Pushes an integer onto the stack
- add \ \ : Adds the content of registerb to registera
- sub \ \ : Substracts the content of registerb to registera
- mul \ \ : Multiplies the content of registerb to registera
- div \ \ : Divides the content of registera by registerb
- pop : Pops the stack
- set \ \ : Sets register's value to the specified integer
- mov \ \ : Copies content of registerb in registera
- dst : Prints the stack
- drg \ : Prints the content of the specified register
- peek : Prints the value of the st register
- hlt : Stops the program