Z8 Microcontrollers
Instruction Descriptions and Formats
ZiLOG
12-46
UM001600-Z8X0599
LDEI
LOAD EXTERNAL DATA AUTO-INCREMENT
LDEI
Load External Data Auto-increment
LDEI dst, src
Instruction Format:
Operation:
dst <— src
r <— r + 1
rr <— rr + 1
This instruction is used for block transfers of data between external data memory and the Register File.
The address of the external data memory location is specified by a Working Register Pair, and the
address of the Register File location is specified by a Working Register. The contents of the source
location are loaded into the destination location. Both addresses in the Working Registers are then
incremented automatically. The contents of the source are not affected.
Example:
If Working Register Pair R6 and R7 contains 404AH, external data memory location 404AH and 404BH
contain ABH and C3H respectively, and Working Register R2 contains 22H, the statement:
LDEI @R2, @RR6
Op Code: 83 26
loads the value ABH into Register 22H. Working Register Pair RR6 is incremented to 404BH and
Working Register R2 is incremented to 23H. A second
LDEI @R2, @RR6
Op Code: 83 26
loads the value C3H into Register 23H. Working Register Pair RR6 is incremented to 404CH and
Working Register R2 is incremented to 24H.
18
Cycles
OPC
(Hex)
Address Mode
src dst
83
Ir
Irr
18
93
Irr
Ir
dst
src
OPC
OPC
dst
src
Flags:
C:
Z:
S:
V:
D:
H:
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected