PIC18F010/020
REGISTER 4-1:
STKPTR - STACK POINTER REGISTER
R/C-0
R/C-0
U-0
STKFUL STKUNF
—
bit7
R/W-0
SP4
R/W-0
SP3
R/W-0
SP2
R/W-0
SP1
R/W-0
SP0
bit0
bit 7(1)
bit 6(1)
bit 5
bit 4-0
STKFUL: Stack Full Flag bit
1 = Stack became full or overflowed
0 = Stack has not become full or overflowed
STKUNF: Stack Underflow Flag bit
1 = Stack underflow occurred
0 = Stack underflow did not occur
Unimplemented: Read as ‘0’
SP4:SP0: Stack Pointer Location bits
Note 1: Bit 7 and bit 6 can only be cleared in user software, or by a POR.
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
’1’ = Bit is set
U = Unimplemented bit, read as ‘0’
’0’ = Bit is cleared x = Bit is unknown
FIGURE 4-3:
RETURN ADDRESS STACK AND ASSOCIATED REGISTERS
TOSH
0x1A
Return Address Stack
TOSL
0x34
11111
11110
11101
STKPTR<4:0>
00010
Top-of-Stack
00011
0x0A34 00010
0x0D58 00001
0x0000 00000
DS41142A-page 26
Preliminary
2001 Microchip Technology Inc.