IX <- IY + rr
ADD
IY,rr
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | $FD |
0 | 0 | rr | 1 | 0 | 0 | 1 |
The contents of register pair rr (any of register pairs BC, DE, IY, or SP) are added to the contents of Index Register IY, and the result is stored in IY. In the assembled object code, the rr operand is specified as follows:
Register Pair | r | Hex |
---|---|---|
BC | 00 | $09 |
DE | 01 | $19 |
IY | 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 Index Register IY contains $3333 and register pair BC contains $5555, then upon the execution of
ADD IY,BC
IY contains $8888.