ZiLOG Z80-CPU Technical Manual page 53

Table of Contents

Advertisement

Flags
~
Symbolic
Mnemonic
Operation
C Z V S N H
ADDA,r
A-A+r
~
~
V
~
0
t
ADDA,n
A-A+n
~
~
V
~
0
t
ADD A, (HL)
A~·
A+ (HL)
~
t
V
.t
0
t
ADD A, (IX+d) A-A + (IX+d)
t
t
V
t
0
t
I
ADD A, (IY+d) A-A+(IY+d)
~
t
V
*
0
*
'ADC A,s
A-A+s+CY
t
~
V
t
0
t
SUB s
A-A-s
t t
V
t
I
t
SBC A,s
A-A-s-CY t
t
V t
I
t
ANDs
A-A
A
s
0 t
P
t
0
1
OR s
A-A
V
s
0 t
P
t
0 0
XORs
A-A"s
0
t
P
t
0 0
CP s
A - s
t
t
V
t
I
t
INCr
r '": r+
I
I
V
t
0
t
INC (HL)
(HL) - (HL)+
I
I
V
t
0
t
INC (IX+d)
(IX+d) -
t
V
t
0 I
(IX+d)+1
INC (IY+d)
(IY+d) -
t
V I 0
t
(IY+d) + I
DECm
m+-m-I
I
V
t
I
I
Op-Code
No.
of
76 543 210
Bytes
10
[QQQ)
r
I
II
[QQQJ
110
2
-
n
-
10
[QQQJ
110
I
11 011 101
3
10
[QQQ]
110
-
d
-
II III 101
3
10
[QQQ]
110
-
d
-
@Q1J
IQIQ]
IillII
[[QQJ
!IIQJ
(j]JJ
IIill
00
r
[J]Q]
I
00 110
[J]Q]
I
II Oil 101
3
00 IIO[IQQ]
.
d
~
II III 101
3
00 '\1011001
-
d
.~
OJITJ
No.
No.
ofM
ofT
Cycles
States
I
4
2
7
2
7
5
19
5
19
I
4
3
II
6
23
6
23
Comments
r
Reg.
000
B
001
C
010
D
Oil
E
100
H
101
L
III
A
sisanyofr,n,
(HL), (IX+d),
(IY +d) as shown f
or
ADD instruction
The indica ted bits
replace the 000 in
the ADD set abov e.
misanyofr,(H L),
(IX+d), (IY+d) as
shown for INC
Same format and
states as INC.
Replace 100 with
III I
in OP codc.
Notes:
The V symbol in the
P/V
flag column indicates that the P/V flag contains the overflow of the result of the
operatior.. Similarly the P symbol indicates parity. V = I means overtlow, V = 0 means not overl1ow. P = I
means parity of the result is even, P
=
0 means parity of the result is odd.
Flag Notation:
• = flag not affected, 0
=
flag reset, I = tlag set, X = nag is unknown.
t
=
flag is affected according to the result of the operation.
8-BIT ARITHMETIC AND LOGICAL GROUP
TABLE 7.0-4
47

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Z80-CPU and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Z80a-cpu

Table of Contents