Guardian Programmer's Guide

Table Of Contents
Managing Memory
Guardian Programmer’s Guide 421922-014
17 - 32
Referencing Data in an Extended Data Segment
Referencing Data in a Flat Segment
Following are extended pointers for STRING and INT data types. The pointers will be
used to access data in two flat segments.
INT(32) BASE^ADDR^A;
STRING .EXT STR^PTR^A;
INT .EXT INT^PTR^A;
INT(32) BASE^ADDR^B
STRING .EXT STR^PTR^B;
INT .EXT INT^PTR^B;
@STR^PTR^A := BASE^ADDR^A ;
@INT^PTR^A := BASE^ADDR^A + %H20%D;
@STR^PTR^B := BASE^ADDR^B ;
@INT^PTR^B := BASE^ADDR^B + %H20%D;
In the above statements, BASE^ADDR^A and BASE^ADDR^B are the byte addresses
of the first locations in the extended data segments and were returned either by the call
to SEGMENT_ALLOCATE_ that allocated these segments or by a call to the
SEGMENT_GETINFO_ procedure.
Figure 17-8 shows the effect of the pointers declared above.