ADC 8 bit add with Carry
Addition with carry
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 Affected
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 |
Opcode Matrix
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 |
Last modified November 16, 2021: Split adc (e70f507)