User`s guide
A transient program can terminate execution in one of three ways: by jumping to
location 0000H, by making a BDOS System Reset call, or by making a BDOS Chain
To Program call. The first two methods are equivalent; they pass control to the BIOS
warm start entry point, which then loads the CCP into the TPA, and the CCP
prompts for the next command.
The Chain to Program call allows a transient program to specify the next com-
mand to be executed before it terminates its own execution. A Program Chain call
executes a standard warm boot sequence, but passes the command specified by the
terminating program to the CCP in such a way that the CCP executes the specified
command instead of prompting the console for the next command.
Transient programs can also set a Program Return Code before terminating by
making a BDOS Function 108 call, Get/Set Program Return Code. The CCP initial-
izes the Program Return Code to zero, successful, when it loads a transient program,
unless the program is loaded as the result of a program chain. Therefore, a transient
program that terminates successfully can use the Program Return Code to pass a
value to a chained program. If the program terminates as the result of a BDOS fatal
error, or a CTRL-C entered at the console, the BDOS sets the return code to an
unsuccessful value. All other types of program termination leave the return code at
its current value.
The CCP has a conditional command facility that uses the Program Return Code.
If a command line submitted to the CCP by the SUBMIT utility begins with a colon,
the CCP skips execution of the command if the previous command set an unsuccess-
ful Program Return Code. In the following example, the SUBMIT utility sends a
command sequence to the CCP:
A>SUBMIT SUBFILE
A>COMPUTE RESULTS.DAT
A >: REPORT RESULTS. DA T
The CCP does not execute the REPORT command if the COMPUTE command ses
an unsuccessful Program Return Code.
1.6.4 Resident System Extension Operation
This section gives a general overview of RSX use, then describes how RSXs are
loaded, defines the RSX file structure, and tells how the LOADER module uses the
RSX prefix and flags to manage RSX activity.
1-23
1.6 System Operation CP/M 3 Programmer's Guide