TAL Programmer's Guide

Compiling With Relocatable Data Blocks
Compiling Programs
096254 Tandem Computers Incorporated 14–21
Directives for
Relocatable Data
The RELOCATE and INHIBITXX directives help you make sure that your global data
is relocatable. These directives do not affect local and sublocal variables.
RELOCATE Directive
RELOCATE instructs the compiler and BINSERV to issue warnings if references to
nonrelocatable data occur. RELOCATE can appear anywhere on the compilation
command or in the source file. It is effective for the source code that follows it.
The following RELOCATE example shows base-address equivalencing, which declares
nonrelocatable data because it locates variables relative to the global, local, or sublocal
base address.
?RELOCATE
INT i = 'G' + 22; !Nonrelocatable global data;
! base-address equivalencing
!Some code
i := 25; !Compiler emits warning
For more information on base-address equivalencing and the RELOCATE directive,
see the TAL Reference Manual.
INHIBITXX Directive
INHIBITXX suppresses efficient addressing for extended pointers, extended indirect
array elements, and extended indirect structure items located within the first 64 words
of primary global storage.
INHIBITXX has no effect on data declared in BLOCK declarations with the AT (0) or
BELOW (64) option. The compiler always generates efficient code for such BLOCK
declarations regardless of INHIBITXX.
If the default NOINHIBITXX is in effect, the compiler produces efficient addressing
that might become incorrect if binding relocates extended pointers, extended indirect
array elements, or extended indirect structure items outside the first 64 words.
The INT32INDEX directive overrides INHIBITXX or NOINHIBITXX.