Arithmetic Operations
Numerical Data Manipulation
ldnc - Load Numerical Constant
ldnc <type> <constant>
Takes two operands, the numerical type identifier and the constant expression. Pushes the value of the constant to the evaluation stack with the designated numerical type.
cstnv - Cast Numerical Value
cstnv <from_type> <to_type>
Takes two operands, the source type identifier (‘from’) and the destination type identifier (‘to’). Casts the last value on the evaluation stack from type from_type to type to_type.
Numerical Type Identifiers
i8, int8i16, int16i32, int32i64, int64u8, uint8u16, uint16u32, uint32u64, uint64f32, float32f64, float64
Arithmetic Operations
add - Add Two Numbers
add <type>
Takes one operand, the numerical type identifier specifying the size and type of the operation. Takes the last two values off of the evaluation stack as numbers of type type and adds them, pushing the result to the evaluation stack. Both stack operands must be of type type.
add - Subtract Two Numbers
sub <type>
Takes one operand, the numerical type identifier specifying the size and type of the operation. Takes the last value off of the evaluation stack and subtracts it from the next value off of the evaluation stack, pushing the result to the evaluation stack. Both stack operands must be of type type.
mul - Multiply Two Numbers
mul <type>
Takes one operand, the numerical type identifier specifying the size and type of the operation. Takes the last two values off of the evaluation stack as numbers of type type and multiplies them, pushing the result to the evaluation stack. Both stack operands must be of type type.
div - Divide Two Numbers
div <type>
Takes one operand, the numerical type identifier specifying the size and type of the operation. Takes the last value off of the evaluation stack and divides the next value off of the evaluation stack by the aformentioned value, pushing the result to the evaluation stack. Both stack operands must be of type type. Effectively, the last value on the evaluation stack is the divisor, the next value is the dividend, and the quotient is pushed to the evaluation stack.