The ADC
instruction performs an addition with carry.
If carry is set then it will be included in the calculation whilst any overflow from the addition will be passed on to
the carry flag.
This the multi-page printable view of this section.Click here to print.
The ADC
instruction performs an addition with carry.
If carry is set then it will be included in the calculation whilst any overflow from the addition will be passed on to
the carry flag.
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
\(A \longleftarrow A + r + Carry\) | ||||||||
ADC A,r | ||||||||
1 | 0 | 0 | 0 | 1 | r | |||
\(A \longleftarrow A + n + Carry\) | ||||||||
ADC A,n | ||||||||
1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | CE |
n | ||||||||
\(A \longleftarrow A + (HL) + Carry\) | ||||||||
ADC A, (HL) | ||||||||
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 8E |
\(A \longleftarrow A + (IX+d) + Carry\) | ||||||||
ADC A, (IX + d) | ||||||||
1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | DD |
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 8E |
d | ||||||||
\(A \longleftarrow A + (IY+d) + Carry\) | ||||||||
ADC A, (IY + d) | ||||||||
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | FD |
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 8E |
d |
Register | r |
---|---|
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
A | 111 |
Flags |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result negative | ||||||||
z | set if result is 0 | ||||||||
h | set if carry from bit 3 | ||||||||
p/v | set if overflow | ||||||||
c | set if carry from bit 7 |
A | B | C | D | E | H | L | (HL) | (IX+d) | (IY+d) | n | |
---|---|---|---|---|---|---|---|---|---|---|---|
A |
ADC A,A
8F14 |
ADC A,B
8814 |
ADC A,C
8914 |
ADC A,D
8A14 |
ADC A,E
8B14 |
ADC A,H
8C14 |
ADC A,L
8D14 |
ADC A,(HL)
8E17 |
ADC A,(IX+d)
DD8Enn319 |
ADC A,(IY+d)
FD8Enn319 |
ADC A,n
CEnn27 |
Instruction
Opcode hexSize bytesCycle count
| Register | Memory | Implicit |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
\(HL \longleftarrow HL + ss + Carry\) | ||||||||
ADC HL, dd | ||||||||
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | ED |
0 | 1 | dd | 1 | 0 | 1 | 0 |
Value | dd |
---|---|
00 | BC |
01 | DE |
10 | HL |
11 | SP |
Flags |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result negative | ||||||||
z | set if result is 0 | ||||||||
h | set if carry from bit 11 | ||||||||
p/v | set if overflow | ||||||||
c | set if carry from bit 15 |
BC | DE | HL | SP | |
---|---|---|---|---|
HL |
ADC HL,BC
ED4A215 |
ADC HL,DE
ED5A215 |
ADC HL,HL
ED6A215 |
ADC HL,SP
ED7A215 |
Instruction
Opcode hexSize bytesCycle count
| Register |