EasyManuals Logo
Home>ZiLOG>Desktop>Z8

ZiLOG Z8 Technical Manual

ZiLOG Z8
166 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #37 background imageLoading...
Page #37 background image
5.2.4
Overflow
flag
(V)
For
signed
arithmetic,
Rotate,
and
Shift
opera-
tions,
the
Overflow
flag
is
set
to
1
when
the
result
is
greater
than
the
maximum
possible
number
( ) 127)
or
less
than
the
minimum
possible
number
( <
-128)
that
can be
represented
in
two's
comple-
ment form.
The
flag
is
set
to
0
if
no
overflow
Instruction
Set
encoded
in
a
4-bit
field
called
the
condition
code
(CC), which forms
bits
4-7
of
the
conditional
instructions.
Section
5.4.2
lists
the
condition
codes and
the
flag
settings
they
represent.
occurs.
5.4
NOTATION
AND
BINARY
ENCODING
Following
logical
operations,
the
Overflow
flag
is
set
to
O.
REf
I changes
the
value
of
the
Overflow
flag
when
the
saved
Flag
register
is
restored.
5.2.5
Decimal-Adjust
flag
(D)
The
Decimal-adjust
flag
is
used
for
BCD
arith-
metic.
Since
the
algorithm
for
correcting
BCD
operations
is
different
for
addition
and
subtrac-
tion,
this
flag
specifies
what
type
of
instruction
was
last
executed
so
that
the
subsequent
Decimal
Adjust
(DA)
operation
can
function
properly.
Nor-
mally,
the
Decimal-adjust
flag
cannot be used
as
a
test
condition.
A
fter
a
subtraction,
the
Decimai-adjust
flag
is
set
to
1;
following
an
addition
it
is
cleared
to
O.
RETI
changes
the
value
of
the
Decimal-adjust
flag
when
the
saved
Flag
register
is
restored.
5.2.6
Half-Carry
flag
(H)
The
Half-carry
flag
is
set
to
1 whenever
an
addi-
tion
generates
a
carry
out
of
bit
3 (Overflow),
or
a
subtraction
generates
a borrow
into
bit
3.
The
Half-carry
flag
is
used
by
the
Decimal Adjust
(DA)
instruction
to
convert
the
binary
result
of
a
pre-
vious
addition
or
subtraction
into
the
correct
decimal
(BCD)
result.
As
in
the
case
of
the
Decimal-adjust
flag,
the
user
does
not
normally
access
this
flag.
RET!
changes
the
value
of
the
Half-carry
flag
when
the
saved
Flag
register
is
restored.
5.l
CONDITION
CODES
Flags
C,
Z,
S, and V
control
the
operation
of
the
"condit
ional"
Jump
instructions.
Sixteen
fre-
quently
useful
functions
of
the
flag
settings
are
In
the
detailed
instruction
descriptions
that
make
up
the
rest
of
this
chapter,
operands
and
status
flags
are
represented
by
a
notational
shorthand.
Operands
(condition
codes and
address
modes) and
their
notations
are
as
follows:
Notation
Address
Hode
cc
r
R
RR
Ir
IR
Irr
IRR
Condit ion
Code
Working
register
only
Register
or
working
register
Register
pair
or
working
register
pair
Indirect
working
register
only
Indirect
register
or
working
register
Indirect
working
register
pair
only
Indirect
register
pair
or working
register
pair
Actual
Operand/Range
See
condition
code
list
below
Rn:
where n
0-15
reg:
where
reg
repre-
sents
a number
in
the
range
0-127,
240-255
Rn:
where n = 0-15
reg:
where
reg
repre-
sents
an even number
in
the
range
0-126,
240-254
RRp:
where p
2,
•••
,14
0,
®
Rn:
where n 0-15
®
reg:
where
reg
re-
presents
a number
in
the
range
0-127,
240-255
®
Rn:
where n = 0-15
®
RRp:
where p =
0,
2,
•••
,14
®
reg:
where
reg
re-
sents
an even number
in
the
range
0-126,
240-254
®
RRp:
where p
0,
2,
•••
,14
5-3

Table of Contents

Other manuals for ZiLOG Z8

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ZiLOG Z8 and is the answer not in the manual?

ZiLOG Z8 Specifications

General IconGeneral
BrandZiLOG
ModelZ8
CategoryDesktop
LanguageEnglish

Related product manuals