We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The feature of shared variables in C is a wonderful saver of DATA space. Can the same be implemented in assembler ? Erik
Do you really? Surely, it's the Linker which does the overlaying, and all it cares about is whether the segment has the 'Overlayable' attribute or not? The Linker doesn't know (or care) about the naming conventions of C51, A51, PL/M, Pascal, or whatever source language you choose to use; the naming conventions are only of interest to you as the programmer if you want to mix these languages? I've not actually tried this on the Keil tools, so I could be totally wrong. Again ;-)
I thought, that certain information like a function data segement is associated with a particular function, is passed to the linker by the "Naming Convention". I could be wrong.
I think that this is not the case: the name is simply what the Linker uses to identify an object; all the other information about the attributes of the object are conveyed in the Object File format (eg, whether it's a Segment or a variable; whether it's overlayable or not,...) But I could be wrong; maybe someone from Keil could clarify?