Download Print this page

ZiLOG Z80380 User Manual page 27

Advertisement

Z
ILOG
4.2.2 Immediate (IM) (Continued)
Instruction
OPERATION
OPERAND
The operand value is in the instruction
Immediate mode is often used to initialize registers. Also,
this addressing mode is affected by the DDIR Immediate
Data Directives to expand the immediate value to 24 bits
or 32 bits.
Example of IM mode:
1. Load immediate value into accumulator
LD A,55H ;Load hex 55 into the accumulator.
Before instruction execution
After instruction execution
4.2.3 Indirect Register (IR)
In Indirect Register addressing mode, the register speci-
fied in the instruction holds the address of the operand.
Memory or
Instruction
OPERATION
REGISTER
The operand value is the contents of the location whose address is in the register.
Depending on the instruction, the operand specified by IR
mode is located in either the I/O address space (I/O
instruction) or memory address space (all other instruc-
tions).
Indirect Register mode can save space and reduce ex-
ecution time when consecutive locations are referenced or
one location is repeatedly accessed. This mode can also
be used to simulate more complex addressing modes,
since addresses can be computed before data is ac-
cessed.
The address in this mode is always treated as a 32-bit
mode. After reset, the contents of the extend registers
(registers with "z" suffix) are initialized as 0's; hence, these
instructions will be executed just as for the Z80/Z180.
4-2
2. Load
register
DDIR IB, LW
LD HL, 123456H
This case, the Z380 CPU appends 00H as a MSB byte.
A
12
55
The data to be processed is in the location specified by the
BC, DE, or HL register (depending on the instruction) for
memory accesses, or C register for I/O.
Register
Address
Example of IR mode:
1. Load accumulator from the contents of memory
pointed by (HL)
LD A, (HL) ;Load the accumulator with the data
Before instruction
execution
After instruction
execution
Memory location
24-bit
immediate
;next instruction is in Long Word
mode, with ;an additional
immediate data
;load HLz, and HL with constant
123456H
Before instruction execution
After instruction execution
;addressed by the contents of HL
A
HLz,HL
0F
12345678
0B
12345678
12345678
Z380
U
'
M
SER
S
ANUAL
value
into
HL
HLz
HL
0987
6543
0012
3456
I/O Port
OPERAND
0B
DC-8297-03

Advertisement

loading
Need help?

Need help?

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

Questions and answers