FORTRAN Reference Manual
Memory Organization
FORTRAN Reference Manual—528615-001
12-2
Data Space
The P (program) register is the program counter. It contains the 16-bit C[0]-relative 
address of the current instruction plus one. The contents of the P register are 
incremented by one at the beginning of each instruction that your program executes so 
that, normally, instructions are fetched (and executed) from ascending memory 
locations.
Data Space
FORTRAN allocates memory for your program’s data
•
In the lower half of the user data segment 
•
Depending on the directives you specify, in the upper half of the user data segment
•
In your program’s extended memory segment
FORTRAN also allocates space for file buffers, file control blocks and other internal 
data structures in the user data segment. The user data segment consists of up to 
65,536 16-bit words. Addresses in the data segment start at G[0] (global data, word 0) 
and progress consecutively through G[65535].
Figure 12-1 on page 12-3 shows how FORTRAN allocates data for your program if you 
specify ENV OLD. Figure 12-2 on page 12-4 shows how FORTRAN allocates data for 
your program if you specify ENV COMMON.
The lower half of the user data segment contains global data and the run-time stack on 
which FORTRAN dynamically allocates storage for local data when your program calls 
subprograms. This area is called the memory stack and is logically separated into 
three areas: global, local, and sublocal (“top of the stack”).
You can address data within the global area by an instruction in a program. The 
addressing base is G[0]. FORTRAN stores statically allocated data in the global area, 
including:
•
I/O control blocks, unless the HIGHCONTROL directive is present.
•
OWN data blocks, containing local variables, arrays, and RECORDs that are 
named in DATA or SAVE statements.
•
Common data blocks, unless HIGHCOMMON or LARGECOMMON directives 
specify otherwise.
Data within the local area is known only to the currently executing procedure and its 
subprocedures. The beginning of the local area is defined by the value in the 16-bit L 
register when your program begins execution. The L (local) register contains the G[0]- 
relative address of the word at the beginning of this area. The addressing base for 
local data is L[0]. FORTRAN stores dynamically allocated local data in this area, 
including local variables, arrays, and RECORDs that are not named in DATA or SAVE 
statements.
Data above the current L register is known only to the currently executing procedure. 
The 16-bit S register contains the G[0]-relative address of the last word currently 










