Example when sum of bit addresses ≤ 7:
LAR1 P#8.2
U E [AR1,P#10.2]
Result:The input 18.4 is addressed
(by adding the byte and bit addresses)
Example when sum of bit addresses > 7:
L MD 0 at will calculated pointer, e.g. P#10.5
LAR1
U E [AR1,P#10.7]
Result: Addressed is input 21.4
(by adding the byte and bit addresses with carry)
3.7 Math instructions
Math instructions of two 16bit numbers.
The result is in ACCU1 res. ACCU1-L.
Com-
mand
Operand Parameter Function Length
in words
+I - Add up two integers (16bit)
(ACCU1-L)=(ACCU1-L)+(ACCU2-L)
1
-I - Subtract two integers (16bit)
(ACCU1-L)=(ACCU2-L)-(ACCU1-L)
1
*I - Multiply two integers (16bit)
(ACCU1)=(ACCU2-L)*(ACCU1-L)
1
/I - Divide two integers (16bit)
(ACCU1-L)=(ACCU2-L):(ACCU1-L)
The remainder is in ACCU1-H
1
Status word BR CC1 CC0 OV OS OR STA RLO /FC
Instruction depends on - - - - - - - - -
Instruction influences -
ü ü ü ü
- - - -
Example for pointer calcu-
lation
Fixed-point arithmetic
(16bit)
VIPA SPEED7
IL operations
Math instructions
HB00 | OPL_SP7 | Operation list | en | 18-30 30