Guardian Programmer's Guide

Table Of Contents
Managing Memory
Guardian Programmer’s Guide 421922-014
17 - 30
Referencing Data in an Extended Data Segment
Referencing Data in a Selectable Segment
Following are extended pointers for STRING, INT, and INT(32) data types. The
pointers will be used to access a selectable segment.
INT(32) BASE^ADDR;
STRING .EXT STR^PTR;
INT .EXT INT^PTR;
INT(32) .EXT INT32^PTR;
@STR^PTR := BASE^ADDR;
@INT^PTR := BASE^ADDR + %H20%D;
@INT32^PTR := BASE^ADDR + %H40%D;
In the above statements, BASE^ADDR is the byte address of the first location in the
selectable segment and was returned either by the call to SEGMENT_ALLOCATE_
that allocated this segment or by a call to the SEGMENT_GETINFO_ procedure.
Figure 17-7 shows the effect of the pointers declared above.