255
When CIO 000000 is ON in the following example, the content of CIO 0020 is
divided by the content of CIO 1209 and the results is placed in D00017 and
D00018. Example data and calculations are shown below the program.
R: D00017 R + 1: D00018
11500002
Dd: CIO 0020
3452
Quotient Remainder
Dd: CIO 1209
0003
(073)
DIV 0020 1209 D00017
0000
00
Address Instruction Operands
00000 LD 000000
00001 DIV(073)
0020
1209
D00017
5-18-7 DOUBLE BCD ADD: ADDL(074)
Variations
j ADDL(074)
(074)
ADDL Au Ad R
Operand Data AreasLadder Symbol
Au: 1
st
augend word CIO, G, A, T, C, #, DM
R: 1
st
result word CIO, G, A, DM
Ad: 1
st
addend word CIO, G, A, T, C, #, DM
When the execution condition is OFF, ADDL(074) is not executed. When the
execution condition is ON, ADDL(074) adds the content of CY to the 8-digit val-
ue in Au and Au+1 to the 8-digit value in Ad and Ad+1 and places the result in R
and R+1. CY will be set if the result is greater than 9999 9999.
Au + 1 Au
Ad + 1 Ad
R + 1 R
+
CY
CY
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to ADD(070) and ADDL(074) are +BC(406) and
+BCL(407).
Au and Ad must be BCD.
Note Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of Au or Ad is not BCD.
Content of *DM word is not BCD when set for BCD.
CY (A50004): There is a carry in the result.
EQ (A50006): The result is 0.
When CIO 000003 is ON, the following program adds two 12-digit numbers, the
first contained in CIO 0020 through CIO 0022 and the second in D00010 through
D00012. The result is placed in D02000 through D02002. In the second addition
(using ADD(070)), any carry from the first addition will be automatically included.
Example
Description
Precautions
Example
BCD Calculation Instructions Section 5-18