??? 11/15/11 19:19 Read: times |
#184754 - Look at code in Debugger. It will tell all. Responding to: ???'s previous message |
Lukas Valecky said:
So all local variables in main() function are also placed in the stack? But how is it possible to create 1500B local varible in 256B RAM? Does Keil place it into the XRAM or RAM and doesn't care about its overflow? In the datasheet of AT89C51ED2 it is written that the stack may not be located in the XRAM... so how does it work? Thank you very much for your answer and your advice again... ;) The Keil tools basically convert the variables of main() into global variables much the same as you would do manually except that they try to retain the variable scoping as per the way the C code is written as to which modules can see which variables. The variables DO NOT go on the stack at all. The stack is used pretty much only for call/return addresses, interrupt/return addresses and pushed/popped values for context save/restore. Michael Karas |