Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 703 Bytes

README.md

File metadata and controls

18 lines (16 loc) · 703 Bytes

A simple VM made in C.

Instruction set :

    PSH,  Pushes a value into the stack
    ADD,  Adds the latest two values in the stack and pushes the result
    POP,  Pops a value from the stack
    SET,  Sets a register's value
    DVD,  Divides the last two values in the stack and pushes the result
    MLT,  Multiplies the last two values in the stack and pushes the result
    SUB,  Substracts the last two values in the stack and pushes the result
    MOV,  Moves values between registers
    SET,  Sets a register's value
    MIR,  Moves the last value in the stack into the specified register
    MOR,  Moves the value in the specified register into the stack
    HLT,  Stops the program