TAL Reference Manual

Pointers
TAL Reference Manual526371-001
9-5
Structure Pointer Declaration
3. This example declares a STRING simple pointer and initializes it with the
converted byte address of an INT array. This allows byte access to the word-
addressed array:
INT .a[0:39]; !Declare INT array
STRING .ptr := @a[0] '<<' 1; !Declare STRING simple
!pointer initialized with
!byte address of A[0]
4. This example declares an array and simple pointers at the local or sublocal level
and initializes the pointers with values derived from the array:
INT a[0:1] := [%100000, %110000]; !Declare array
INT .int_ptr1 := a[0]; !Declare simple pointer
!initialized with %100000
INT .int_ptr2 := a[1]; !Declare simple pointer
!initialized with %110000
5. This example declares an array and an extended simple pointer at the local or
sublocal level. The pointer is initialized with the byte address of an indexed
element, assuming the object being indexed has a 32-bit address:
INT .EXT x[-100:100]; !Declare array
INT .EXT x_ptr := @x[-5]; !Declare extended simple
!pointer initialized with
!32-bit byte address of
!X[-5]
Structure Pointer Declaration
The structure pointer declaration associates a previously declared structure with the
memory location to which the structure pointer points. You access data in the
associated structure by referencing the qualified structure pointer identifier.
.
initialization
identifier
:=
,
;
EXIT
(
referral
)
STRING
INT
VST0902.vsd