Table of Contents

MPINO STUDIO 2 Phase 4-4 · Arithmetic Box Functions

These commands store arithmetic, increment, scaling, and floating-point results.

These commands store arithmetic, increment, scaling, and floating-point results.

Common Rules

The first two values are sources and the final address stores the result. INC and DEC change the target itself by one. The data format and range follow the memory rules in Phase 2.

Box Function List

Command Meaning
ADD Adds two values and stores the result in the destination.
SUB Subtracts the second value from the first and stores the result in the destination.
MUL Multiplies two values and stores the result in the destination.
DIV Divides the first value by the second and stores the quotient.
MOD Divides the first value by the second and stores the remainder.
INC Increments the destination by one and stores it back at the same address.
DEC Decrements the destination by one and stores it back at the same address.
SCALE Linearly maps an integer from an input range to an integer output range.
FLOOR Stores the greatest integer that is not larger than the source.
SQRT Stores the square root of the source.