File Loaded Before COMMAND.COM in MS-DOS 6.22

In MS-DOS 6.22, the file containing the system initialization directives loaded prior to COMMAND.COM is CONFIG.SYS. This plain-text configuration file defines foundational operating parameters, sets internal resource allocations, and loads essential hardware device drivers into memory. By acting as the bridge between low-level kernel initialization and the user-facing command shell, CONFIG.SYS ensures that the hardware environment is fully configured before the primary shell or user scripts execute.

The MS-DOS 6.22 Boot Sequence

Understanding the role of CONFIG.SYS requires examining the sequence of operations MS-DOS 6.22 performs during startup:

  1. BIOS / POST: The system executes Power-On Self-Test routines and loads the Master Boot Record (MBR).
  2. IO.SYS: The BIOS loads IO.SYS, which contains the low-level hardware interface routines.
  3. MSDOS.SYS: The core operating system kernel loads, managing file systems, memory, and process execution.
  4. CONFIG.SYS: IO.SYS reads and processes CONFIG.SYS. At this point, device drivers and system memory directives are placed into memory.
  5. COMMAND.COM: Once CONFIG.SYS finishes execution, the default command interpreter (COMMAND.COM) loads into memory.
  6. AUTOEXEC.BAT: Finally, COMMAND.COM executes AUTOEXEC.BAT, which handles user-level startup commands, environment variables (such as PATH), and Terminate-and-Stay-Resident (TSR) programs.

Common Directives in CONFIG.SYS

The directives in CONFIG.SYS configure system architecture settings that cannot be modified via standard batch files. Key configuration commands include:

  • DEVICE and DEVICEHIGH: Loads device drivers into conventional memory or Upper Memory Blocks (UMBs). Examples include memory managers like HIMEM.SYS and EMM386.EXE, or hardware drivers for CD-ROM drives (OAKCDROM.SYS).
  • DOS: Controls whether MS-DOS maintains portions of its kernel in the High Memory Area (HMA) and manages UMB links (e.g., DOS=HIGH,UMB).
  • FILES and BUFFERS: Defines the maximum number of files that can be opened simultaneously and specifies the amount of memory reserved for disk transfer buffers.
  • SHELL: Specifies the location and parameters of the command interpreter. While COMMAND.COM is the default, the SHELL= directive can customize its environment size or substitute an alternate shell entirely.
  • STACKS: Sets the amount of memory allocated for handling hardware interrupts.

Summary

CONFIG.SYS is the mandatory location for low-level system configuration directives in MS-DOS 6.22. Because it processes before COMMAND.COM, any hardware driver, memory configuration, or system buffer needed by the shell and subsequent batch files must be declared within this file.