Skip to content

Basic Arithmetic ​

These instructions perform scalar arithmetic and update numeric variables.

OpcodeArgumentsOperands (stack)Description
addtypeleft, rightReplaces two numeric operands with left + right in the selected type.
subtypeleft, rightReplaces two numeric operands with left - right in the selected type.
multypeleft, rightReplaces two numeric operands with left * right in the selected type.
divtypeleft, rightReplaces two numeric operands with left / right in the selected type.
modtypeleft, rightReplaces two numeric operands with the remainder of left / right in the selected type.
negtypevalueReplaces one numeric operand with its negation in the selected type.
incname, type-Increments the named or indexed numeric variable and pushes the updated value.
decname, type-Decrements the named or indexed numeric variable without changing the stack.