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.
main() { char a[10]="srikanth";
//----assembly code starts.....
//--------asm ends......... // c code
}
The name of the segment used for local variables varies depending on the memory model (and thus the type of memory used for locals). See the "Advanced Programming / Segment Naming Conventions / Parameters and Local Variables" section of the Cx51 manual.
Small: ?DT?function_name?module_name Large: ?XD?function_name?module_name
Variables are stored in this segment in order of declaration.
All that said, I agree with the earlier advice: just write the function in assembler and link it. Intermixing assembly code with a high-level language just isn't worth the development headache and maintenance traps.