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.
Hi All, when I write: const char mysting[] ={"my string"}; data are placed to DATA segment, not code sement. I know if it would be written like this: code char mysting[] ={"my string"}; data will be placed in code segment. What I have to do for automatic placing const data to code segment? I did it by #define const code But may be other ways are exist. Thanks, Vladimir
It's not a difficulty. The idea is to give the user the flexibility to locate the strings in any memory space. The default is data space. While you could make an argument that as a const, it should default to code space, someone will then ask why it is not in data space.
Thank you Tom, may be you are right. At least it's supported by other compilers too. But I just wish to have an option at IDE for allocating cont in ROM area. Such options are exist for some compilers. Regards, Vladimir