TAL Programmer's Guide

Addressing Modes
Introducing the Environment
096254 Tandem Computers Incorporated 4–7
Standard Indirect Addressing
Standard indirect addressing is 16-bit indirect addressing in the user data segment,
including:
Byte or word addresses in the lower 32K-word area
Word addresses in the upper 32K-word area
If you use the CRE, however, the upper 32K-word area is not available for your data.
Extended Indirect Addressing
Extended indirect addressing is relocatable 32-bit indirect addressing anywhere in
virtual memory, usually in an extended data segment.
(Absolute extended indirect addressing is described in the System Description Manual
for your system.)
Indexing Indexing can be thought of as being an addressing mode. You can access variables by
appending an index to a variable identifier. The index represents an offset, for
example, as follows:
For an array, the index is an element offset from the location of the zeroth element
of the array. The element size—byte, word, doubleword, or quadrupleword—
depends on the data type of the array.
For a simple pointer, the index is an element offset from the address contained in
the pointer. The element size depends on the data type of the simple pointer.
For a structure or substructure, the index is an occurrence offset from the location
of the zeroth occurrence of the structure or substructure. The occurrence size is
the total number of bytes in one occurrence of the structure or substructure,
including pad bytes.
In the following example, the index [1] lets you access the second element of
MY_ARRAY:
INT my_array[0:2]; !Declare MY_ARRAY, a three-element array
my_array[1] := 5; !Assign 5 to second element of MY_ARRAY
The specifics of indexing arrays, structures, pointers, and equivalenced variables are
discussed in Sections 7 through 10, respectively.