Manual – IPOSplus®
303
23
Arithmetic commands
Assembler – Commands
MUL/MULTIPLY
The MUL command multiplies a variable with a constant or a variable (observing the
signs).
DIV/DIVISION
The DIV command divides a variable by a variable or a constant (observing the signs).
The result is the predecimal number of the quotient.
23.3.2 Auxiliary arithmetic functions NOT/MOD
NOT
The command negates the entire content of a variable bit-by-bit.
Command structure
Mxxx MUL X1 * X2
Mxxx: Label (optional)
X1: Variable (factor and product)
X2: Variable or constant (factor)
MUL HXX * HYY
Variable HXX is the result of the multiplication of variables HXX and HYY.
MUL HXX * K
Variable HXX is the result of the multiplication of variable HXX and a con-
stant K.
Example 1
SET H01 = -3MUL H01 * 50
After the MUL command, H01 = -150.
Example 2
SET H01 = +50000SET H02 =
+50000MUL H01 * H02
[0x0000C350][0x0000C350][0
x9502F900]
The number range has been exceeded. After multiplication, H01 has the
value -1794967296.
Note
If the number range is exceeded during multiplication, the result is incor-
rect. There is no error message.
Command structure
Mxxx DIV X1/X2
Mxxx: Label (optional)
X1: Variable (dividend and quotient)
X2: Variable or constant (divisor)
DIV HXX/HYY
Variable HXX is the result of the division of variables HXX and HYY.
DIV HXX/K
Variable HXX is the result of the division of variables HXX and a constant
K.
Example
SET H01 = -13SET H02 = +3DIV H01/H02
After the DIV command, H01 = -4.
Note
Division by zero leads to an undefined result. There is no error message.
Command structure
Mxxx NOT X1 = NOT (X2)
Mxxx: Label (optional)
X1: Variable (Result of the operation)
X2: Variable (output value)
NOT HXX = NOT (HYY)
Variable HXX negates the variable HYY bit-by-bit. In this way, the hexa-
decimal sum of HXX and HYY = 0xFFFFFFFF.
Example
SET H02 = +1NOT H01 = NOT
(H02)
[0x00000001][0xFFFFFFFE]
After the NOT command, H01 = -2.
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n