TAL Programmer's Guide
Using Extended Data Segments
Managing Addressing
B–24 096254 Tandem Computers Incorporated
Example B-4. C-Series Extended Addressing Program
(Page 3 of 3)
!USE new extended data segment for more manipulations.
CALL USESEGMENT (seg_id_two);
IF <> THEN CALL DEBUG;
status := DEFINEPOOL (pool_head, pool_ptr, 4000D);
IF status <> 0 THEN CALL DEBUG;
@block_ptr1 := GETPOOL (pool_head , 101D);
!For content of BYTE_ARRAY
IF <> THEN CALL DEBUG;
block_ptr1 ':=' byte_array[-1] FOR array_len BYTES;
!Move BYTE_ARRAY to first
! pool in extended segment
!You cannot use a move statement to copy data directly from
! an extended segment to another extended segment. You can
! use a move statement to copy data from an extended segment
! to the user data segment and then from there to another
! extended segment, or you can use the MOVEX system procedure
! described in the
Guardian Procedure Calls Reference Manual.
@block_ptr2 := GETPOOL (pool_head, 1000D);
!Get second pool in current
! extended segment
IF <> THEN CALL DEBUG;
block_ptr2 ':=' [8, 16, 32, 40, 48, 56, 64, 128];
!Move constant list into
! this pool in extended
! segment
CALL PUTPOOL (pool_head, block_ptr1);
!Give first pool back
IF <> THEN CALL DEBUG;
CALL PUTPOOL (pool_head, block_ptr2);
!Give second pool back
IF <> THEN CALL DEBUG;
CALL DEALLOCATESEGMENT (seg_id_two, dealloc_flags);
CALL DEALLOCATESEGMENT (seg_id_zero, dealloc_flags);
END;