Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-38
SEGMENT_USE_ Procedure
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. See
error for details.
Considerations
See Considerations on page 14-15 for the SEGMENT_ALLOCATE_ procedure.
Example
error := SEGMENT_USE_ ( new^seg^id, old^seg^id,
base^address, error^detail );
Related Programming Manual
For programming information about the SEGMENT_USE_ procedure, see the
Guardian Programmer’s Guide.