Table of Contents Previous topic Next topic
MICROPROCESSOR INSTRUCTION REFERENCE->CPIR
CPIR Compare accumulator and memory location addressed by HL and then increment HL and decrement BC. Repeat until A = (HL) or BC = 0
A - (HL) : HL <- HL + 1 : BC <- BC - 1
Flags
| S | Set if A < (HL) else cleared |
| Z | Set if A = (HL) else cleared |
| H | Set if half carry, else cleared |
| P/V | Cleared if BC becomes 0, else set |
| N | Set always |
| C | Not affected |
| No of | M | T | usec @ | |
| bytes | cycles | states | 2 MHz |
| BC=0 or A=(HL) | 2 | 4 | 16 | 8 |
| BC<>0 & A<>(HL) | 2 | 5 | 21 | 10.5 |