Working Register Groups - ZiLOG Z8 PLUS User Manual

Table of Contents

Advertisement

.75
P
Â

Working Register Groups

Instructions can access 8-bit registers and register pairs (16-bit words) using either 4-, 8-, or 12-bit address
fields. Eight-bit address fields refer to the actual address of the register within the current page. For example,
Register 58H is accessed by calling upon its 8-bit address, 01011000 (58H). The lower nibble of the
Register Pointer specifies the current RAM page.
With 4-bit addressing, the register file is logically divided into 16 Working Register Groups of 16 registers
each, as shown in Table 1-3. These 16 registers are known as Working Registers. A Register Pointer (one of
the control registers, FDH) contains the base address of the active Working Register Group. The High nibble
of the Register Pointer determines the current Working Register Group.
When accessing one of the Working Registers, the 4-bit address of the Working Register is combined with
the upper four bits (High nibble) of the Register Pointer, thus forming the 8-bit actual address. Figure 1-4
illustrates this operation. Since working registers are typically specified by short format instructions, there are
fewer bytes of code needed. In addition, when processing interrupts or changing tasks, the Register Pointer
(see Figure 1-5) speeds context switching. A special Set Register Pointer (SRP) instruction sets the contents
of the Register Pointer.
Data transfer across RAM page boundaries can be accomplished via 12-bit addressing. Using certain instruc-
tion modes, data can be moved from the current page and working group into any register on the chip by spec-
ifying the absolute 12-bit address, including page. Not all family members support 12-bit addressing. See the
applicable product specification for specific information.
Table 1-3. Working Register Groups
Register Pointer (FDH)
High Nibble (Binary)
1111
1110
1101
1100
1011
1010
1001
1000
0111
Working Register Group
(HEX)
F
E
D
C
B
A
9
8
7
Actual Registers (HEX)
F0 - FF
E0 - EF
D0 - DF
C0 - CF
B0 - BF
A0 - AF
90 - 9F
80 - 8F
70 - 7F

Advertisement

Table of Contents
loading

Table of Contents