Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-37
SEGMENT_USE_ Procedure
Syntax for TAL Programmers
Parameters
error returned value
INT
indicates the outcome of the operation. It returns one of the following values:
0 No error; the requested values are returned.
2 Parameter error;
new-segment-id parameter is missing.
3 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.
4
new-segment-id is not allocated.
5
new-segment-id is out of range.
new-segment-id input
INT:value
if not -1, specifies the segment ID of the selectable extended data segment to be
put into use. A value of -1 indicates that the current selectable extended data
segment should be taken out of use and that no new segment should be put into
use.
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.
old-segment-id output
INT .EXT:ref:1
#include <cextdecs(SEGMENT_USE_)>
short SEGMENT_USE_ ( short new-segment-id
,[ short *old-segment-id ]
,[ __int32_t *base-address ]
,[ short *error-detail ] );
error := SEGMENT_USE_ ( new-segment-id ! i
,[ old-segment-id ] ! o
,[ base-address ] ! o
,[ error-detail ] ); ! o