Download Print this page

ZiLOG Z80380 User Manual page 137

Advertisement

Z
ILOG
LDIRW
Operation:
repeat until (BC=0) begin
if (LW) then begin
(DE)
(DE+1)
(DE+2)
(DE+3)
DE
HL
BC(15-0)
end
else begin
(DE)
(DE+1)
DE
HL
BC(15-0)
end
end
This instruction is used for block transfers of strings of data. The words of data at the location
addressed by the HL register are loaded into memory starting at the location addressed by
the DE register. The number of words moved is determined by the contents of the BC
register. If the BC register contains zero when this instruction is executed, 65,536 words are
transferred. The effect of incrementing the pointers during the transfer is important if the
source and destination strings overlap with the source string starting at a higher memory
address. Placing the pointers at the lowest address of the strings and incrementing the
pointers ensures that the source string is copied without destroying the overlapping area.
This instruction can be interrupted after each execution of the basic operation. The Program
Counter value of the start of this instruction is save before the interrupt request is
accepted,so that the instruction can be properly resumed.
Flags:
S:
Unaffected
Z:
Unaffected
H:
Cleared
V:
Cleared
N:
Cleared
C:
Unaffected
Addressing
Mode
Syntax
LDIRW
DC-8297-03
LOAD, INCREMENT AND REPEAT (WORD)
(HL)
(HL+1)
(HL+2)
(HL+3)
DE + 4
HL + 4
BC(15-0) – 4
(HL)
(HL+1)
DE + 2
HL + 2
BC(15-0) – 2
Instruction Format
11101101 11110000
Execute
Time
Note
(3+r+w)n
L
Z380
U
'
M
SER
S
ANUAL
LDIRW
5-103

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80380 and is the answer not in the manual?