TAL Programmer's Guide

Using Extended Data Segments
Managing Addressing
096254 Tandem Computers Incorporated B–21
Managing Data Allocation in Extended Segments
When you declare a pointer, the compiler allocates storage for the pointer itself but
does not allocate storage for data at the address that is contained in the pointer. You
must manage such allocation yourself. You must remember which addresses you
have used and the length of the data item pointed to by each pointer. When you
initialize subsequent pointers, you must allow space for the preceding data items.
An extended data segment begins at the extended byte address %2000000D. All data
items in an extended data segment are byte addressed. You can manage data
allocation in an extended segment as follows:
INT .EXT x := %2000000D; !Initialize extended simple
! pointer with first byte
! address in extended segment
! for 435-word array
INT .EXT y := @x + 870D; !Initialize extended simple
! pointer with first free
! byte address after array
! pointed to by X for
! 1000-word array
INT .EXT z := @y + 2000D; !Initialize extended simple
! pointer with first free
! byte address after array
! pointed to by Y for
! 94-word array