This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

ADD without carry

Addition without carry

Table of Contents

The ADD instruction performs an addition without carry. Any overflow from the addition will be passed on to the carry flag.

1 - ADD r without carry

Addition of a register without carry
76543210
 
\(A \longleftarrow A + r\)
ADD A, r
10000r
Registers
Registerr
B000
C001
D010
E011
H100
L101
A111
Flags Affected
Flags
sz-h----
sset if result negative
zset if result is 0
hset if carry from bit 3
Opcode Matrix
ABCDEHL
A
ADD A,A
8714
ADD A,B
8014
ADD A,C
8114
ADD A,D
8214
ADD A,E
8314
ADD A,H
8414
ADD A,L
8514
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Register

2 - ADD n without carry

Addition of a number without carry
76543210
 
\(A \longleftarrow A + n\)
ADD A, n
11000110C6
n
Flags Affected
Flags
sz-h-p/v-c
sset if result negative
zset if result is 0
hset if carry from bit 3
p/vset if overflow
cset if carry from bit 7
Opcode Matrix
n
A
ADD A,n
C6nn27
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Implicit

3 - ADD (dd) without carry

Addition of memory without carry
76543210
 
\(A \longleftarrow A + (HL)\)
ADD A, (HL)
1000011086
 
\(A \longleftarrow A + (IX+d)\)
ADD A, (IX+d)
11011101DD
1000011086
d
 
\(A \longleftarrow A + (IY+d)\)
ADD A, (IY+d)
11111101FD
1000011086
d
Flags Affected
Flags
sz-h-p/v-c
sset if result negative
zset if result is 0
hset if carry from bit 3
p/vset if overflow
cset if carry from bit 7
Opcode Matrix
(HL)(IX+d)(IY+d)
A
ADD A,(HL)
8617
ADD A,(IX+d)
DD86nn319
ADD A,(IY+d)
FD86nn319
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Memory

4 - ADD ss to HL without carry

Addition without carry
76543210
 
\(HL \longleftarrow HL + dd\)
ADD HL, dd
00dd1001
 
\(IX \longleftarrow IX + pp\)
ADD IX, pp
11011101DD
00pp1001
 
\(IY \longleftarrow IY + mm\)
ADD IY, mm
11111101FD
00mm1001
Registers
Valueddmmpp
00BCBCBC
01DEDEDE
10HLIYIX
11SPSPSP
Flags Affected
Flags
sz-h---c
sset if result negative
zset if result is 0
hset if carry from bit 11
cset if carry from bit 15
Opcode Matrix
BCDEHLSPIXIY
HL
ADD HL,BC
09111
ADD HL,DE
19111
ADD HL,HL
29111
ADD HL,SP
39111


IX
ADD IX,BC
DD09215
ADD IX,DE
DD19215

ADD IX,SP
DD39215
ADD IX,IX
DD29215

IY
ADD IY,BC
FD09215
ADD IY,DE
FD19215

ADD IY,SP
FD39215

ADD IY,IY
FD29215
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Register