Chapter
3.
Instruction
Set
CZ
DAA
3-18
Example:
For the sake
of
brevity, an example
is
given for the CALL in';truction
but
not
for each
of
its closely related
variants.
CALL
IF
ZERO
The CZ instruction combines fU:lctions
of
the
jZ
and
PUSH
instructiom.
CZ
tests the setting
of
the zero flag.
If
the flag
is
set
to
one (indicating that the
contents
of
the accumulator arc
lero),
CZ pushes the
contents
of
the program
counter
onto
the stack and then jumps to the address specified
in
the
CZ
instruction.
If
the flag
is
set
to
tero
(indicating
that
the content'>
of
the accumulator arc
other
tha.n
leroj,
program
execution
simply
continues
with the next sequential instruction.
Opwde
Operand
CZ
address
Although the usc
of
a label
is
most
common,
the address may also
be
"pecified as a number or an expression.
Example:
o 0
o 0
~------------------------------
low addr
~-----------------------------
Cycles:
States:
Ad
dressi
ng:
Flags:
high addr
3 or 5
(2
or 5
on
8085)
1 I or
17
(9
or
18
on 8085)
immediate/register indirect
none
For the sake
of
brevity, an exalTlple
is
given for the CALL
imtruction
but
not for each of its closely related
variants.
DECIMAL
ADJ
UST
ACCUMULATOR
The DAA instruction adjusts the eight-bit value
in
the
accumulator
to
form two four-bit hindry coded decimal
digits.
Opcode Operand
DAA
Operands
arc
not
permitted with the DAA
imtruction.
DAA
is
used
when
adding decimal numbers. It
is
the only instruction whose function requires use
of
the auxiliary
carry flag.
In
multi-byte
arithmetic
operations, the DAA instruction typically
is
coded immediately
after
the arith-
metic instruction so
that
the auxiliary carry flag
is
not altered unintentionally.