HL <- HL + ss
ADD
HL,ss
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 |
---|---|---|---|---|---|---|---|
0 | 0 | ss | 1 | 0 | 0 | 1 |
The contents of register pair ss (any of register pairs BC, DE, HL, or SP) are added to the contents of register pair HL and the result is stored in HL. In the assembled object code, operand ss is specified as follows:
Register Pair | r | Hex |
---|---|---|
BC | 00 | $09 |
DE | 01 | $19 |
HL | 10 | $29 |
SP | 11 | $39 |
S | is not affected. |
Z | is not affected. |
H | is set if carry from bit 11, otherwise it is reset. |
P/V | is not affected. |
N | is reset. |
C | is set if carry from bit 15, otherwise it is reset. |
If register pair HL contains the integer $4242 and register pair DE contains $1111, then upon the execution of
ADD HL,DE
the HL register pair contains $5353.