EasyManuals Logo

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 #26 background imageLoading...
Page #26 background image
Address Spaces
By
using
logical
instructions
and a mask,
indivi-
dual
bits
within
registers
can be
accessed
for
bit
set,
bit
clear,
bit
complement,
or
bit
test
opera-
tions.
For example,
the
instruction
AND
R,
MASK
performs
a
bit
clear
operation.
When
instructions
are
executed,
registers
are
read
when
defined
as
sources
and
written
when
defined
as
destinations.
All
general-purpose
registers
function
as
accumulators,
address
pointers,
index
registers,
stack
areas,
or
scratchpad
memory.
Z8
instruct
ions
can
access
8-bit
registers
and
register
pairs
(16-bit)
using
either
4-bit
or
8-bit
address
fields.
With
4~bit
addressing,
the
register
file
is
logically
divided
into
9 groups
of
16
working
registers
as
shown
in
Figure
3-3.
A
Register
Pointer
(one
of
the
control
registers)
contains
the
base
address
of
the
act
i
ve
working
register
group.
When
accessing
one
of
the
working
registers,
the
4-bit
address
is
concatenated
with
the
upper
four
bits
of
the
Register
Pointer,
thus
forming an
8-bit
address.
Figure
3-4
illustrates
this
opera-
tion.
Since
working
registers
are
typically
specified
by
short
format
instructions,
there
are
fewer
bytes
of
code needed, which
reduces
execu-
tion
time.
In
addition,
when
processing
interrupts
or
changing
tasks,
the
Register
Pointer
speeds
context
switching.
A
special
Set
Register
Pointer
(SRP)
instruction
sets
the
contents
of
the
Regis-
ter
Pointer.
3.2.1
Error
Conditions
Registers
must be
correctly
used
because
certain
conditions
produce
inconsistent
results
and
should
be
avoided:
REGISTER
R253
0
0
0
R6
I
Registers
registers.
R243
and R245-R249
are
write-only
If
an
attempt
is
made
to
read
these
registers,
%FF
is
returned
(%
is
a
prefix
that
indicates
hexadecimal
notation).
When
register
R253
(Register
Pointer)
is
read,
all
as
are
returned
in
the
least
significant
four
bits.
-~I
-~I
-~
-~
-~I
I
-~I
-~I
-~l
r-----+-----------------,255
o 0 0 0
253
~--------~----------~
~----------------------~240
1 27
The
lower
nibble
of
~>-
the register
file address
provided by
the
instruction
points
to
the
specified
register.
1
~------------3
1/0
PORTS
0
Figure
3-3.
Working
Register
Croups
OPC
0
,1
o I INSTRUCTION
(INC
R6)
o I
REGISTER
ADDRESS
(R118)
Figure
3-4.
Working
Register
Addressing
3-2
3047·034, 3047·048

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