Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)

Chapter 2 53
Controlling Asynchronous Devices Programmatically
MPE/iX System Intrinsics
CAUTION
The normal checks and limitations that apply to users with standard
(default) capabilities are bypassed in Privileged Mode. It is possible for
a Privileged Mode program to destroy file integrity, including the
MPE/iX operating system software itself. Hewlett-Packard will, upon
request, investigate and attempt to resolve problems resulting from the
use of Privileged Mode code. This service, which is not provided under
the standard Service Contract, is available on a time and materials
billing basis. Hewlett-Packard will not support, correct, or attend to any
modification of the MPE/iX operating system software.
Obtaining Information Using Intrinsics
Some intrinsics return information to the calling process, either as a
value returned in one of the positional parameters, or through the
special device used to designate functional return information.
Status Information
A number of intrinsics include output parameters in their parameter
lists and can therefore be used to determine information about current
device settings or devicefile specifications. The values returned in this
way are a report of current status, rather than a result of intrinsic
activity.
FGETINFO is an example of such an intrinsic. FGETINFO is called
with the file number of the file about which you are requesting
information specified in its first positional parameter. (The file number
is obtained through an FOPEN or HPFOPEN call initiated by the
calling process.) Access and status information about the file is
returned in the other FGETINFO positional parameters. Information
that can be obtained through a call to FGETINFO includes which file
characteristics are in effect, the logical size of records in the file, the
configured device type, and more. See Chapter 8, “Intrinsics Reference,
for a complete list of the information that can be obtained through a call
to FGETINFO.
Some intrinsics contain a mixture of input and output parameters in
their parameter lists. For example, some intrinsics return a file system
error number in one of the parameters if an error message occurs
during processing.
A special case exists for the FCONTROL intrinsic. FCONTROL
provides a variety of control functions for files or devices, based on the
value of a control code specified by the second parameter in its
parameter list. The value of the second parameter determines the
content of the third parameter, and whether it is used for input, for
output, or both. In some cases the third parameter is used to set a
value, while in other cases it returns a current status. In a few cases