TAL Reference Manual

Equivalenced Variables
TAL Reference Manual526371-001
10-11
Example of Equivalenced Structure Pointer
Declaration
For portability to future software platforms, declare equivalenced variables that fit
entirely within the previous variable.
Example of Equivalenced Structure Pointer Declaration
The following example declares structure pointers equivalent to another structure
pointer and to an indirect structure:
Base-Address Equivalenced Variable
Declarations
Base-address equivalencing lets you declare variables relative to global, local, or top-
of-stack base addresses. You can declare base-address equivalenced simple
variables, simple pointers, structure pointers, and structures.
VST1011.vsd
.
.
.
ptr to STR
PTR3
STR
Automatic extended data segment
PTR1
PTR2
Primary area of user data segment
STRUCT temp (*);
BEGIN
STRING S[0:71];
END;
STRUCT .EXT str;
BEGIN
STRING name[0:20];
STRING addr[0:50];
END;
INT .EXT ptr1 (str) := @str;
INT .EXT ptr2 (temp) = ptr1;
INT .EXT ptr3 (str) = str;