UM012811-0904
Architectural
Overview
eZ8 CPU
User Manual
4
Stack Pointer Registers
The eZ8 CPU allows the user to relocate the stack within the Register File. The stack can
be located at addresses from
000H
to
EFFH
. The 12-bit Stack Pointer value is given by
{SPH[3:0], SPL[7:0]}. The Stack Pointer has a 12-bit increment/decrement capability for
stack operations, allowing the Stack Pointer to operate over more than one page (256-byte
boundary) of the Register File. The Stack Pointer register values are undefined after Reset.
Register Pointer
The Register Pointer contains address information for the current Working Register Group
and the Register File Page. The Page Pointer is the lower 4-bits of the Register Pointer,
RP[3:0], and points to the current Page. There are sixteen 256-byte Pages available. The
Working Register Group Pointer is the upper 4 bits of the Register Pointer, RP[7:4], and
points to one of sixteen 16-byte Working Register Groups. There are 16 Working Register
Groups per page. For more information on the Register File, please refer to the sec-
tion‘’Address Space” on page 13.
Flags Register
The Flags Register contains the status information regarding the most recent arithmetic,
logical, bit manipulation or rotate and shift operation. The Flags Register contains six bits
of status information that are set or cleared by CPU operations. Four of the bits (C, V, Z
and S) can be tested with conditional jump instructions. Two flags (H and D) cannot be
tested and are used for Binary-Coded Decimal (BCD) arithmetic.
The two remaining bits, User Flags (F1 and F2), are available as general-purpose status
bits. User Flags are unaffected by arithmetic operations and must be set or cleared by
instructions. The User Flags cannot be used with conditional Jumps. They are undefined at
initial power-up and are unaffected by Reset. Figure 2 illustrates the flags and their bit
positions in the Flags Register.
Table 1. eZ8 CPU Control Registers
Register
Mnemonic
Register Description
Address
(Hex)
FLAGS
Flags
FFC
RP
Register Pointer
FFD
SPH
Stack Pointer High Byte
FFE
SPL
Stack Pointer Low Byte
FFF