This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051 memory during function calls and returns

Hello,

I was hoping someone could tell me how the memory works during functions call out of main.

In regular C and C++, after functions return, the memory is free again.

How does it work in the 8051 using C?

For example:

void myFunc()
{ int VAR = 1;
}

When the function gets called does VAR use data memory or code memory? When it returns, is the memory that VAR used, free to be used again?

Thanks.

Parents Reply Children
No data