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.
In assembly code, it seems common to name segments using question marks. Such as, ?C_C51STARTUP, ?STACK, ?DT?MYFILE, etc. Is there a requirement to do this? If not, what is its purpose? I read TFM, and it says nothing.
"Is there a requirement to do this? If not, what is its purpose?"
This is called 'name mangling', and one of its purposes is to avoid namespace conflict in the link stage.
It also follows a naming convention that the C compiler adheres to, and is internally used by the compiler to describe the various memory allocation segments. If you need to write assembly functions to access C declared data objects, you can use the mangled segment names to map to C variables with proper memory type qualifiers. You can also declare data in ASM using the proper segment names and access those objects as C 'extern' variables, declared with the proper memory type qualifiers.