![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268497.webp)
458
Symbol Math Instructions
Section 3-11
Description
–BC(416) subtracts BCD values in Su and CY from Mi and outputs the result
to R. If the result is negative, it is output to R as a 2’s complement.
Flags
Precautions
If Mi and/or Su are not BCD, an error is generated and the Error Flag will turn
ON.
If as a result of the subtraction, the content of R is 0000 hex, the Equals Flag
will turn ON.
If an addition results in a borrow, the Carry Flag will turn ON.
Note
To clear the Carry Flay (CY), execute the Clear Carry (CLC(041)) instruction.
Examples
When CIO 000000 is ON in the following example, D00110 and CY will be
subtracted from D00100 as 4-digit BCD values, and the result will be output to
D00120.
3-11-16 DOUBLE BCD SUBTRACT WITH CARRY: –BCL(417)
Purpose
Subtracts 8-digit (double-word) BCD data and/or constants with the Carry
Flag (CY).
Ladder Symbol
CY
R
CY
(BCD)
(BCD)
(BCD)
–
Mi
Su
CY will turn
ON when there
is a borrow.
Name
Label
Operation
Error Flag
ER
ON when Mi is not BCD.
ON when Su is not BCD.
OFF in all other cases.
Equals Flag
=
ON when the result is 0.
OFF in all other cases.
Carry Flag
CY
ON when the subtraction results in a borrow.
OFF in all other cases.
–BCL(417)
R
Mi
Su
Mi
: 1st minuend word
Su
: 1st subtrahend word
R
: 1st result word
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...