TAL Programmer's Guide

Declaring Structure Pointers in Structures
Using Structures
8–20 096254 Tandem Computers Incorporated
Addresses Structure
Pointers Can Contain
The addressing mode and STRING or INT attribute of a structure pointer determine
the kind of addresses the pointer can contain, as described in Table 8-5.
Table 8-5. Addresses in Structure Pointers
Addressing
Mode
STRING or
INT Attribute Kind of Addresses
Standard STRING
*
16-bit byte address of a substructure, STRING simple variable, or
STRING array declared in a structure located in the lower 32K-word
area of the user data segment
Standard INT
**
16-bit word address of any structure data item located anywhere in
the user data segment
Extended STRING
*
32-bit byte address of any structure data item located in any
segment, normally the automatic extended data segment
Extended INT
**
32-bit byte address of any structure data item located in any
segment, normally the automatic extended data segment
*
If the pointer is the source in a move statement or group comparison expression that omits a
count-unit, the count-unit is BYTES.
**
If the pointer is the source in a move statement or group comparison expression that omits a
count-unit, the count-unit is WORDS.
Allocating Structure
Pointers in Structures
The compiler allocates storage for structure pointers declared within structures when
it allocates the encompassing structure. It allocates one word for each standard
pointer and one doubleword for each extended pointer. The storage area depends on
the scope and addressing mode of the encompassing structure.
The compiler does not allocate space for the data to which the pointer points. You can
store addresses of previously declared items in pointers as described in “Assigning
Addresses to Pointers in Structures” later in this section. Otherwise, you must manage
the allocation of the data to which the pointer points, as described in Appendix B,
“Managing Addressing.”