TAL Programmer's Guide
Using Simple Pointers
Using Pointers
096254 Tandem Computers Incorporated 9–3
Initializing Simple Pointers To initialize a pointer in the declaration, specify the assignment operator after the
pointer identifier, followed by an initialization expression that represents an address.
The addressing mode and data type determines the kind of address the simple pointer
can contain, as described in Table 9-2.
Table 9-2. Addresses in Simple Pointers
Addressing Mode Data Type Kind of Addresses
Standard STRING 16-bit byte address in the lower 32K-word area of the user data
segment.
Standard Any except
STRING
16-bit word address anywhere in the user data segment.
Extended STRING 32-bit byte address, normally in the automatic extended data
segment.
Extended Any except
STRING
32-bit even-byte address, normally in the automatic extended
data segment. (If you specify an odd-byte address, results are
undefined.)
Initializing Global
Simple Pointers
At the global level, you can only initialize pointers with constant expressions.
Constant expressions can contain the following operands:
Numeric constants
LITERALs
Return values of standard functions whose arguments are constant expressions
Addresses of previously declared variables obtained by using the @ operator
Standard Pointers
To initialize a standard pointer with the address of a variable, prefix @ to the variable
name on the right side of the assignment operator in the declaration. You can specify
the address to store in a pointer by using any of the following expressions:
Expression Operation
@identifier Accesses address of variable
@identifier '<<' 1 Converts word address to byte address
@identifier '>>' 1 Converts byte address to word address
@identifier[index] Accesses address of variable indicated by index