TAL Programmer's Guide
Accessing the User Code Segment
Managing Addressing
096254 Tandem Computers Incorporated B–9
Accessing the User
Code Segment
You can access the user code segment by storing a 32-bit byte address in an extended
pointer. To build the address, use:
The $DBLL standard function, which returns an INT(32) value from two INT
values. The first INT value becomes the upper half of the INT(32) value, and the
second value becomes the lower half.
An unsigned bit-shift operation ('<<' 1), which converts a word address to a byte
address.
Initializing Simple Pointers You can initialize an extended simple pointer with a 32-bit byte address for read-only
access. The address can point to the seventh word or fourteenth byte of the current
user code segment:
INT .EXT ext_ptr := ($DBLL (3, 7)) '<<' 1; !Declare and
! initialize extended simple
! pointer with 32-bit byte
! address in user code segment
Assigning Addresses to
Simple Pointers
You can assign an address for read-only access in the current user code segment as
follows:
INT .EXT ext_ptr; !Declare extended simple
! pointer
@ext_ptr := ($DBLL (3, 7)) '<<' 1;
!Assign current code
! segment address