| |||||
On-Line Manuals C166 User's Guide | System StackThe system stack stores return addresses and registers used for local register variables. For interrupt functions, the system stack saves the PSW, CP, and status of the MUL/DIV unit. The size of the system stack area is defined and initialized in the startup code which is executed before the C main function is called. The startup code also sets the values for the STKOV (stack overflow) and STKUN (stack underflow) registers. The default value of the system stack is 256 words which is typically enough for most complex applications. However, if the system stack overflows, a stack overflow trap (interrupt 4) is generated. This signals that the system stack is too small. Note
| ||||
| |||||