Flags
Name
Error Flag
ER
Equals Flag
=
Carry Flag
CY
Function
+BC
+BC(406) adds BCD values in Au, Ad, and CY and outputs the result to R.
+BCL
+BCL(407) adds the BCD values in Au and Au+1, Ad and Ad+1, and CY and outputs the result to R,
R+1.
Hint
• To clear the Carry Flay (CY), execute the Clear Carry (CLC(041)) instruction.
Sample program
0.00
0.00
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
• ON when Au is not BCD.
• ON when Ad is not BCD.
• OFF in all other cases.
• ON when the result is 0.
• OFF in all other cases.
• ON when the addition results in a carry.
• OFF in all other cases.
Au
Ad
+
CY will turn ON
CY
R
when there is a
carry.
Au+1
Ad+1
+
CY will turn ON
CY
R+1
when there is a
carry.
+BC
When CIO 0.00 is ON in the following example, D100, D110,
and CY will be added as 4-digit BCD values, and the result will
D100
be output to D120.
D110
D120
+BCL
When CIO 0.00 is ON in the following example, D101, D100,
D111, D110, and CY will be added as 8-digit BCD values, and
D100
the result will be output to D121 and D120.
D110
D120
Operation
+BC
• ON when Au, Au +1 is not BCD.
• ON when Ad, Ad +1 is not BCD.
• OFF in all other cases.
• ON when the result is 0.
• OFF in all other cases.
• ON when the addition results in a carry.
• OFF in all other cases.
(BCD)
(BCD)
CY
(BCD)
Au
(BCD)
(BCD)
Ad
CY
R
(BCD)
3. Instructions
+BCL
3
349
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers