EasyManuals Logo
Home>ZiLOG>Desktop>Z8

ZiLOG Z8 Technical Manual

ZiLOG Z8
166 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 #30 background imageLoading...
Page #30 background image
Address Spaces
3.6
CPU
STACKS
Stack
operations
can
occur
in
either
the
register
file
or
data
memory.
Under
software
control,
Port
a and 1
Mode
register
(R258)
selects
stack
location.
The
register
pair
R254
and
R255
forms
the
16-bit
Stack
Pointer
(SP) which
is
used
for
all
stack
operations.
The
stack
address
is
stored
with
the
MSB
in
R254
and
LSB
in
R255
(Figure
3-7).
3-6
R255
lOWER
BYTE STACK POINTER
lOW
R254
....
___
U_P_P_E_R_BY_T_E
___
...
I STACK POINTER HIGH
Figure
3-7.
Stack
Pointer
PCl
TOP OF
----+-
PCH
STACK
STACK CONTENTS
AFTER A
CAll
INSTRUCTION
Figure
3-B.
The
stack
address
is
decremented
prior
to
a Push
operation
and incremented
after
a
Pop
operation.
The
stack
address
always
points
to
the
data
stored
on
the
top-of-stack.
The
Z8
stack
is
a
return
stack
for
Call
instructions
and
interrupts
as
well
as
a
data
stack.
During a
Call
instruction,
the
contents
of
the
PC
are
saved
on
the
stack.
The
PC
is
restored
during
a Return
instruction.
Inter-
rupts
cause
the
contents
of
the
PC
and
Flag
regis-
ter
to
be saved
on
the
stack.
The
IRET
instruc-
tion
restores
them
(Figure
3-8).
When
the
Z8
is
configured
for
an
internal
stack
(i.e.,
using
the
register
file),
register
R255
serves
as
the
Stack
Pointer.
The
value
in
R254
is
ignored
and can be used
as
a
general-purpose
register.
However, an
overflow
or
underflow can
occur
when
stack
address
is
incremented
or
decremented
during
normal
stack
operations.
TOP
OF---.
STACK
Stack
Operations
0
PCl
PCH
FLAGS
STACK CONTENTS
AFTER AN
INTERRUPT
CYCLE
3047-049,3047-074

Table of Contents

Other manuals for ZiLOG Z8

Questions and Answers:

Question and Answer IconNeed help?

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

ZiLOG Z8 Specifications

General IconGeneral
BrandZiLOG
ModelZ8
CategoryDesktop
LanguageEnglish

Related product manuals