pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
NOGP_OK
suppresses the generation of code that has GP-relative addressing. (This is the only option for
the EpTAL compiler.)
PUSHGP_OK
pushes the current setting (GP_OK or NOGP_OK) onto the GP_OK directive stack. Does not
change the current setting.
POPGP_OK
pops the top value from the GP_OK directive stack and changes the current setting to that
value.
For an explanation of directive stacks, see Directive Stacks (page 369).
GP_OKpTAL compiler:Default:
NOGP_OKEpTAL compiler:
Anywhere except inside a data block or inside a procedure declarationPlacement:
Scope:
• GP_OK applies to subsequent code it until it is overridden by NOGP_OK
• NOGP_OK applies to subsequent code until it is overridden by GP_OK
Do not use GP_OK with CALL_SHAREDDependencies:
CALL_SHARED (page 383)References:
A pTAL program that references data in a shared run-time library (SRL) must specify NOGP_OK
when it declares a data block that belongs to a shared run-time library. This behavior prevents the
pTAL compiler from using GP-relative addressing for references to data in an SRL.
Example 345 GP_OK, NOGP_OK, PUSHGP_OK, and POPGP_OK Directive
?PUSHGP_OK
?NOGP_OK
?NOEXPORT_GLOBALS
BLOCK a_block;
...
END BLOCK;
?EXPORT_GLOBALS
?POPGP_OK
IF and IFNOT
IF and IFNOT identify the beginning of code that is to be conditionally compiled.
toggle-name
is an identifier with a maximum of 31 characters in length
The only characters allowed in a toggle-name are alphabetic (“A” through “Z” and “a” through
“z’), numeric (‘0” through “9”), underscore (“_”), and circumflex (“^”); the first character must
be alphabetic.
398 Compiler Directives