IA88C00
Microcontroller
Data Sheet
As of Production Version -01
Copyright
2005 ENG 21 0 050519-00 www.Innovasic
Innovasic.com
Innovasic Semiconductor
Page 22 of 80 1.888.824.4184
The Stack Pointer always points to data stored on the tip of the stack. The address is decremented prior to
a PUSH and incremented after a POP.
The stack is also used as a return stack for CALLS and interrupts. During a CALL, the contents of the PC
are saved on the stack to be restored later. Interrupts cause the contents of the PC and FLAGS to be saved
on the stack for recovery by IRET when the interrupt is finished.
When configured for internal stack (using the register file), R217 contains the Stack Pointer. R216 can be
used as a general purpose register. However, its contents will be changed if an overflow or underflow
occurs as the result of incrementing or decrementing the stack address during normal stack operations.
A user-defined stack can be implemented in both the register file and program or data memory. These can
be made to increment or decrement on a push by the choice of opcodes. For example, to implement a
stack that goes from Low addresses to High addresses in the register file, use PUSHUI and POPUD. For a
stack that goes from High address to Low addresses in data memory, use LDEI for POP and LDEPD for
PUSH.
Figure 14. R217 (D9) SPL Stack Pointer
Bit
7
SP7
R/W
6
SP6
R/W
5
SP5
R/W
4
SP4
R/W
3
SP3
R/W
2
SP2
R/W
1
SP1
R/W
0
SP0
R/W
Initial Value
Read/Write
Stack operations are supported in the register file or in data memory. Bit 1 in the external Memory Timing
register (R254B0) selects between the two.
Register pair R216-R217 forms the Stack Pointer used for all stack operations. R216 is the MSB and
R217 is the LSB.
The Stack Pointer always points to data stored on the tip of the stack. The address is decremented prior to
a PUSH and incrementd after a POP.
The Stack is also used as a return stack for CALLS and interrupts. During a CALL, the contents of the PC
are saved on the stack to be restored later. Interrupts cause the contents of the PC and FLAGS to be saved
on the stack for recovery by IRET when the interrupt is finished.
When configured for internal stack (using the register file), R217 contains the Stack Pointer. R216 can be
used as a general purpose register. However, its contents will be changed if an overflow or underflow
occurs as the result of incrementing or decrementing the stack address during normal stack operations.