Make your own free website on Tripod.com

INDR

Block input with decrement.
Function: (HL) <- (C); B <- B - 1; HL <- HL - 1
Repeat until B = 0
 
Format:
1110 1101
 
byte 1: ED
 
1011 1010
 
byte 2: BA
 
Description: The peripheral device addressed by the C register is read and the result is loaded into the memory location addressed by the HL register pair. Then the B register and the HL register pair are decremented. If B is not zero, the program counter is decremented by 2 and the instruction is re-executed.
 
Data Flow:
 
Timing: B = 0: 4 M cycles; 16 T states: 8 usec @ 2 MHz
B != 0: 5 M cycles; 21 T states: 10.5 usec @ 2 MHz
 
Addressing Mode: external
Flags:
 
Example:
INDR

OBJECT CODE
Before:
 
After: