CPDR
The CPDR operation compares the contents of the memory location addressed by the HL register pair with the Accumulator (A). After the comparison, the HL and Byte Counter (BC) Register pairs are decremented.
If decrementing allows the BC to go to 0 or if A equals the value at the memory location pointed to by HL (A = (HL)), the instruction is terminated. If BC is not 0 and A ≠ (HL), the program counter is decremented by two and the instruction is repeated.
Multi-function instruction which performs the following actions in order.
- CP (HL)
- DEC HL
- DEC BC (goes back to step 1 if BC is not zero)
| Instruction | Description | Opcode |
|---|---|---|
| CPDR | Self-repeated Multi-function instruction | EDB9 |