pTAL Conversion Guide

pTAL Conversion Guide527302-002
10-1
10 Pointers
Topics:
Overview on page 10-1
Declaring Pointers on page 10-2
Address Types on page 10-5
Determining Address Types on page 10-9
@ Operator on page 10-14
Operations on Addresses on page 10-17
Pointers That Have Different Widths on TNS and Native Architectures on
page 10-35
Pointers With the Same Widths on TNS and Native Architectures on page 10-39
Reference Alignment with Nonstructure Pointers on page 10-39
Alternatives to Using Address Constants in Native Processes on page 10-41
Alternatives to Using Address Constants in Native Processes on page 10-41
For information about volatile pointers, see Volatile Data on page 5-5.
Overview
TAL
The TNS architecture has several separate memory areas, each of which has its own
address space and requires a different format of address. In contrast, native
architecture has only one memory area, which programs access as one continuous
address space using a 32-bit byte address.
The TAL compiler allocates 16 bits for all pointers except pointers to data in extended
memory segments for which it allocates 32 bits.
pTAL
pTAL introduces ten address types—data types—that ensure that addresses stored in
pointers have the correct format for the data the pointer references.
The native compiler allocates 32 bits for all pointers. In expressions with addresses,
however, pTAL treats all operands as if they were word addresses, except extended
addresses and addresses of strings allocated in the user data segment. The pointer’s
object data type determines the pointers address type and identifies the addressing
type and location of data that your pointers will reference.