MS-DOS 6.22 Background Tasks System File
In MS-DOS 6.22, the system file that defines the initial execution search path and launches persistent background programs is AUTOEXEC.BAT, working in tandem with CONFIG.SYS for driver-level operations. Because MS-DOS is fundamentally a single-tasking operating system, background operations rely on Terminate-and-Stay-Resident (TSR) programs and system drivers. This article explains how AUTOEXEC.BAT defines the execution path, how background tasks function in DOS 6.22, and the role of related boot configuration files.
The Role of AUTOEXEC.BAT
AUTOEXEC.BAT is a dedicated batch file executed
automatically by the command processor (COMMAND.COM) during
the boot sequence. It controls the startup environment and is the
definitive file for two major functions:
- Defining the Execution Path: The
PATHcommand withinAUTOEXEC.BATsets the global search path (for example,PATH C:\DOS;C:\UTIL). This tells DOS where to look for executable binaries (.EXE,.COM,.BAT) when a command is issued from any directory. - Launching Background Tasks: Standard background
tasks in MS-DOS are loaded as TSR utilities. Programs such as
PRINT.EXE(background print spooling),DOSKEY.COM(command-line recall), andSMARTDRV.EXE(disk caching) are declared and launched directly fromAUTOEXEC.BAT.
The Complementary Role of CONFIG.SYS
While AUTOEXEC.BAT sets the application path and
launches software-level TSRs, CONFIG.SYS is the initial
configuration file processed by the DOS kernel (IO.SYS)
before AUTOEXEC.BAT runs.
CONFIG.SYS is responsible for low-level background tasks
implemented as system device drivers:
- Device Drivers: Commands like
DEVICE=orDEVICEHIGH=load persistent drivers into conventional or upper memory (such asHIMEM.SYSfor extended memory management andEMM386.EXEfor expanded memory). - Shell Path Configuration: The
SHELL=command inCONFIG.SYSspecifies the location and parameters of the primary command processor (typicallySHELL=C:\DOS\COMMAND.COM C:\DOS /P), ensuring the environment is prepared before the path variable inAUTOEXEC.BATis read.
Background Task Execution Mechanism
True preemptive multitasking does not exist natively in MS-DOS 6.22.
When a background task is initialized through
AUTOEXEC.BAT:
- The executable hooks into specific hardware or software interrupts
(such as the timer tick interrupt,
INT 8h, or keyboard interrupt,INT 9h). - The utility executes the DOS
INT 27horINT 21h, Function 31hsystem call to terminate while leaving its code active in memory. - When system interrupts trigger, the TSR interrupts foreground execution momentarily, completes its background routine, and returns control to the active application.