Jump to content

CALL (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article CALL (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software / Operating systems
Founded1983
Headquarters
N/A
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This special ASCII text document contains setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the boot process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within this file set up DOS for various devices and software components, including memory management tools. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM. Following this, the shell executes the commands found in the AUTOEXEC.BAT file.

CONFIG.SYS primarily comprises name=value entries that configure adjustable parameters or load essential files, predominantly device drivers and terminate-and-stay-resident programs (TSRs), into memory.

In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.

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

Certain DOS derivatives check for alternate configuration filenames that override CONFIG.SYS:

Earlier editions of Concurrent DOS (versions 3.2 through 4.1) did not support CONFIG.SYS; however, subsequent releases such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 instead seek CCONFIG.SYS. Some Multiuser DOS editions also recognize CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms accommodate extra configuration details stored in CCONFIG.BIN, which can be edited using CONFIG.EXE.

In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS (with "D" indicating "DR DOS") takes precedence over CONFIG.SYS. Initially introduced alongside disk compression utilities to handle drive letter reassignments, it also facilitates multi-boot setups.

OpenDOS 7.01 and DR-OpenDOS 7.02 prioritize ODCONFIG.SYS; additionally, some DR-DOS 7.02+ releases check for DRCONFIG.SYS. From DR DOS 6.0 onward, the SYS /DR:ext command allows users to modify default file extensions, enabling multiple system files to coexist within a single root directory and be selected via boot managers such as LOADER.

The SHELL command permits specifying alternative AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT"—a feature also supported by 4DOS. Starting with DR-DOS 6.0, a CHAIN=filespec directive can be used to continue loading another configuration file; this can optionally include a label parameter (CHAIN=filespec,label) in DR-DOS 7.02+.

From version 7.03 onward, DR-DOS introduces SYS /A, which copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Other operating systems employ their own variants: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS 7.24+, and CONFIG.PTS in PTS-DOS.

Within the root directories of boot drives for Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist but are usually left empty.

Windows Me no longer processes CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.

Example

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 like , but allows in-line commentary following other CONFIG.SYS commands. (Note that under MS-DOS/PC DOS, inline remarks enclosed in double quotes are not ignored.)
Introduces in-line comments alongside the ; directive.
Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS commands. FreeDOS supports conditional execution with boot menus (, ). DOS version 6.0 and later offers comparable functionality by appending a after commands, for example .
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether applications can be aborted upon encountering errors.
Configures which drives record file access timestamps on FAT file systems.
Enables conditional execution on AT-compatible hardware.
Provides boot management capabilities.
Adjusts the verbosity level of error messages.
Alters the default serial driver for AUX: from COM1: to COM4:.
Restricts character device availability outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a brief beep sound even if audible alerts are disabled.
Specifies the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines the number of disk buffers to allocate.
Similar to BUFFERS, but loads buffers into High Memory Area or Upper Memory Blocks.
, , (Exclusive to Embedded DOS 6-XL)
Controls cache block allocation and flushing timing.
Executes programs within CONFIG.SYS, pausing processing until they return control.
Sets keyboard Caps Lock state.
, (Specific to PTS-DOS)
Configures CD-ROM driver name and buffer quantity.
Allows continuation of CONFIG.SYS processing in a new file and label starting with DR-DOS 7.02.
, , and other PTS-DOS directives manage system clock types and screen clearing behavior.
, , and related commands facilitate internationalization and OEM codepage support (primarily for OS/2 and DOS variants).
(Available in DR-DOS 7.02+)
Defines quantity, order, I/O addresses, and timeouts for serial COM ports.
, along with COMMENTS (introduced in DOS 4.0+), redefine inline comment characters or ignore lines depending on DOS variant.

This subset underlines essential directives relevant to business environments that influence system setup, device handling, localization, and boot sequences across MS-DOS, DR-DOS, OS/2, FreeDOS, Embedded DOS, and PTS-DOS platforms—vital information for software providers aiming to optimize compatibility and performance on legacy systems.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Sets memory segment boundaries for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot management utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Configures country codes and codepages for keyboard, screen, and printer devices.
Manages cache memory size settings.
Sets compatibility modes for floppy drives.
Specifies display font parameters.
Controls loading of DOS into high memory and/or use of upper memory blocks.
Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Defines alternative search paths for DOS executable files.
Specifies search paths for data files used by DOS utilities.
Describes physical parameters of disk drives.
Defines settings for unknown or unrecognized drives.
See .
Enables error logging with PDUMP.nnn files on designated drives.
Outputs a message on the screen during boot or processing.
Displays messages using ANSI escape sequences for enhanced formatting.
Enables additional startup checks during program execution.
Specifies an assumed error or return code for processes.
Controls A20 gate state when launching programs to manage memory access above 1MB.
Terminates CONFIG.SYS processing prematurely except when SWITCHES and SHELL directives require continuation under certain conditions.
Sets hash table size used to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Determines the count of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads File Control Blocks into upper memory areas.
Boot management functionality.
Establishes the maximum number of files that may be opened concurrently by the system.
Like FILES but loads file handles into upper memory blocks for improved performance.
Supports inclusion of specified CONFIG.SYS subsections during processing (refer to IGNORE directive).

GTemplate:NbndI

Pauses for a key press or timeout; returns error level as ASCII value or 1024 if timed out.
Resumes processing of CONFIG.SYS at the indicated label.
Continues nested CONFIG.SYS processing at a given label and then returns to the previous point.
Refer to , , or for more information.
Consult for additional details.
See for further reference.
Refer to or as applicable.
Consult or for related instructions.
See for guidance.
Loads a TSR program after relocating the DOS data segment; compare with INSTCDEX.
Refer to , , or for more context.
Consult for related commands.
See or for additional information.
Activates console and command line history buffer featuring extended pattern searching capabilities.
Defines the address of the HMA segment.
Configures the HLT instruction energy-saving mode.
Performs boot sector virus scanning during startup.
Loads installable file system drivers.
Prevents execution of specified subsections within CONFIG.SYS.
Grants certain programs permission to operate at ring 2, enabling direct hardware I/O access.
Incorporates directives from another menu block (simulated via GOSUB/RETURN in DR-DOS).
Sets the status of the keyboard Insert mode.
Installs TSR utilities into memory.
Loads TSR programs into upper memory, functioning similarly to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating DOS data segment; see also INSTCDEX for comparison.
Adjusts PIC interrupt priorities to elevate the priority of a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated address of the keyboard buffer.
Determines the maximum number of accessible drives.
Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory.
Sets paths for searching DLL files.
Handles compatibility settings for legacy software.
Configures the quantity of file locks allowed.
Manages display settings for boot logos with PTS-DOS boot manager integration.
Defines parameters including count, order, I/O address, and timeout settings for LPT1 device.
Applies similar configuration parameters to LPT2 device as used with LPT1.
Configures LPT3 device using similar settings to LPT1.
Enables and sets up LPT4 device parameters.
Specifies delay before a waiting process receives elevated priority status.
Controls memory allocation methods and policies.
Sets default strategy for DOS memory allocation processes.
Establishes menu options within CONFIG.SYS environment.
Determines menu color schemes (can be emulated under DR-DOS).
Assigns default menu block (emulatable under DR-DOS).
Defines individual menu blocks (emulatable under DR-DOS).
Enables multi-track disk operation support.
Continues processing of CONFIG.SYS from a new file after loading drivers and setting %NEWFILE%.

NTemplate:NbndQ

Establishes default No () response character in Yes/No/Resume prompts.
Sets whether the keyboard [[Num Lock|Template:Keypress]] key is enabled or disabled by default.
Allows conditional execution based on returned error codes, e.g., .
Presents text and waits for key input, functioning similarly to and in DR-DOS environments.
Requires user confirmation upon encountering errors in CONFIG.SYS processing.
Configures buffer sizes allocated to LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Adjusts scheduler priority settings accordingly.
Sets priority levels specifically for disk I/O related programs.
Modifies default printer device driver assignment (switching from LPT1 to LPT3 or LPT4).
Determines whether DOS applications are permitted to run in this environment.
Loads a user interface shell component during startup.
Enables conditional execution on IBM PS/1 compatible systems specifically.
Allows conditional execution on IBM PS/2 compatible machines exclusively.
Suppresses output sent to STDOUT stream.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Reserves drive letters for local block device drivers.
Defines the default character for Resume () prompts in Yes/No/Resume queries.
Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH statement, optionally passing a return code.
Sets the size of real mode memory.
Allows programs in CONFIG.SYS to load simultaneously in the background, akin to CALL or INSTALL commands in DOS.
Determines whether the first character of deleted files is preserved in FAT directory entries.
Specifies video modes under FreeDOS or screen access methods in PTS-DOS.
Controls the state of the Scroll Lock key (on/off).
Defines environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports a SIZE parameter for pre-allocating memory in HMA or UMBs, optimizing usage with third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Indicates whether files close when Ctrl+Alt+Del is pressed.
Determines if POST is bypassed during reboot sequences.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer loading into upper memory areas across various DOS versions and Embedded DOS systems.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS commands handling boot manager options, alternative OS boot file selections, DOS memory placement configurations, and system loading from alternate disk sectors.
, SUPPRESSPOPUPS, SWAPPATH
Manage submenu blocking (DOS 6+), error log drive assignments (OS/2), and swap file path settings (OS/2).
, SWITCHES, SWITCHAR
Control conditional processing labels within CONFIG.SYS (DR DOS), enable special options (DOS 4.0+), and set default switch characters ('/' or '-') across multiple DOS variants.
, THREADS, TIMESLICE
OS/2-specific directives addressing FPU bug fixes, configuring concurrent thread counts, and adjusting scheduler time slice durations.
, TRACE, TRACEBUF
Configure timeouts for single-step execution in CONFIG.SYS (DR DOS, PTS-DOS), enable tracing globally or locally across DOS variants, and set trace log buffer sizes (OS/2).
, TRAPDUMP
PTS-DOS directive for temporary file extension handling and OS/2 setting for detailed error logging.

UTemplate:NbndZ

Directs DOS to use a specified segment as Upper Memory Block (UMB) space.
Specifies which UMB server is utilized.
Defines address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Configures VGA display status parameters.
Sets the current video mode similarly to FreeDOS’s SCREEN command.
Determines whether virtual DMA functionality is permitted.
Disables processor Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support parameters for Windows integration.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible machines.
Enables built-in Year 2000 compliance features.
Defines the default character used for Yes responses in prompts.
Controls file deletion tracking behavior.

Issues

Although it is possible to start the system without CONFIG.SYS or AUTOEXEC.BAT files, they are crucial for complete operating system customization and meeting software requirements. Corruption or loss of these files demands troubleshooting efforts.

If CONFIG.SYS does not include a SHELL directive or if this directive is missing or damaged, DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Earlier DOS versions prior to 6.0 will fail to boot without it. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7+ will prompt users to enter a valid command processor path. This prompt also appears if the primary command shell terminates unexpectedly or exits intentionally, offering a limited shell replacement during runtime without needing a reboot.

Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS implementations, DR-DOS versions 7.02 and later restrict bypassing SHELL directives during skip/trace/step modes. Subsequent updates introduced recovery mechanisms that prompt users to specify a valid shell when invalid SHELL arguments are detected before loading COMMAND.COM.

CONFIG.SYS file size limitations differ among systems: MS-DOS and PC DOS enforce maximum sizes up to 64 KB, whereas DR-DOS imposes no specific limit beyond filesystem constraints. MS-DOS converts CONFIG.SYS into a tokenized structure loaded into memory and processes directives sequentially—drivers first followed by TSRs—while DR-DOS interprets each line individually. This line-by-line parsing enables precise control over loading order and supports conditional logic based on hardware detection or error conditions—facilitating debugging or temporary software integration via INSTALL.

Early MS-DOS editions limited the length of SHELL command lines to 31 characters. Later releases extended this limit up to 128 characters, with DR-DOS allowing up to 255 characters. CONFIG.SYS directives do not support long filenames.

Dual Booting DOS and Windows 9x

During the installation of Windows 95 on a system already running DOS or Windows, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality. When switching to DOS mode, these files are temporarily reverted to their original filenames. The Windows 95 versions of these files are saved under the names CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain untouched. Instead, DR-DOS utilizes its own startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 relies heavily on CONFIG.SYS for system configuration, driver loading, and environment initialization prior to launching its graphical user interface.

Within the OS/2 environment embedded in Windows NT, the CONFIG.SYS settings are stored in the system registry rather than as a separate file on disk.

A significant number of CONFIG.SYS commands in OS/2 are either undocumented or only partially documented.

The use of CONFIG.SYS continues in OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
  • Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directive descriptions
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS directives (partial)
  • German-language unofficial PTS-DOS FAQ (archived) – additional CONFIG.SYS directives