User`s guide
A Resident System Extension (RSX) is a special type of program that can be
attached to the operating system to modify or extend the functionality of the BDOS.
RSX modules intercept BDOS functions and either perform them, translate them into
other BDOS functions, or pass them through untouched. The BDOS executes non-
intercepted functions in the standard manner.
A transient program can also use BDOS Function 60, Call Resident System Exten-
sion, to call an RSX for special functions. Function 60 is a general purpose function
that allows customized interfaces between programs and RSXS.
Two examples of RSX applications are the GET utility and the LOADER module.
The GET.COM command file has an attached RSX, GET.RSX, which intercepts all
console input calls and returns characters from the file specified in the GET command
line. The LOADER module is another example of an RSX, but it is special because
it supports Function 59, Load Overlay. It is always resident in memory when other
RSXs are active.
RSXs are loaded into memory at program load time. As described in Section 1.6.2,
after the CCP locates a command file, it calls the LOADER module to load the
program into the TPA. The LOADER loads the transient program into memory
along with any attached RSXS. Subsequently, the loader relocates each attached RSX
to the top of the TPA and adjusts the TPA size by changing the jump at location
0005H in Page Zero to point to the RSX. When RSX modules reside in memory, the
LOADER module resides directly below the BDOS, and the RSX modules stack
downward from it.
The order in which the RSX modules are stacked affects the order in which they
intercept BDOS calls. A more recently stacked RSX has precedence over an older
RSX. Thus,, if two RSXs in memory intercept the same BDOS function, the more
recently loaded RSX handles the function.
The CP/M 3 utility GENCOM attaches RSX modules to program files. Program
files with attached RSXs have a special one page header that the LOADER recognizes
when it loads the command file. GENCOM can also attach one or more RSXs to a
null command file so that the CCP can load RSXs without having to execute a
transient program. In this case, the command file consists of the RSX header fol-
lowed by the RSXS.
RSX modules are Page Relocatable, PRL, files with the file type RSX. RSX files
must be page relocatable because their execution address is determined dynamically
by the LOADER module at load time. RSX files have the following format:
1-24
1.6 System Operation CP/M 3 Programmer's Guide