adc
Add with carry
Adds a value and the carry flag C to A, or a register pair and C to HL.
- 8-bit and 16-bit arithmetic, logic and bitsZ80 assembly
- ● set from the result
- 0 always 0
Forms
-
Adds
rand the carry flag to A. adc a,1 byte · 7 cyclesAdds (HL) and the carry flag to A.
adc a,2 bytes · 7 cyclesAdds
nnand the carry flag to A.-
Adds the value pointed to by IX plus
ddand the carry flag to A. -
Adds
rrand the carry flag to HL.
Pseudo-instructions
Other spellings the assembler accepts; each form shows the instruction it becomes.
-
Adds
rand the carry flag to A. -
Adds (HL) and the carry flag to A.
-
Adds
nnand the carry flag to A. -
Adds the value pointed to by IX plus
ddand the carry flag to A.
Undocumented 1 row
Left out of Zilog's manual, but the Z80 runs them, and so does this emulator.
-
Adds
ixh/land the carry flag to A.
Pseudo-instructions · Undocumented 1 row
Other spellings the assembler accepts; each form shows the instruction it becomes. Left out of Zilog's manual, but the Z80 runs them, and so does this emulator.
-
Adds
ixh/land the carry flag to A.
Operands
r- An 8-bit register:
a,b,c,d,e,horl. (hl)- The byte in memory at the address stored in
hl. More nn- An 8-bit immediate value,
0to255or-128to127, written as a number, character constant or symbol. More (ix+dd)- The byte in memory at
ix + dd, whereddis a signed displacement from-128to127, for example(ix+5)or(ix-3).(iy+dd)works the same way. More rr- A register pair:
bc,de,hlorsp. ixh/l- The high or low byte of
ix:ixhorixl. Foriy, useiyhoriyl. More
.org 0x8000
ld a, 5
ld b, 3
adc a, b
halt