SYSTEM - call a TSS subsystem.

Alternate Entry Name: .SYSTM

Usage:

B:
   status = system([subsys,] format, a1, a2, a3, ... );
/* C users use C "system" */

Where:

subsys
is an optional argument giving the name of the TSS subsystem to be called. If omitted, the first four characters of the command line are used. In order to be recognized as a subsystem name, the "subsys" argument must consist of four non-zero bytes, if the argument is specified.
format, a1, a2, a3, ...
are a format string and a list of arguments which will be sent to PRINTF to prepare the command line for the TSS command.
status
gives a return status for the called system.
Bits 0-17
will contain the subsystem termination status from .LABRT in the slave prefix. If the termination status is zero but the T.ERR bit (switch bit 13) is set, bits 0-17 will contain -2.
Bits 18-35
will contain bits 18-35 of the first user switch word.

Description:

SYSTEM calls another TSS subsystem. A command line is constructed with PRINTF using "format" and the arguments that follow it. This is passed to the called subsystem as its command line. The user does NOT supply a trailing '*n'; that is supplied by SYSTEM. If no subsystem name is supplied, SYSTEM will use the first four characters of the command line.

Notes:

The effect of calling SYSTEM is similar to what would happen if the user had typed the command line at command level. However, TSS does not search the current command list to determine that subsystem to invoke; thus when calling subsystems that have command names that differ from the subsystem name (e.g. OLDN sometimes has command names of "new", "old" and "oldp"), it is the programmer's responsibility to choose the appropriate subsystem. Note however that some command names change their meaning depending on context (e.g. run), and there is no way for an unprivileged program to decide what the subsystem might be.

Examples:

system("access cf,/blat,mode/random/,b/1,20/");

has the same effect as if the user had typed:

access cf,/blat,mode/random/,b/1,20/

See Also:

expl b lib gotoss

Copyright © 1996, Thinkage Ltd.