The #pragma Psect Directive

The #pragma psect was used to redirect objects and functions to a new psect (section). It has been replaced by the __section() specifier (see Changing and Linking the Allocated Section), which not only performs the same task, but is easier to use, and has fewer restrictions as to where the psects can be linked. It is recommended you always use the __section() specifier to location variables and function in unique psects.

The general form of this pragma looks like:

#pragma psect standardPsect=newPsect

and instructs the code generator that anything that would normally appear in the standard psect standardPsect, will now appear in a new psect called newPsect. This psect will be identical to standardPsect in terms of its flags and attributes; however, it will have a unique name. Thus, you can explicitly position this new psect without affecting the placement of anything in the original psect.

If the name of the standard psect that is being redirected contains a counter (e.g., text0, text1, text2, etc.), the placeholder %%u should be used in the name of the psect at the position of the counter, e.g., text%%u.