Until the next STRING_SEG pragma
#pragma STRING_SEG (<Modif><Name>|DEFAULT)
STRING_SECTION
__FAR_SEG (compatibility alias: FAR) __PAGED_SEG
The __SHORT_SEG modifier specifies a segment that accesses using 8-bit addresses. The definitions of these segment modifiers are backend-dependent.
<Name>: The name of the segment. This name must be used in the link parameter file on the left side of the assignment in the PLACEMENT part. For information, refer to the linker manual.
DEFAULT.
This pragma allocates strings into a segment. Strings are allocated in the linker segment STRINGS. This pragma allocates strings in special segments. String segments also may have modifiers. This instructs the Compiler to access them in a special way when necessary.
Segments defined with the pragma STRING_SEG are treated by the linker like constant segments defined with #pragma CONST_SEG, so they are allocated in ROM areas.
The pragma STRING_SEG sets the current string segment. This segment is used to place all newly occurring strings.
The synonym STRING_SECTION has exactly the same meaning as STRING_SEG.
The following listing is an example of the STRING_SEG pragma allocating strings into a segment with the name, STRING_MEMORY.
#pragma STRING_SEG __FAR_SEG STRING_MEMORY char * __far p="String1"; void f(char * __far ); void main(void) { f("String2"); } #pragma STRING_SEG DEFAULT
Linker section of the Build Tools manual