| |||||||||||||||||||
Technical Support On-Line Manuals C251 User's Guide | Hardware StackThe 251 architecture is designed to allow structured languages like C. Therefore, the MCU instruction set supports stack-relative variables with the MOV @DR60 instruction. The 251 hardware stack direction is from the bottom upwards. The hardware stack pointer is initialized in the file START251.A51 which executes before the C main function is called and reserves the space for the hardware stack. The 251 hardware stack holds parameters and automatic variables for reentrant code. The stack layout during the execution of a reentrant function is show in the following example. Refer to Reentrant Functions for more information. C Function
pragma functions (reentrant)
void func (long a, long b, int c) {
char x1, x2;
int y;
float z;
:
:
}
User Stack Layout after Execution of the Epilog of func:
Note
| ||||||||||||||||||
| |||||||||||||||||||