pTAL Conversion Guide

Pointers
pTAL Conversion Guideā€”527302-002
10-5
Address Types
Address Types
TAL
You specify where data and pointers are allocated in TNS memory and how data is
addressed by the notation you use when you declare the data. Table 10-1 on
page 10-5 shows the TAL notation for each class of data reference.
Table 10-1. TAL Notation for Data Allocation
Symbol Addressing Type Example Meaning**
(none) Direct INT a;
STRING b;
INT c[0:9];
STRUCT s;
BEGIN
INT i;
END;
The data is in the 64K-
word user data segment
and is accessed
directlyā€”that is, without a
pointer or indirect
address.
. Indirect* INT .a[0:9];
STRING .b[0:9];
STRUCT .s;
BEGIN
INT i;
END;
The pointer and the data
it points to are in the 64K-
word user data segment.
. Pointer INT .a;
STRING .b;
INT .c(t);
The pointer and the data
it points to are in the 64K-
word user data segment.
.EXT Extended INT .EXT a;
STRING .EXT b;
The pointer is in the user
data segment. The data is
in an extended memory
segment.
.SG System globals INT .SG a;
STRING .SG b;
The pointer is in the user
data segment. The data is
in system globals.
= ā€™Pā€™ := Read-only array in
code segment
INT s = 'P':= "AB"; The data is in a 64K-word
code segment.
PROC p; unspecified PROC p;
BEGIN
END;
Procedure's code is in a
code segment .
* The indirect and pointer addressing types are the same except that TAL allocates space for arrays and
structures you declare indirect. When you declare a pointer, TAL allocates space only for the pointer, not for data
that the pointer will point to.
** Sixteen-bit pointers can address STRING data only in the lower 32K-words of a 64K-word segment.