??? 12/01/08 11:04 Read: times |
#160448 - Limited stack Responding to: ???'s previous message |
Two reasons for a stack.
A function call always needs a stack (or something that gives a stack functionality) for the return address. For non-reentrant function calls, the Keil compiler (and a number of other 8051 tools) tries to convert parameters and local parameters into unnamed global variables since the stack functionality on the 8051 is very limited. For reentrant function calls, you can't put parameters and local variables into a shared global variable since you may have a call chain where the function directly or indirectly calls itself (or get's called from an interrupt handler while already being active). The 8051 has limited amount of RAM that can be used for the stack, which is a reason why moving variables to XDATA can help the situation. |
Topic | Author | Date |
Program hangs at one point - 8051F340 | 01/01/70 00:00 | |
Assembly window | 01/01/70 00:00 | |
hyper terminal interface | 01/01/70 00:00 | |
Stack size? | 01/01/70 00:00 | |
Stack size | 01/01/70 00:00 | |
Stack Management | 01/01/70 00:00 | |
Watchdog | 01/01/70 00:00 | |
stack and preview.. | 01/01/70 00:00 | |
Limited stack | 01/01/70 00:00 | |
Where is the UART ISR? | 01/01/70 00:00 | |
ISR for UART | 01/01/70 00:00 | |
ISR for UART? | 01/01/70 00:00 | |
why "TI0=1;" is required | 01/01/70 00:00 | |
No, it isn't | 01/01/70 00:00 | |
Solved - I guess | 01/01/70 00:00 | |
'polling' is NOT "standard C" | 01/01/70 00:00 | |
You are right Erik.. | 01/01/70 00:00 | |
Thought I will thank you individually..![]() | 01/01/70 00:00 | |
Disable watchdog | 01/01/70 00:00 | |
and in Keil it is: | 01/01/70 00:00 | |
Status : WDT disabling in the status worked | 01/01/70 00:00 |