pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Table 76 Data Block Names
With BLOCKGLOBALSWithout BLOCKGLOBALSDeclaration
A_GLOBALINT a;
A_GLOBALINT .a;
A_GLOBALINT .EXT a;
A_GLOBALINT a[0:9]
A_GLOBAL
STRUCT a;
BEGIN
INT i;
END
A$_GLOBALint .ext a [0:9]
A$_GLOBAL
struct .ext a;
begin
int i;
end;
Separately compiled modules can share access to a data block only if both modules allocate the
block in the small data area or both modules allocate the block in the large data area.
References to data in the small data area are faster than references to data in the large data area.
All data blocks in a shared run-time library must be allocated in the large data area.
If the name of a variable is the same as the name of the data block in which the variable is located,
and the block only contains one variable, the compiler allocates the data block in the small data
area if the length of the block is eight or fewer bytes; otherwise, the compiler allocates the data
block in the large data area. (This is the allocation strategy used by the native HP C compiler.)
The compiler does not allocate memory for LITERALs, DEFINEs, or templates and, therefore, does
not create an implicit global data block for these items.
CALL_SHARED
NOTE:
This directive is useful only for the pTAL compiler. The EpTAL compiler ignores it (and issues
a warning).
You cannot link PIC and non-PIC object files into a single object file.
CALL_SHARED
generates shared code (PIC), the only option for the EpTAL compiler.
NOCALL_SHARED
causes the pTAL compiler to generate nonshared code (non-PIC).
NOCALL_SHAREDpTAL compiler:Default:
CALL_SHAREDEpTAL compiler:
AnywherePlacement:
Applies to the compilation unitScope:
CALL_SHARED 383