Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (T-V)
Guardian Procedure Calls Reference Manual—522629-013
15-58
USESEGMENT Procedure
(Superseded by SEGMENT_USE_ Procedure )
USESEGMENT Procedure 
(Superseded by SEGMENT_USE_ Procedure
) 
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Example
Summary     
The USESEGMENT procedure selects a particular extended data segment to be 
currently addressable by the calling process.
For selectable segments, a call to USESEGMENT must follow a call to 
ALLOCATESEGMENT to make the selectable extended data segment accessible. 
Although you can allocate multiple selectable extended data segments, you can 
access only one at a time.
For shared flat segments, a call to USESEGMENT can follow a call to 
ALLOCATESEGMENT, but calling USESEGMENT is unnecessary because all of the 
flat segments allocated by a process are always accessible to the process.
Flat segments and selectable segments are supported on native processors that use 
D30 or later versions of the HP NonStop™ operating system. Selectable segments 
are supported on all systems. 
Syntax for C Programmers
•
You cannot call USESEGMENT directly from a C program, because it returns a 
value and also sets the condition-code register. To access this procedure, you 
must write a “jacket” procedure in TAL that is directly callable by your C program. 
For information on how to do this, see the discussion of procedures that return a 
value and a condition code in the 
C/C++ Programmer’s Guide. Note that the 
SEGMENT_USE_ procedure, which should be used in new development, does not 
require a “jacket” procedure in TAL to be called from a C program. 
Note. This procedure is supported for compatibility with previous software and should not be 
used for new development.










