TAL Programmer's Guide

Addressing Modes
Introducing the Environment
4–6 096254 Tandem Computers Incorporated
Figure 4-3. Byte and Word Addressing in User Data Segment
Lower 32K-word area
Upper 32K-word area
[65534] [65535]
[3]
[5]
[7][6]
[4]
[2]
.
.
.
[32767]
[0] [1][0]
[1]
[3]
[2]
.
.
.
Upper limit for 16-bit
byte addresses
.
.
.
.
.
.
[65535]
Word addresses Byte addresses
348
Direct Addressing Direct addressing uses 16-bit addresses and requires only one memory reference.
Direct addressing is not absolute; it is relative to the base of the global, local, or
sublocal area of the user data segment.
You can use direct addressing only in the lower 32K-word area of the user data
segment. To access data in any other area, use standard indirect addressing or
extended indirect addressing, described next.
Indirect Addressing Indirect addressing requires two memory references, first to a location that contains an
address and then to the data located at the address. You can use indirect addressing to
save space in limited storage areas, as described in “Storage Allocation” later in this
section.
You specify indirect addressing by using an indirection symbol when you declare
indirect arrays, indirect structures, or pointers (including simple pointers and
structure pointers). Simple variables are always direct.
When you declare an indirect array or structure, the compiler automatically
provides an implicit pointer, stores a memory address in it, and then allocates the
data at that address.
When you declare a pointer, you must store the memory address of data in the
pointer and must manage allocation of the data itself.
You can specify standard indirect addressing or extended indirect addressing.