Tile VM
Instructions

OP-Code list

OP-CodeDescription
nopNo operation, does nothing.
pushPushes a value onto the stack.
popPops the top value off the stack.
addAdds two integers from the stack.
subSubtracts two integers from the stack.
multMultiplies two integers from the stack.
divDivides two integers from the stack.
modPerforms modulus operation on two integers.
dupDuplicates the top value on the stack.
clnClones the value at a given stack index.
swapSwaps the top two values on the stack.
addfAdds two floating-point numbers from the stack.
subfSubtracts two floating-point numbers from the stack.
multfMultiplies two floating-point numbers from the stack.
divfDivides two floating-point numbers from the stack.
incIncrements the top integer on the stack.
incfIncrements the top floating-point number on the stack.
decDecrements the top integer on the stack.
decfDecrements the top floating-point number on the stack.
jmpJumps to a specified instruction.
jzJumps if the top of the stack is zero.
jnzJumps if the top of the stack is not zero.
callCalls a function by address.
retReturns from a function call.
ci2fConverts an integer to a floating-point number.
ci2uConverts an integer to an unsigned integer.
cf2iConverts a floating-point number to an integer.
cf2uConverts a floating-point number to an unsigned integer.
cu2iConverts an unsigned integer to an integer.
cu2fConverts an unsigned integer to a floating-point number.
gtCompares two integers and checks if greater than.
gtfCompares two floating-point numbers and checks if greater than.
ltCompares two integers and checks if less than.
ltfCompares two floating-point numbers and checks if less than.
eqChecks if two integers are equal.
eqfChecks if two floating-point numbers are equal.
geChecks if an integer is greater than or equal to another.
gefChecks if a floating-point number is greater than or equal to another.
leChecks if an integer is less than or equal to another.
lefChecks if a floating-point number is less than or equal to another.
nativeCalls a native function.
hltHalts the execution of the program.