Crates.io | lib_stacked |
lib.rs | lib_stacked |
version | 0.1.2 |
source | src |
created_at | 2023-12-06 15:23:53.342872 |
updated_at | 2023-12-14 17:00:45.692098 |
description | Virtual Machine Byte Code For Compilers. |
homepage | |
repository | https://github.com/proxin187/stacked |
max_upload_size | |
id | 1060165 |
size | 46,070 |
header | program
Push a value onto the stack.
Type | OpCode | Args |
---|---|---|
push [u32] | 0x01 | [u8; 4] |
Pop a value of the stack.
Type | OpCode | Args |
---|---|---|
Pop | 0x02 | None |
Duplicate the top of the stack.
Type | OpCode | Args |
---|---|---|
Dup | 0x05 | None |
Swap the top values of the stack.
Type | OpCode | Args |
---|---|---|
Swap | 0x06 | None |
Dumps the top of the stack to stdout.
Type | OpCode | Args |
---|---|---|
Dump | 0x03 | None |
Halts the execution of the program.
Type | OpCode | Args |
---|---|---|
Halt | 0x04 | None |
Perform a binary expression on the stack.
Type | OpCode | Args |
---|---|---|
Add | 0x28 | None |
Sub | 0x29 | None |
Mul | 0x2A | None |
Div | 0x2B | None |
Jump to a label.
Type | OpCode | Args |
---|---|---|
jump [u32] | 0x6A | [u8; 4] |
Define a label with the specified u32 as identifier.
Type | OpCode | Args |
---|---|---|
labl [u32] | 0x4C | [u8; 4] |
This error trigger when you try to access memory out of bounds or you set the instruction pointer to an address out of bounds via the return instruction.