EasyManuals Logo
Home>ZiLOG>Computer Hardware>eZ80

ZiLOG eZ80 User Manual

Default Icon
411 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #29 background imageLoading...
Page #29 background image
eZ80
®
CPU
User Manual
UM007714-0908 Memory Mode Switching
20
Single-Instruction Memory Mode Changes
Often, the CPU must perform a single operation using the memory mode opposite from
that currently set by the ADL mode bit. The CPU is capable of changing between ADL
mode and Z80 mode for a single instruction. Certain CPU instructions can be appended
with the memory mode opcode suffixes
.SIS
,
.LIL
,
.LIS
, and
.SIL
to indicate that a par-
ticular memory mode is appropriate for this instruction only. The following three exam-
ples serve to make the suffix operation for single-instruction memory mode changes more
clear.
Suffix Example 1: LD HL, Mmn in
Z80 Mode
In
Z80 mode (ADL mode bit = 0), only two bytes of immediate data are normally fetched
and the upper byte of all CPU multibyte registers is undefined. Compare the operation of
the following lines of code to observe the effect of the opcode suffixes.
.ASSUME ADL = 0 ;Z80 mode operation is default.
LD HL, 3456h ;HL[23:0] ¨ {00h, 3456h}.
LD HL, 123456h ;Invalid–Z80 mode cannot load 24-;bit value.
LD.SIS HL, 3456h ;Same as LD HL, 3456, because
;ADL = 0. HL[23:0] ¨ {00h, 3456h}.
;.IS directs eZ80 to fetch only
;16 bits of data.
;.S forces upper byte of HL
;register to an undefined state.
LD.LIL HL, 123456h ;HL[23:0] ¨ 123456h.
;.IL directs eZ80 to fetch 24-
;bits of data.
;.L uses all 3 bytes of HL
;register.
LD.LIS HL, 3456h ;HL[23:0] ¨ {00h, 3456h}. .IS
;directs eZ80 to fetch only 16-
;bits of data. .L uses all 3 bytes
;of HL register.
LD.SIL HL, 123456h ;HL[23:0] ¨ {00h, 3456h}.
;.IL directs eZ80 to fetch 24 bits
;of data. .S forces upper byte of
;HL register to an undefined
;state because registers are
;defined to be only 16-bits.
In all cases of Suffix Example 1, the memory mode is unchanged after the operation, as it
remains in Z80 mode (ADL mode bit = 0) following completion of each instruction. How-
ever, during operation of the LD.LIS, LD.LIL, and LD.SIL instructions, all or parts of
the CPU function temporarily in ADL mode. The
.IL
segment of the suffix forces the con-
trol block, to operate in ADL mode. The
.L
segment of the suffix forces the data block to
operate in ADL mode.

Questions and Answers:

Question and Answer IconNeed help?

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

ZiLOG eZ80 Specifications

General IconGeneral
BrandZiLOG
ModeleZ80
CategoryComputer Hardware
LanguageEnglish

Related product manuals