ADD ss to HL without carry
Addition without carry
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
\(HL \longleftarrow HL + dd\) | ||||||||
ADD HL, dd | ||||||||
0 | 0 | dd | 1 | 0 | 0 | 1 | ||
\(IX \longleftarrow IX + pp\) | ||||||||
ADD IX, pp | ||||||||
1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | DD |
0 | 0 | pp | 1 | 0 | 0 | 1 | ||
\(IY \longleftarrow IY + mm\) | ||||||||
ADD IY, mm | ||||||||
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | FD |
0 | 0 | mm | 1 | 0 | 0 | 1 |
Value | dd | mm | pp |
---|---|---|---|
00 | BC | BC | BC |
01 | DE | DE | DE |
10 | HL | IY | IX |
11 | SP | SP | SP |
Flags Affected
Flags |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result negative | ||||||||
z | set if result is 0 | ||||||||
h | set if carry from bit 11 | ||||||||
c | set if carry from bit 15 |
Opcode Matrix
BC | DE | HL | SP | IX | IY | |
---|---|---|---|---|---|---|
HL |
ADD HL,BC
09111 |
ADD HL,DE
19111 |
ADD HL,HL
29111 |
ADD HL,SP
39111 |
|
|
IX |
ADD IX,BC
DD09215 |
ADD IX,DE
DD19215 |
|
ADD IX,SP
DD39215 |
ADD IX,IX
DD29215 |
|
IY |
ADD IY,BC
FD09215 |
ADD IY,DE
FD19215 |
|
ADD IY,SP
FD39215 |
|
ADD IY,IY
FD29215 |
Instruction
Opcode hexSize bytesCycle count
| Register |
Last modified November 16, 2021: Split ADD up to allow flags to be defined (7fea8b1)