Z
ILOG
4.2.7 Stack Pointer Relative Mode (SR) (Continued)
2. Load HL from location (SP – 4) in Extended mode, Long Word mode
SETC
XM
DDIR LW
LD HL, (SP–4)
Before instruction execution
After instruction execution
Memory location
Address calculation: In Extended mode, FCH (–4 in Deci-
mal) encoding in the instruction is sign extended to a 32-
bit value before the address calculation, and calculation is
done in modulo 2
32
.
3. Load HL from location (SP + 10000H) in Extended mode, Long Word mode
SETC
XM
DDIR
IW,LW
LD HL, (SP+10000)
Before instruction execution
After instruction execution
Memory location
Address calculation: In Extended mode, 010000H encod-
ing in the instruction is sign extended to a 32-bit value
before the address calculation, and calculation is done in
32
modulo 2
.
4-8
;In Extended mode
;operate next instruction in Long Word mode
;Load into the HL from the
;contents of the memory location
;whose address is four less than
;the contents of SP.
HLz
HL
SPz
1234
5678
07FF
EFCD AB89
07FF
07FF7EFC
89
07FF7EFD
AB
07FF7EFE
CD
07FF7EFF
EF
;In Extended mode,
;operate next instruction in Long Word mode
;with a word immediate data.
;Load into the HL from the
;contents of the memory location
;whose address is 10000H more than
;the contents of SP.
HLz
HL
SPz
1234
5678
07FF
EFCD AB89
07FF
08007F00
89
08007F01
AB
08007F02
CD
08007F03
EF
SP
7F00
7F00
07FF7F00
+
FFFFFFFC
07FF7EFC
SP
7F00
7F00
07FF7F00
+
00010000
08007F00
Z380
™
U
'
M
SER
S
ANUAL
DC-8297-03
Need help?
Do you have a question about the Z80380 and is the answer not in the manual?