Zero
and
Add
(ZAP)
General
Description
Format
(55)
Condition Code
Interrupt
Action
Decimal Arithmetic
Instructions
• The operand specified
by
the
second address
(BdD
2
)
is loaded into
the
location specified by
the
first address (B1/D
1
).
The operation is equivalent
to
an
addition to zero
and
the result
of
the addition determines
the
condition code.
The operands
may
be variable in length
up
to
16
bytes
and
must
be in
packed format. High-order zeros
are
provided when necessary. Operands
may
overlap
if
their
rightmost byte locations coincide,
or
if
the
rightmost
byte
of
the
first operand is to
the
right
of
the
rightmost byte
of
the
second operand.
A second operand
that
is longer
than
the
first operand causes overflow.
F8
o
7 8
11
12
15
16
19
20
• 0 - result is zero.
1-
result is less
than
zero.
2 - result is
greater
than
zero.
3 - overflow.
• Address
error:
Addressing.
Protection.
Data
error.
Decimal overflow.
31
32
35
36
47
Notes •
1.
Only
the
second operand is checked
for
valid sign
and
digit
codes.
2.
The second operand is unaltered.
3. Processing is
from
right
to
left.
4.
A zero result is positive except when high-order digits
are
lost because
of overflow.
In
overflow, a zero
result
has
the
sign of
the
second
operand.
160