Z80: How to add 16 and 8 bit registers?

Viewed 6544

How do you add a 16 and a 8 bit register with carry (for example, HL, and A)?

3 Answers

You can't do it directly. You need to copy A into a 16-bit register pair and then do the add:

LD  B, 0
LD  C, A
ADC HL, BC
Related