Jump to content

CMOSADDR (CONFIG.SYS directive)

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

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—processes during the startup sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS is processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.

This configuration file primarily contains name=value statements that set parameters or load device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the system's boot drive.

Certain DOS variants prioritize alternative filenames over CONFIG.SYS:

Advanced versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms support supplementary configuration data stored in binary files like CCONFIG.BIN, which can be edited using tools such as CONFIG.EXE.

In DR DOS 3.31 and later editions—including PalmDOS, Novell DOS, and OpenDOS—the file DCONFIG.SYS takes precedence over CONFIG.SYS. Originally linked to disk compression utilities, this feature enables multiple configuration files for multi-boot environments. OpenDOS versions 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS, while certain DR-DOS releases check for DRCONFIG.SYS.

Starting with DR-DOS 6.0, users can alter default system file extensions via SYS /DR:ext, allowing coexistence of parallel system files (e.g., IBMBIO.703). Boot loaders like LOADER in Multiuser DOS and DR-DOS 7.x manage these configurations. The SHELL directive supports specifying alternate AUTOEXEC.BAT files, with COMMAND.COM accepting extensions beyond .BAT—a capability also found in 4DOS.

The CHAIN=filespec command in DR-DOS 6.0 and above permits continuation of configuration processing from additional files, optionally targeting specific labels using CHAIN=filespec,label. Versions 7.03 and newer of DR-DOS include the SYS /A option to duplicate CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS employs FDCONFIG.SYS, while RXCONFIG.SYS is used by RxDOS 7.24 and later. Configuration for PTS-DOS is handled through CONFIG.PTS.

In DOS-based systems such as Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT are located in the root directory but typically remain empty. Conversely, Windows Me bypasses parsing CONFIG.SYS at startup, instead retrieving environment variables from the registry path HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Within the context of FlexOS, CONFIG.SYS is a binary file that defines resource managers along with device drivers.

Example

Sample CONFIG.SYS content 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>

:;*?!

Defines jump targets within CONFIG.SYS for the , , , and commands.
Functions similarly to , but also allows inline comments following other CONFIG.SYS directives. (Note: Under MS-DOS/PC DOS, inline comments within double quotes are not ignored.)
Utilized for inline commentary in conjunction with the ; command.
Presents a Yes/No prompt to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional processing with boot menus.) DOS 6.0 and later versions provide a comparable feature using appended to the directive.
Forces execution of the next CONFIG.SYS command without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps in the FAT file system.
Enables conditional execution on AT-compatible systems.
Manages boot loading.
Adjusts verbosity level of error messages.
Changes the default serial port driver (COM1: through COM4:) used by the AUX device.
Prevents access to character devices located outside the virtual \DEV directory.
Loads fundamental device drivers into memory.
Produces a beep sound even if audible alerts are disabled.
Specifies the operating system to boot subsequently.
Enables or disables extended Ctrl+C interrupt checking.
Allocates a specified number of disk buffers.
Equivalent to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Set parameters for cache allocation and flushing behavior.
Loads executable programs during CONFIG.SYS processing, running them in the foreground and pausing further processing until they return control.
Defines keyboard Caps Lock state.
, CDDBUFFERS (PTS-DOS only)
Sets CD-ROM driver name and buffer quantity.
Continues CONFIG.SYS parsing from a different file or label.
, CLS, CODEPAGE (various OS-specific)
Configure system clock type, clear screen display, and OEM codepage settings respectively.
(DR-DOS 7.02+)
Specifies count, logical sequence, I/O port address, and timeout values for serial devices COM1 through COM4.
, COMMENT(S), COUNTRY, CPOS, CPSW (various OS-specific)
Manage DMA buffers, inline comments, internationalization support, cursor positioning, and codepage switching features respectively.
CPU-related directives (PTS-DOS only)
Conditional execution based on CPU model and speed variants including CPU88, CPU86, CPU286, CPU386, CPU486.

DTemplate:NbndF

Configures relocation of drive descriptor tables in memory.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Handles boot management tasks.
Loads device drivers into conventional memory.
Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Adjusts cache memory size parameters.
Specifies compatibility mode for floppy disk drives.
Selects display font settings.
Controls loading DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS system tables such as BUFFERS, FCBS, FILES into upper memory blocks.
Defines alternative directory path for DOS system files.
Specifies search paths used for data files.
Establishes physical characteristics of disk drives.
Defines parameters applicable to unknown or unsupported drives.
Refer to .
Enables creation of PDUMP.nnn error log files on specified drives.
Outputs messages directly to the screen.
Displays messages with embedded ANSI escape sequences support.
Adds extra validation checks when launching programs.
Sets an error or return code value for subsequent operations.
Controls the A20 gate status during program startup sequences.
Terminates CONFIG.SYS processing prematurely before reaching file end (excluding certain directives).
Configures hash table size used to accelerate file opening operations, differing from MS-DOS/PC DOS external FASTOPEN driver behavior.
Specifies number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Same as FCBS but loads FCBs into upper memory area.
Boot management function.
Sets maximum number of files that can be opened concurrently.
Same as FILES but loads file handles into upper memory blocks.
Executes designated CONFIG.SYS subsections (also see IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
Resumes CONFIG.SYS processing at a specified label.
Continues processing nested CONFIG.SYS sections at a given label, then returns to the previous point.
Refer to , , or for more details.
Consult for additional information.
See for further reference.
Refer to or as applicable.
Check or for related commands.
See for more context.
Loads a TSR program similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related functionality.
Consult for further details.
Refer to or as needed.
Activates console and command line history buffer along with enhanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving features using the HLT instruction.
Determines whether the system performs boot sector virus checks.
Loads installable file system drivers.
Prevents execution of specific CONFIG.SYS subsections.
Permits select programs to operate at ring 2, enabling direct hardware I/O access.
Includes directives from another menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode status.
Installs a TSR program into conventional memory.
Installs TSR into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Loads TSR post-DOS data segment relocation, similar to INSTALL (see also INSTCDEX).
Rotates PIC interrupt priorities to assign highest priority to a chosen IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer’s memory address.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory space.
Establishes search paths for DLL files.
Manages compatibility settings for legacy software.
Configures the quantity of file locks allowed.
Controls boot logo display when using PTS-DOS boot manager.
Specifies count, order, I/O port address, and timeout for LPT1 device configuration.
Applies the same settings as LPT1 for LPT2 device.
Mirrors LPT1 configuration for LPT3 device as well.
Enables and configures LPT4 device similarly to others.
Sets delay time before increasing process priority level.
Determines memory allocation strategy parameters.
Specifies default DOS memory allocation approach.
Defines available menu options within CONFIG.SYS environment.
Sets menu color schemes (emulatable under DR-DOS).
Assigns default menu block (emulatable in DR-DOS).
Defines individual menu blocks (emulated under DR-DOS).
Enables or disables multitrack disk operation support.
Continues CONFIG.SYS processing from a new file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () character used in Yes/No/Resume prompts.
Toggles keyboard Num Lock status on or off at startup.
Executes commands conditionally based on last error code, e.g., .
Displays text and waits for key input, similar to and commands in DR-DOS environments.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Configures buffer sizes for LPT port operations.
Executes conditionally on PC-compatible hardware platforms.
Sets scheduler priority levels for processes.
Adjusts priority specifically for disk I/O intensive programs.
Changes default printer device driver assignment from LPT1 through LPT4 as needed.
Controls whether DOS applications are permitted to run under current settings.
Loads a user interface shell program during startup sequence.
Executes commands conditionally on IBM PS/1-compatible systems only.
Executes commands conditionally on IBM PS/2-compatible systems only.
Suppresses output directed to STDOUT stream.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters for local block device drivers.
Defines the default Resume () character displayed in prompts.
Enables returning from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command location, optionally with a return code.
Sets the size of real mode memory available.
Allows concurrent loading of programs specified in CONFIG.SYS in the background.
Saves the initial character of deleted files within a reserved FAT area.
Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Configures the Scroll Lock key status on the keyboard, enabling or disabling it.
Establishes environment variables for system use.
Loads the command interpreter shell.
Functions similarly to SHELL but supports pre-allocating space to relocate COMMAND.COM into High Memory Area (HMA) or Upper Memory Blocks (UMBs), enhancing memory handling with third-party shells.
Specifies keyboard modifier states including Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files are closed upon pressing Ctrl+Alt+Del.
Skips Power-On Self-Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Manage hardware interrupt stack sizes and buffer locations across various DOS versions and embedded platforms with differing capabilities.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS specific commands that handle boot configuration, system memory allocation, and strategies for loading into upper memory blocks (UMBs).
, SUPPRESSPOPUPS
Defines submenu block behavior (DOS 6.0+) and specifies drives for error logging (OS/2).
, THREADS, TIMESLICE
OS/2 directives that regulate swap file paths, thread concurrency levels, and scheduler time slice durations.
, SWITCHES, SWITCHAR
Control conditional processing within CONFIG.SYS using customizable option prefixes such as '/' or '-'.
, TRAPDUMP
OS/2 utilities addressing hardware floating-point unit bugs and providing comprehensive error logging.

This segment outlines essential CONFIG.SYS directives found across different DOS variants, underscoring their role in delivering adaptable system configurations vital for maximizing operational efficiency in varied enterprise environments.

UTemplate:NbndZ

Configures a specific memory segment as an Upper Memory Block (UMB) for DOS usage.
Sets the server responsible for managing UMB allocations.
Defines address ranges designated as UMB RAM areas.
Enables or disables verification of disk write operations.
Reports the DOS version presented to software components.
Manages VGA display status parameters.
Specifies the current video mode analogous to FreeDOS’s SCREEN directive.
Activates virtual DMA functionality.
Controls processor Virtual Mode Extensions (VME) settings.
Configures Virtual Device Drivers (VxD) for Windows environments.
Manages Windows system support parameters.
Handles relocation of the Extended BIOS Data Area (XBDA).
Implements conditional execution tailored for XT-compatible machines.
Enables built-in Year 2000 compliance support features.
Sets the default affirmative response character used in prompts.
Tracks deletion events related to device drivers.

Issues

Although the operating system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT present, these files are critical for tailoring the OS and loading necessary software components. Issues such as file corruption or absence may necessitate troubleshooting efforts.

If a SHELL directive is missing from CONFIG.SYS or if the file itself is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier versions prior to 6.0 will not proceed if COMMAND.COM is not found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions display a prompt requesting the command interpreter’s path. This prompt also appears following shell failures or intentional exits, allowing limited shell replacement during runtime without requiring a reboot.

Due to incompatibility between MS-DOS 7.0+ COMMAND.COM and DR-DOS, DR-DOS 7.02 and newer restrict bypassing SHELL directives when using skip, trace, or step modes to prevent operational errors. In cases where no SHELL directive is detected during skipped CONFIG.SYS processing, users are prompted to input a valid shell filename before COMMAND.COM loads.

CONFIG.SYS file size limitations differ among systems: MS-DOS and PC DOS impose restrictions limiting files to a few kilobytes—up to 64 KB in later releases—whereas DR-DOS enforces no size constraints beyond those imposed by the underlying file system. MS-DOS processes CONFIG.SYS by tokenizing its contents into memory before executing directives sequentially—loading device drivers prior to TSRs. Conversely, DR-DOS interprets directives line-by-line, granting granular control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates resolving load conflicts and integrating temporary external utilities within CONFIG.SYS processing.

Limits on SHELL command line length also vary: MS-DOS/PC DOS versions 2.0 through 4.01 support up to 31 characters, later versions accept up to 128 characters, while DR-DOS permits lines up to 255 characters long. It is important to note that CONFIG.SYS directives do not accommodate long filenames.

Dual Booting DOS and Windows 9x

During the installation of Windows 95 on a system already running DOS or a previous Windows version, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality. When the system starts in DOS mode, these files are temporarily reverted to their original filenames. Meanwhile, backups of the Windows 95 variants are kept under the names CONFIG.W40 and AUTOEXEC.W40.

In contrast, when installing Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files for Windows remain unchanged. Instead, DR-DOS employs separate startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

OS/2 extensively utilizes CONFIG.SYS to set up drivers and environment variables prior to launching its graphical user interface. Within the Windows NT environment, specifically in the OS/2 subsystem, the functionality corresponding to CONFIG.SYS is handled through registry settings.

OS/2 makes use of a variety of CONFIG.SYS commands that are not officially documented. The role of CONFIG.SYS continues to be significant 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
  • Guide to FreeDOS CONFIG.SYS directives
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives (archived)
  • Unofficial German FAQ for PTS-DOS featuring CONFIG.SYS directives (archived)