Compare Rn < lower bound or
Rn > upper bound
and Set Condition Codes
CMP2 <ea>, Rn
Attributes: Size = (Byte, Word, Long)
Description: Compares the value in Rn to each bound. The
effective address contains the bounds pair: the lower bound
followed by the upper bound. For signed comparisons, the
arithmetically smaller value should be used as the lower
bound. For unsigned comparisons, the logically smaller
value should be the lower bound.
The size of the data and the bounds can be specified as byte,
word, or long. If Rn is a data register and operation size
is a byte or word, only the appropriate low-order part of
Rn is checked. If Rn is an address register and the operation
size is byte or word, the bounds operands are sign extended
to 32 bits and the resultant operands are compared to the full
32 bits of An.
If the upper bound equals the lower bound, the valid range
is a single value.
X Not affected.
Z Set if Rn is equal to either bound. Cleared otherwise.
C Set if Rn is out of bounds. Cleared otherwise.
Size field -- Specifies the size of the operation.
00 -- Byte operation.
01 -- Word operation.
10 -- Long operation.
Effective Address field -- Specifies the location of the bounds
operands. Only control addressing modes are allowed as
DA field -- Specifies whether an address register or data register
is to be checked.
0 -- Data register.
1 -- Address register.
Register field -- Specifies the address or data register that
contains the value to be checked.