Chapter
3.
Instruction
Set
CNC
CNZ
3ยท14
After the CMP instruction recomplements the carry flag,
both
the carry flag and zero flag are zero. Normally
this indicates
that
the accumula.tor
is
greater than register
E.
However, the meaning
of
the carry flag
is
reversed
since the
values have different
~,igns.
The
user program
is
responsible for proper interpretdtion
of
the cdrry flag.
CALL
IF
NO
CARRY
The CNC instruction
combines
functions
of
the JNC and PUSH instructions. CNC
tesh
the setting
of
the carry
flag.
If the flag
is
set
to
lero,
CNC pushes the
contents
of
tre
program
counter
onto
the stack and then jumps
to
the address specified by the CNC instruction. If the flag
i'i
set to one, program
execution
simply
continue~
with the next sequential instruction.
Opcode. Operand
CNC address
Although the use
of
a Idbel
is
most
common,
the
adclre~s
may also be <,pecified
as
d number
or
an expression.
1 1
0
Cycles:
States:
Addressing:
Fldg.,:
Example:
1
0
1
(l
0
low dddr
high addr
3 or
5
(2
or
5 on 8085)
11
or
17
(9
or
18
on 8085)
immediate/register indirect
none
For the
sake
of
brevity, an example
is
given for the CALL instructioJl but not fOl edch
of
ih
clo'iely related
vdriants.
CALL
IF
NOT
ZERO
The CNZ instruction combines functions
of
the JNZ and PUSH
in,tructions.
CNZ te'its the setting
of
the
fero
fldg. If the flag
is
off
(indicating
that
the
contents
of
the
accumulator
are
other
than zero)' CNZ pushes the
contents
of
the program
counter
onto
the stack and then
jump'>
to
the address specified
in
the
instruction's
second and third bytes.
If
the fldg
is
set
to
one, program
execution
'iimplv continues with the next sequenti,li
instruction.
Op co de Operand
CNZ
address
Although
the
use
of
d Idbel
is
most
common,
the address mel) also
be
"pccified
d'i
a number or an expression.