Guardian Procedure Calls Reference Manual

old-segment-id
output
INT .EXT:ref:1
returns the segment ID of the selectable extended data segment that was previously in use. If
no selectable segment was in use, a value of -1 is returned.
If new-segment-id specifies a flat segment, old-segment-id returns the segment ID of
the current in-use selectable segment. The flat segment and the selectable segment remain
addressable by the calling process.
base-address
output
EXTADDR .EXT:ref:1
returns the base address of the segment specified by new-segment-id:
For a flat segment, base-address is different for each allocated segment.
For a selectable segment, base-address is always %2000000D (%H00080000).
error-detail
output
INT .EXT:ref:1
returns additional error information when an error value of 3 (bounds error) is returned. For
details, see Returned Value.
Returned Value
INT
Outcome of the operation:
SEGMENT_OK0
No error; the requested values are returned.
SEGMENT_PARAMETER2
Parameter error; new-segment-id parameter is missing.
SEGMENT_BOUNDS3
Bounds error; error-detail contains the number of the first parameter found to be in error, where 1
designates the first parameter on the left. This error is returned only to nonprivileged callers.
SEGMENT_ILLEGALID4
new-segment-id is invalid and is not allocated.
SEGMENT_NOTFOUND5
new-segment-id is out of range.
Considerations
SEGMENT_ILLEGALID (4) is now returned if the supplied segment ID refers to a 64-bit segment
and the optional baseAddress parameter is passed. See the SEGMENT_ALLOCATE_ procedure
Considerations (page 1268).
Example
error := SEGMENT_USE_ ( new^seg^id, old^seg^id,
base^address, error^detail );
SEGMENT_USE_ Procedure 1299