Anhang
(7) 8-Bit Arithmetik-und Logikbefehle
Mnemonic
Operation
code
I
ADD A.r
A+-A+r
ADD A.n
A+-A+n
ADD
A.(IlL)
A+-A +(HL)
ADD A.(lX+d)
A+-A+(lX+d)
ADD A.(IY+d)
A+-A+(lY+d)
ADC A.8
A+-A+8+CY
SUB 8
A+-A-8
SBC A,s
A+-A-8-CY
AND 8
A+-A /\8
OR 8
A+-AV8
XOR 8
A+-AE08
CP 8
A-8
INC r
r+-r+l
INC (HL)
(HL)+---{HL) + 1
INC (lX+d)
(IX +d) +-
(IX +d)+1
INC (IY +d)
(lY +d) +-
(lY +d)+l
DEC m
m+-rn-l
Flags
OP code
Z PN
C
S
H
76543210
N
t
t
t
t
IQQQ]
V
0
10
t
t
t
t
!QQQ]
0
V
11
+-
t
t
t
lQQQ]
V
0
t
10
t
t
t
V
t
0
11
IQQQ]
10
+-
t
t
t
0
V
t
11 111 101
[QQQ]
10
+-
t
t
t
IQ@
V
0
t
t
t
t
[Q!Q]
1
t
V
t
t
&TI]
V
t
1
t
p
[@
0
t
t
0
1
t
p
0
t
[ill]
0
0
p
t
Iilll
0
t
0
0
t
t
[ill]
t
1
t
V
•
t
t
0
t
V
00 r[!QQJ
•
t
t
V
0
t
00 110
•
t
t
t
0
11
V
Oll
00 110
+-
•
t
t
t
V
0
11 111 101
00 110
+- d
•
t
t
t
1
V
290
Do not sale !
No.of
No.of
No.of
bytes M cydes
T
states
1
1
r
4
110
2
2
7
---
n
110
1
7
2
101
Oll
5
19
3
110
---
d
5
19
3
110
d
-+
1
1
4
[!QQ]
1
11
3
101
3
6
23
[!QQ]
.....
d
6
3
23
[!QQ]
-+
[!Q!]
Rernarks
r
Register
000
B
001
C
010
D
Oll
E
100
H
101
L
111
A
Similar to ADD instructions,
the
operand s may be any of r, n,
(IV
("L), (IX +d), and
+d).
The OP code is the same as that
of the corresponding
ADD in-
I
I
struction, with the
000
part re-
placed with those bits enclosed in
a box.
INC
Similar to
instructions,
the
operand m may be any of r,
(IV
("L), (IX +d), and
+d).
The OP code is the same as that
INC
of the corresponding
in-
I
I
struction, with the
100
replaced
[l@.
with