Hi all,
I want to know about how the microcontroller distinguish local, static & global variables? I mean where it is to be stored? pls reply me.Thanks in advance.
They are treated by the compiler rather than the microcontroller. In most cases, they use the same type of physical memory (unless declared specificly). Some compilers assign local variables to processor registers, if available.
Cause 8051 stack is limited to idata area, Keil hasn't the option to locate local variables on the stack, as far as I know. It has a reentrant keyword to create a specific local variable stack for functions, that need it. Check in the user manual.