Jump to content

PRIORITY DISK IO (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article PRIORITY DISK IO (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
Headquarters
N/A
ProductsDOS and OS/2 configuration

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users, which the operating system’s DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS customize DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS proceeds to load the command interpreter specified by the SHELL directive; if none is indicated, it defaults to COMMAND.COM. Subsequently, the command shell executes the commands listed in AUTOEXEC.BAT.

CONFIG.SYS primarily contains name=value pairs that define adjustable parameters or initiate loading of files—mainly device drivers and terminate-and-stay-resident programs (TSRs)—into system memory.

In DOS systems, this file is located in the root directory of the bootable drive.

The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German company VEB Robotron.

Certain DOS derivatives prioritize alternative configuration filenames over CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 adopt CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) instead. These platforms support extra configuration data stored in binary files such as CCONFIG.BIN, which users typically modify using CONFIG.EXE.

- From version 3.31 onward, DR DOS, along with variants like PalmDOS, Novell DOS, and OpenDOS, give precedence to DCONFIG.SYS over CONFIG.SYS. This approach facilitates disk compression utilities and multi-boot arrangements by enabling multiple configuration profiles.

- Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize the ODCONFIG.SYS filename, while some DR-DOS versions from 7.02 onwards check for DRCONFIG.SYS as well.

Starting with DR-DOS 6.0, users can alter the default configuration file extension using the command SYS /DR:ext, allowing several system file collections to coexist within a single root directory. Boot loaders like LOADER included with Multiuser DOS and DR-DOS 7.x enable selection among these sets at startup.

Enhanced functionality in the SHELL directive permits specifying alternative AUTOEXEC.BAT files and supports extensions beyond .BAT, capabilities also found in 4DOS.

The CHAIN=filespec command available in DR-DOS 6.0 and later allows continuation of processing configuration files located outside the root folder; from DR-DOS 7.02 onward, this can include optional label parameters.

With DR-DOS 7.03 and newer releases, a SYS /A option exists to copy both CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.

Other DOS variants employ distinct configuration filenames: FreeDOS uses FDCONFIG.SYS, RxDOS versions 7.24 and above utilize RXCONFIG.SYS, and PTS-DOS relies on CONFIG.PTS.

In the case of Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT remain present on boot drives but are generally left blank since Windows depends on alternative configuration mechanisms.

Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the FlexOS environment, CONFIG.SYS differs as a binary file that specifies resource managers and device drivers to be loaded during system initialization.

Example

Here is a sample CONFIG.SYS configuration for MS-DOS 5: <syntaxhighlight lang="ini" line="1"> DOS=HIGH,UMB DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\ANSI.SYS FILES=30 SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P </syntaxhighlight>

:;*?!

Marks labels within CONFIG.SYS to serve as jump destinations for , , , and commands.
Functions similarly to , but permits inline comments following other CONFIG.SYS commands. (In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Initiates inline comments, serving as an alternative to the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS instructions.[1] (FreeDOS does not support optional messages but allows conditional execution via boot menus.) (From DOS 6.0 onward, a similar effect can be achieved by appending after directives, e.g., .)
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Configures which drives record file access timestamps on FAT file systems.
Enables conditional execution on AT-compatible systems.
Boot manager utility.
Adjusts verbosity level of error messages.
Changes the default serial driver used for the AUX: device.
Prevents access to character devices outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a beep sound even if notifications are turned off.
Defines the operating system to boot next.
Enables or disables extended Ctrl+C checking.
Sets the number of disk buffers to allocate.
Similar to BUFFERS but loads buffers into HMA or UMB areas.
, , (Embedded DOS 6-XL)
Configure cache allocation blocks, time-to-live, and flushing intervals.
Loads programs within CONFIG.SYS and runs them in the foreground, halting further processing until completion.
(DR-DOS 7.02+)
Sets the Caps Lock status on the keyboard.
, (PTS-DOS)
Defines CD-ROM driver name and buffer quantity.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label.
, , and other PTS-DOS-specific directives adjust system clock, screen clearing, color settings, and hardware parameters.
, ..., (DR-DOS 7.02+)
Configure COM port quantity, sequence, I/O addresses, and timeout durations.

Other directives control device drivers, memory buffer management, internationalization support, CPU-specific conditional execution (such as CPU386+), and various system parameters aimed at optimizing performance and compatibility across different DOS variants and hardware setups.

DTemplate:NbndF

Adjusts relocation of drive descriptor tables.
Specifies the memory segment limit for multi-sector disk data deblocking.
Activates internal debugger support.
Boot manager component.
Loads a device driver into conventional memory.
Loads a device driver into upper memory (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures cache memory sizes.
Defines floppy disk compatibility mode settings.
Specifies display font selection.
Controls loading of DOS into high memory and/or use of upper memory blocks.
Loads DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
Sets an alternative directory path for DOS files.
Defines search paths for data files.
Specifies physical characteristics of disk drives.
Configures parameters for unrecognized drives.
See .
Enables error log creation with PDUMP.nnn files on specified drives.
Displays a message on the screen during boot or processing.
Outputs messages including ANSI escape codes.
Determines if additional verification occurs when launching programs.
Sets assumed error or return codes for subsequent commands.
Defines A20 gate state when starting programs.
Terminates CONFIG.SYS processing prematurely (except in some cases for SWITCHES and SHELL directives).
Establishes hash table size for accelerated file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies maximum cached File Control Blocks (FCBs) open simultaneously (shares buffer with FILES under DR-DOS).
Same as FCBS but explicitly loads FCBs into upper memory segments.
Boot manager functionality.
Sets maximum number of files openable simultaneously.
Like FILES but explicitly loads file handles into upper memory space.
Includes execution of specified CONFIG.SYS subsections (refer to IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, then sets the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for details.
Consult for additional information.
See for further reference.
Refer to or for guidance.
Check or for related instructions.
See .
Loads a TSR program after relocating the DOS data segment; compare with INSTCDEX.
Consult , , or for more details.
See .
Refer to or as needed.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures energy-saving mode using HLT instruction.
Determines whether the system scans for boot sector viruses.
Loads installable file systems into memory.
Prevents execution of specified CONFIG.SYS subsections.
Grants certain programs permission to operate at ring 2, allowing direct hardware I/O access.
Includes directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the status of the keyboard Insert mode.
Installs a TSR program into conventional memory.
Installs a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR after relocating DOS data segment; see INSTCDEX for comparison.
Adjusts PIC interrupt priority by rotating to prioritize a specified IRQ number.

KTemplate:NbndM

Defines keyboard layout configuration.
Specifies address for relocated keyboard buffer.
Sets maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Lists directories searched for DLL files.
Manages compatibility settings for legacy applications.
Sets the number of file locks allowed.
Configures boot logo display when using PTS-DOS boot manager.
Defines count, sequence, I/O address, and timeout parameters for LPT1 device.
Provides similar configuration options for LPT2 device.
Configures LPT3 device with comparable parameters.
Enables and sets configuration for LPT4 device.
Determines wait duration before increasing process priority level.
Controls memory allocation method used by DOS.
Specifies default approach for DOS memory allocation strategy.
Defines menu options available during boot or configuration.
Sets menu color scheme (can be emulated under DR-DOS).
Specifies default menu block (emulatable under DR-DOS).
Defines a menu block structure (emulatable under DR-DOS).
Enables or disables multitrack disk read/write operations.
Continues CONFIG.SYS processing in a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default character for No () response in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status—on or off at startup.
Executes commands conditionally based on last error code, such as .
Displays text and waits for key press, similar to and commands in DR-DOS environments.
Requires user confirmation upon encountering errors in CONFIG.SYS processing.
Sets buffer size for LPT port communications.
Executes commands conditionally on PC-compatible systems only.
Configures scheduler priority levels for processes.
Sets priority specifically for disk I/O related programs.
Changes default printer device driver assignment among LPT1 through LPT4 ports.
Specifies whether DOS programs are permitted to run within the environment.
Loads user interface components during system initialization.
Executes commands conditionally on IBM PS/1 compatible machines only.
Executes commands conditionally on IBM PS/2 compatible machines only.
Suppresses output sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters to prevent conflicts with local block devices.
Defines the default character for Resume () prompts.
Facilitates returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
Sets the size of real mode memory available.
Functions like CALL but allows simultaneous loading of programs within CONFIG.SYS.
Saves the initial character of deleted files in the FAT reserved area.
Determines video mode settings in FreeDOS and manages screen access control in PTS-DOS.
Controls the keyboard’s Scroll Lock state, enabling it on or off.
Establishes environment variables for system use.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter to relocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines how files are closed when Ctrl+Alt+Del is pressed.
Bypasses POST during reboot if enabled.
, STACKSIZE, STACKSHIGH, STACK
Various directives for stack configuration across different DOS versions and embedded platforms, managing hardware interrupt stacks and memory allocation for threads or buffers.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands handling boot management, system memory arrangement, alternative OS boot files, loading from alternate disk sectors, and placing DOS data/code into UMBs respectively.
, STUBA20
Internal or hardware-related commands applicable only to certain DOS variants or PTS-DOS systems.
, SWITCH
DOS instructions managing submenu blocks (non-DR-DOS) and conditional nested CONFIG.SYS execution with RETURN support (available from DR DOS 6.0 onwards).
, SWAPPATH
OS/2 directives specifying drives for error logging and paths for swap files.
, SWITCHES
Define the system switch character (either '/' or '-') and special options in DOS configurations (ignored by PTS-DOS).
, THREADS, TIMESLICE
OS/2 commands controlling FPU bug mitigation, number of concurrent threads, and scheduler time slice durations respectively.
, TRACE, TRACEBUF
Manage timeouts during CONFIG.SYS processing (in DR-DOS and PTS-DOS), enable or disable single-step execution globally or locally, and set TRACE log buffer sizes (with variations under OS/2).
, TRAPDUMP
PTS-DOS directive setting temporary file extensions and OS/2 command for detailed trap error logging.

UTemplate:NbndZ

Assigns a specific memory segment as an Upper Memory Block (UMB) for DOS usage.
Configures the UMB server parameters.
Defines address ranges allocated for UMB RAM areas.
Toggles disk write verification on or off.
Sets the DOS version string presented to applications.
Manages VGA display status settings.
Specifies the active video mode configuration.
Enables Virtual DMA functionality.
Activates or deactivates Virtual Mode Extensions support.
Configures VxD drivers within Windows environments.
Sets up Windows system-level support features.
Relocates the Extended BIOS Data Area to a different memory location.
Allows conditional execution tailored to XT-compatible machines.
Enables built-in Year 2000 (Y2K) compliance features.
Defines the default character used for Yes responses in prompts.
Configures tracking of file deletions.

Issues

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these files are critical for comprehensive operating system customization and meeting software dependencies. When these files are corrupted or absent, troubleshooting becomes necessary.

In cases where CONFIG.SYS does not include a SHELL directive—or if the file is damaged or missing—DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Versions of DOS prior to 6.0 will fail to boot if COMMAND.COM is not found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions prompt the user to specify a command processor path, offering limited runtime shell substitution without requiring a system reboot.

COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS, which can cause complications in dual-boot environments. Starting with DR-DOS 7.02, the system enforces SHELL directives during skip, trace, and step modes. This improves recovery capabilities by requesting valid shell filenames from users when invalid shell arguments are detected before loading COMMAND.COM.

The maximum allowable size for CONFIG.SYS varies according to the operating system: MS-DOS and PC DOS limit the file size to a few kilobytes—up to 64 KB in later editions—whereas DR-DOS imposes no practical size restriction beyond file system limitations. This difference arises from their distinct processing approaches; MS-DOS compiles CONFIG.SYS into tokenized memory structures for sequential execution, while DR-DOS parses the file line-by-line. The latter method enables precise management of driver and TSR loading order and supports conditional execution based on hardware status or error conditions.

An additional feature of DR-DOS is the INSTALL directive, which allows temporary external utilities to be incorporated into CONFIG.SYS. This capability supports advanced customization and debugging processes.

Earlier MS-DOS versions restricted the length of the SHELL command line to 31 characters; later editions increased this limit to 128 characters, while DR-DOS extends it further to accept up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filename syntax.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality. During DOS startup, these files are temporarily restored under their original names. Backup copies of Windows 95 versions of these files are saved as CONFIG.W40 and AUTOEXEC.W40.

In systems where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its boot configuration.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS for initializing drivers and setting up the environment before launching its graphical user interface. Within the OS/2 subsystem on Windows NT, however, CONFIG.SYS configurations are maintained in the system registry rather than traditional configuration files.

Many CONFIG.SYS commands in OS/2 lack comprehensive documentation or are undocumented altogether. Nevertheless, CONFIG.SYS continues to be employed by OS/2 derivatives such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope (2017)
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives – Microsoft Support (archived)
  • CONFIG.SYS Command Reference – Caldera (1998) (partial DR-DOS 7 directives)
  • Guide to FreeDOS CONFIG.SYS directives
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS instructions (incomplete)
  • German-language unofficial PTS-DOS FAQ (2004) including additional CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG