276
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
Arithmetic Flag
(Example: Equal Flag)
Correct Use of ZCP(088)
A
ZCPL
CD
LL
UL
Arithmetic Flag
(Example: Equal Flag)
Incorrect Use of ZCP(088)
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.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...