CPDR |
Block compare with decrement. | |||||||||
Function: | A - [HL]; HL
HL - 1; BC
BC - 1 Repeat until BC = 0 or A = [HL] |
|||||||||
Format: |
|
byte 1: ED |
||||||||
|
byte 2: B9 |
|||||||||
Description: | The contents of the memory location addressed by the HL register pair are subtracted from the contents of the accumulator and the result is discarded. Then both the BC register pair and the HL register pair are decremented. If BC 0 and A [HL], the program counter is decremented by two and the instruction is re-executed. |
|||||||||
Data Flow: | ||||||||||
Timing: | ||||||||||
Addressing Mode: | ||||||||||
Flags: | ||||||||||
Example: | ||||||||||
OBJECT CODE |
Before: |
After: |
||||||||