Th
e
Ze
r
o
Fl
ag
(Z)
i
s
se
t
o
r
rese
t
if
t
he
r
e
sul
t
ge
n
era
t
e
d
b
y
th
e
execu
ti
o
n
o
f
ce
rt
a
in
i
n
s
tru
c
t
ions
i
s
a
ze
r
o
.
F
o
r
8
-bit
arithm
e
tic
a
nd
l
og
i
ca
l
o
p
e
r
a
ti
o
ns,
t
he
Z
fl
ag
wi
l
l
be
se
t
t
o
a
'I'
if
th
e
r
es
ultin
g
byt
e
in
th
e
Ac
cumul
a
t
o
r
i
s
z
e
r
o
.
If
th
e
byt
e
is
n
o
t
z
ero,
t
he
Z
f
l
ag
i
s
rese
t
t
o
'
0'
Fo
r
com
p
a
r
e
(
s
ea
r
c
h)
i
ns
tru
c
t
ion
s,
th
e
Z
fl
ag
will
b
e
se
t
t
o
a
'
1
'
if
a
com
p
a
ri
so
n
is
fo
und
b
e
tw
een
t
he
val
u
e
in
t
he
Acc
umul
a
t
or
a
nd
th
e
memo
r
y
locat
i
on
p
o
int
e
d
t
o
b
y
t
he
co
nt
e
nt
s
o
f
the
r
egister
pa
ir
H
L.
When
t
es
tin
g
a
bit
in
a
r
eg
i
s
t
e
r
or
m
e
m
o
ry
l
o
c
atio
n,
th
e
Z
fl
ag
wil
l
co
nt
a
in
th
e
co
mpl
em
e
nted
s
t
a
t
e
o
f
th
e
indic
a
t
e
d
bit
(
see
Bit
b,s).
Wh
en
in
p
uttin
g
o
r
o
utputtin
g
a byt
e
b
e
tw
ee
n
a
memory
l
oc
ati
o
n
a
nd
a
n
I
/O
d
e
vic
e
(INI;IND;OUT
I
and
O
U
TD),
if
th
e
r
es
ult
o
f
B-1
i
s
z
e
r
o
,
th
e
Z
fl
ag
is
set,
o
t
he
r
w
i
se
it
is
r
ese
t
.
A
l
so
f
o
r
b
y
t
e
inpu
ts
f
r
om
I/O
d
evices
us
in
g
I
N
r,
(C)
,
th
e
Z
Fla
g
i
s
set
t
o
indica
t
e
a
ze
r
o
b
y
t
e
i
n
p
u
t.
T
he
5ig
n
Fl
ag
(
5
)
s
t
o
r
es
th
e
s
tat
e
o
f
the
m
o
st
si
g
n
i
fi
ca
nt
bit
o
f
th
e
Acc
umul
a
t
o
r
(Bit
7).
W
hen
th
e
Z80
perf
o
rm
s
a
rith
me
ti
c
o
p
e
rati
o
ns
o
n
s
ig
n
ed
n
umbe
r
s
,
bin
a
r
y
tw
o
's
c
o
mpl
e
m
e
nt
n
o
t
a
ti
o
n
is
u
sed
t
o
r
ep
r
ese
nt
a
nd
p
r
ocess
nu
me
r~c
inf
o
rm
a
ti
o
n
.
A
p
ositive
num
be
r
i
s
id
e
ntifi
ed
by
a
'0'
in
bit
7.
A
n
egat iv e
n ur
n
be
r
i
s
ide n
t
i
f i
e
d
by
a
'1'
.
Th
e
b
in a r y
eq
u
iva
l
e
nt
of
th
e
mag
nitud
e
o
f
a
p
o
siti
ve
n
umber
is
s
t
or
e
d
i
n
bits
0
t
o
6
f
o
r
a
t
o
tal
r
a
n
ge
of
f
r
om
0
t
o
12
7.
A
n
ega
ti
ve
nu
m
b
er
i
s
re
pr
ese
nt
~d
b
y
t
he
tw
o's
com
p
le
m
e
nt
o
f
th
e
e
q
u
iv
a
l
e
nt
p
o
sitiv
e
nu
mber.
T
h
e
to
t
a
l
r
a
n
ge
fo
r
n
ega
tiv
e
numbers
is
fr
om
-
1
to
-1
28.
Wh
en
inputting
a
b
y
t
e
fr
o
m
a
n
I
/
O
d
e
vi
ce
t
o
a
r
egis
t
e
r,
IN
r,(C),
th
e
5
fl
ag
will
indicat
e
either
p
o
s
it
iv
e
(5=0)
o
r
n
eg
ativ
e
(5=1)
data.
Summary of Contents for ATES Z80
Page 1: ......
Page 5: ......
Page 6: ...Juanlurn c cc r 11 SoJt 391262 Jr ml tOl...
Page 32: ......
Page 38: ...If Address 2130ll contains 65ll and address 2131H contains 78ll after the instruction...
Page 56: ......
Page 79: ......
Page 80: ......
Page 86: ...10050 is 220 after the execution of ADD A IX SH the contents of the Accumulator will be 33H...
Page 88: ......
Page 104: ...If the contents of register Dare 280 after the execution of...
Page 112: ......
Page 117: ...Example If the contents of the Accumulator are...
Page 119: ...SCF S z H P V N C Not affected Not affected Rese t Not affected Re se t Set...
Page 127: ......
Page 128: ......
Page 145: ......
Page 146: ......
Page 148: ...Example If the contents of the Accumulator are...
Page 152: ...the contents of the Accumulator and the Carry Flag will be...
Page 185: ......
Page 186: ......
Page 203: ......
Page 204: ......
Page 222: ......
Page 237: ......
Page 238: ......
Page 261: ......
Page 262: ......
Page 267: ......