![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268368.webp)
329
Comparison Instructions
Section 3-7
Do not program another instruction between ZCP(088) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag. In this case, the results of instruction B might
change the results of ZCP(088).
Flags
Precautions
Do not program another instruction between ZCP(088) and an input condition
that accesses the result of ZCP(088) because the other instruction might
change the status of the Arithmetic Flags.
Example
When CIO 000000 is ON in the following example, the 16-bit unsigned binary
data in D00000 is compared to the range 0005 to 001F hex (5 to 31 decimal)
and the result is output to the Arithmetic Flags.
CIO 000200 is turned ON if 0005 hex
≤
content of D00000
≤
001F hex.
CIO 000201 is turned ON if the content of D00000 > 001F hex.
CIO 000202 is turned ON if the content of D00000 < 0005 hex.
A
ZCP
CD
LL
UL
Correct Use of ZCP(088)
Arithmetic Flag
(Example: Equal Flag)
A
ZCPL
CD
LL
UL
Incorrect Use of ZCP(088)
Arithmetic Flag
(Example: Equal Flag)
Instruction
B
Name
Label
Operation
Error Flag
ER
ON if LL > UL.
Greater Than Flag
>
ON if CD > UL.
OFF in all other cases.
Greater Than or Equal Flag
> =
Left unchanged.
Equal Flag
=
ON if LL
≤
CD
≤
UL.
OFF in all other cases.
Not Equal Flag
<>
Left unchanged.
Less Than Flag
<
ON if CD < LL.
OFF in all other cases.
Less Than or Equal Flag
< =
Left unchanged.
Negative Flag
N
Left unchanged.
Содержание 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...