FORTRAN Reference Manual

Memory Organization
FORTRAN Reference Manual528615-001
12-14
Accessing Data
Accessing Data
Data is accessed through memory reference instructions. Locations in the user data
segment can be addressed through:
The address field in a memory reference instruction (direct addressing)
An address pointer in memory (indirect addressing)
An offset value to be added to a direct or indirect address (indexed addressing)
Figure 12-5. Program Memory Environment
Instruction
Codes and
Constraints
Eight-Element
Register
Stack
L Register
S Register
P Register
16 Bits
RP
C[0]
Code Segment
Sub-local Data
Local Data
Global Data
User Data
Segment
G[0]
Upper
Memory
Data Stack
16 Bits
16 Bits
End
Extended
Data Segment
%002000000
VST1205.vsd
Env Register
P Register: Program counter: address of current instruction plus one (relative to C[0])
Global Data: Data area accessible from any point in a program
Local Data: Data area accessible only from currently executing procedure and its subprocedures
Sub-Local Data: Data area accessible only from currently executing statement function
L Register: Local data pointer: G[0]-relative address of first element in the local data area; also
indicates the location in the memory stack of the link (stack marker) back to the calling
procedure
S Register: Top of stack: G[0]-relative address of the last active element in the memory stack
Register Stack: Eight-element register stack where arithmetic operations are performed.Three elements
can also be used for indexing.
Register Stack: Points to—holds the address of—the current top of the register stack.
Pointer—RP: The stack is empty if RP = 7