TAL Programmer's Guide

Storage Allocation
Introducing the Environment
096254 Tandem Computers Incorporated 4–9
Global Primary Area
The global primary area can store up to 256 words of the following kinds of global
variables:
Direct variables—simple variables (which are always direct), direct arrays, and
direct structures
Pointers—simple pointers and structure pointers—that you declare
Implicit pointers—pointers that the compiler provides when you declare indirect
arrays or indirect structures
Two implicit extended-stack pointers (described in “Extended Stack” later in this
section)
The compiler allocates storage for each global pointer and each direct global variable
at an increasingly higher offset from the beginning of the encompassing global data
block. Global data blocks are relocatable during binding.
Local Primary Area
The local primary area for each procedure can store up to 127 words of the following
kinds of local variables:
Direct variables—simple variables (which are always direct), direct arrays, and
direct structures
Pointers—simple pointers and structure pointers—that you declare
Implicit pointers—pointers that the compiler provides when you declare indirect
arrays and indirect structures
When a call to the encompassing procedure occurs, the compiler allocates storage at
the current top of the data stack for each local pointer and each direct local variable.
The addresses of the variables are pushed to an increasingly higher offset from L[1].
(L represents the local storage area.)
Sublocal Primary Area
The sublocal primary area for each subprocedure can store up to 32 words of the
following kinds of sublocal variables:
Direct variables—simple variables (which are always direct), direct arrays, and
direct structures
Pointers—simple pointers and structure pointers—that you declare
When a call to the encompassing subprocedure occurs, the compiler allocates storage
at the current top of the data stack for each sublocal pointer and each direct sublocal
variable. The addresses of previously allocated variables are pushed to increasingly
negative offsets from S[0]. (S represents the sublocal storage area.)
When all sublocal variables are allocated, the compiler adjusts the top-of-data-stack
pointer to point immediately below the last variable allocated. The top of the data
stack is illustrated in Figure 4-4 earlier in this section.