Hello,
I'm writing some library routines that will live in .h files and want to be able to obtain the name of the CSECT that their code will be residing in -- at compile time.
For example, I'm pretty sure I could do something like this:
#define theCsect "MYCSECT"
...
printf("theCsect detected an issue...");
which should resolve to:
printf("MYCSECT detected an issue...");
And then make sure that theCsect is always
#defined in every module.
In assembler there is the built in variable &SYSSECT, which is set to the CSECT name specified in the assembly. In Metal C, I can
#pragma map(main,MYCSECT)
So what I'm looking for is some sort of compile time function/built-in/system variable/system macro/whatever that could be used in lieu of the
#define technique above, perhaps similar to the __function__ macro (which will return the name of the
current function being compiled, not the enclosing CSECT.
Thanks,
Scott