Compare Decimal
(CP)
General
Description
Format
(55)
Condition Code
Interrupt
Action
Decimal Arithmetic
Instructions
• The operand specified by
the
first address
(Bt/D
1
)
is algebraically
compared with
the
operand specified by
the
second address
(BdD
2
).
The
results
of
the
comparison determine the condition code.
The operands
may
be variable in length up to 16 bytes
and
must
be in
packed format.
If
the
fields
are
unequal in length,
the
shorter
is extended
with high
order
zeros.
If
operands overlap,
their
rightmost byte location
must
be identical.
Overflow cannot occur
as
a result
of
this operation.
F9
o
7 8
11 12
15
16 19
20
31 32
35
36
47
• 0 -
the
fields
are
numerically equal.
1 - the first operand is algebraically less
than
the
second operand.
2 -
the
first operand is algebraically
greater
than
the second operand.
• Address
error:
Addressing.
Data
error.
Notes •
1.
All signs
and
digits
are
checked
for
validity.
2.
Both operands
are
unaltered.
3. Comparison is
from
right
to left.
4. A positive zero compares equally
to
a negative zero.
161