Infineon Technologies C166S V2 User Manual page 65

16-bit microcontroller
Table of Contents

Advertisement

The Stack Pointer Segment Register SPSEG
This non-bit addressable register selects the segment being used at run-time to access
system stack. The lower eight bits of register SPSEG select one of up 256 segments of
64-kilobytes each, while the higher 8 bits are reserved for future use.
SPSEG
Stack Pointer Segment
15
14
13
12
0
0
0
r
r
r
Field
SPSEGNR
System stack addresses are generated by directly extending the 16-bit contents of the
SP register by the contents of the SPSG register as shown in
The system stack cannot cross a 64k byte segment boundary.
Stack Pointer Segment
255
254
1
0
Figure 2-20 Addressing via the Stack Pointer
In case of a non-segmented memory mode, the SPSG register is also used to generate
the physical address. If a non-segmented memory model is selected, extreme care
should be taken when changing the contents of the SPSG register. Improper SPSG
change may result in erroneous system behavior. The SPSG register can be updated via
any instruction capable of modifying an SFR.
User Manual
11
10
9
0
0
0
0
r
r
r
r
Bits
Type Description
[7:0]
rw
15
FF'0000
H
FE'0000
H
01'0000
H
00'0000
H
SFRb
8
7
6
0
r
Stack Pointer Segment Number
Specifies the segment where the stack is located.
SPSEG
7
SPSEGNR
0
23
16 15
2-65
User Manual
Central Processing Unit
Reset Value: 0000
5
4
3
2
SPSEGNR
rw
Figure
2-20.
15
SP
0
V 1.7, 2001-01
C166S V2
H
1
0
0

Advertisement

Table of Contents
loading

Table of Contents