TAL Programmer's Guide

Accessing the Upper 32K-Word Area
Managing Addressing
B–4 096254 Tandem Computers Incorporated
Storing Addresses
in Structure Pointers
You can store an address in a structure pointer either by initializing the pointer at
declaration or by assigning an address to it after declaration.
Initializing Structure Pointers
You can declare an extended structure pointer named EXT_STRUCT_PTR, specify a
referral named MY_STRUCT and then initialize the pointer with the first byte address
of the upper 32K-word area of the current user data segment as follows:
INT .EXT ext_struct_ptr (my_struct) := %200000D;
!First byte address in upper
! 32K-word area
To associate an INT standard structure pointer with a template structure and initialize
the structure pointer with the first word address in the upper 32K-word area of the
current user data segment, specify:
STRUCT names (
*
); !Declare template structure
BEGIN
INT array[0:11];
END;
INT .struc_ptr (names) := %100000;
!Declare structure pointer;
! initialize it with first word
! address in upper 32K-word area
To associate an extended structure pointer with the structure pointer declared in the
preceding example and initialize the new structure pointer with the first byte address
in the upper 32K-word area of the current user data segment, specify:
STRING .EXT ex_strc_ptr (struc_ptr) := %200000D;
!Declare extended structure
! pointer; initialize it with
! first byte address in
! upper 32K-word area
Assigning Addresses to Structure Pointers
Once you have declared a structure pointer, you can use an assignment statement to
assign an address to the structure pointer.
You can associate an INT structure pointer with a template structure and then assign
the first word address in the upper 32K-word area of the current user data segment to
the structure pointer:
STRUCT names (
*
); !Declare template structure
BEGIN
INT array[0:11];
END;
INT .struc_ptr (names); !Declare STRUC_PTR
@struc_ptr := %100000; !Assign first word address in
! upper 32K-word area