245
Comparison Instructions Section 3-6
Applicable Program Areas
Operand Specifications
Description ZCPL(116) compares the 32-bit signed binary data in CD+1, CD with the
range defined by LL+1, LL and UL+1, UL and outputs the result to the Greater
Than, Equals, and Less Than Flags in the Auxiliary Area. (The Less Than or
Equal, Greater Than or Equal, and Not Equal Flags are left unchanged.)
Arithmetic Flag Status
The following table shows the status of the Arithmetic Flags after execution of
ZCPL(116).
Using ZCPL(116) Results in the Program
When ZCPL(116) is executed, the result is reflected in the Arithmetic Flags.
Control the desired output or right-hand instruction with a branch from the
same input condition that controls ZCPL(116).
Do not program another instruction between ZCPL(116) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag.
Block program areas Step program areas Subroutines Interrupt tasks
OK OK OK OK
Area CD LL UL
CIO Area CIO 0 to CIO 6142
Work Area W0 to W510
Holding Bit Area H0 to H510
Auxiliary Bit Area A0 to A958
Timer Area T0000 to T4094
Counter Area C0000 to C4094
DM Area D0 to D32766
Indirect DM addresses in
binary
@ D0 to @ D32767
Indirect DM addresses in
BCD
*D0 to *D32767
Constants #0000 0000 to #FFFF FFFF (binary)
&0 to &4294967295 (unsigned decimal)
Data Registers ---
Index Registers IR0 to IR15
Indirect addressing using
Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
ZCPL(116)Result Flag status
>=<
CD+1, CD > UL+1, UL ON OFF OFF
CD+1, CD = UL+1, UL OFF ON
LL+1, LL < CD+1, CD < UL+1, UL
CD+1, CD = LL+1, LL
CD+1, CD < LL+1, LL OFF ON