Jump to content

VIDEOMODE (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article VIDEOMODE (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryOperating system software
Founded1983 (with DOS version 2.0)
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the main configuration file utilized by DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users and interpreted by the operating system's DOS BIOS during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL command; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.

CONFIG.SYS primarily contains name=value pairs that establish system configurations or load device drivers and terminate-and-stay-resident programs (TSRs). This file is located in the root directory of the system’s boot partition.

Certain DOS variants prioritize alternative configuration files over CONFIG.SYS. For instance, advanced versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 seek CCONFIG.SYS or CCONFIG.INI, with settings stored in a binary format (CCONFIG.BIN) managed through CONFIG.EXE.

In DR DOS starting from version 3.31, including derivatives like PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.x, a file named DCONFIG.SYS supersedes CONFIG.SYS. This approach facilitates multi-boot environments and disk compression configurations where drive letters may shift after loading compression drivers. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS iterations also check for DRCONFIG.SYS.

From DR-DOS 6.0 onward, enhanced capabilities include modifying default configuration file extensions using SYS /DR:ext, enabling multiple configuration files to coexist in one root directory for selection by boot loaders like LOADER. The SHELL directive supports specifying alternative AUTOEXEC.BAT files, improving automation options during startup.

The CHAIN=filespec command in DR-DOS permits continuation of configuration processing from additional files, with label targeting available in versions 7.02 and above. Versions 7.03 and later also allow copying CONFIG.SYS and AUTOEXEC.BAT alongside system files using SYS /A.

Other DOS systems utilize comparable configuration files: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS, and CONFIG.PTS within PTS-DOS.

In Windows 95 and 98—both built on DOS—CONFIG.SYS and AUTOEXEC.BAT remain present on boot drives but are generally left empty. Windows Me does not process CONFIG.SYS during boot; instead, it loads environment variables directly from the Windows Registry.

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

Example

Sample CONFIG.SYS from 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 that serve as jump points for , , , and commands.
Functions similarly to , also used for inline commentary following other directives. (Under MS-DOS/PC DOS, inline comments enclosed in quotes are not ignored.)
Introduces inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS instructions. (FreeDOS supports conditional execution with boot menus but lacks custom messages.) (DOS 6.0+ offers comparable functionality by appending after commands.)
Forces unconditional execution of the next CONFIG.SYS directive.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Functions as a boot manager.
Adjusts the level of detail for error messages.
Changes the default serial driver used for the AUX device.
Prevents use of character devices outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a beep sound even if notification alerts are disabled.
Defines the subsequent operating system to boot.
Enables or disables extended Ctrl+C interrupt checking.
Specifies how many disk buffers are allocated.
Similar to BUFFERS but loads buffers into HMA or UMB areas.
, ,
Sets cache size, time-to-live, and flush intervals.
Executes programs listed in CONFIG.SYS, pausing further processing until they finish.
Controls the keyboard’s Caps Lock state.
,
Configures CD-ROM driver name and number of buffers.
Continues processing CONFIG.SYS directives from another file or label.
, , , etc.
Various system settings including device types, display options, and codepage configurations.
, ...,
Defines serial COM port count, sequence, I/O addresses, and timeout values.
, also COMMENTS
Alters inline comment characters or ignores subsequent lines depending on DOS version.
, etc.
Activates international support and related configuration options.

Additional CPU- and hardware-specific conditional execution commands (such as CPU386, CPU486) permit tailoring configurations to particular processor models for optimized performance across DOS variants like PTS-DOS and DR-DOS.

DTemplate:NbndF

Sets relocation parameters for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates built-in debugger features.
Functions as a boot manager.
Loads a device driver into conventional memory.
Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country-specific settings and codepages for keyboard, screen, and printer devices.
Sets sizes for cache memory allocations.
Determines floppy disk compatibility mode settings.
Specifies the font used on display output.
Indicates loading DOS into high memory area and/or utilization of upper memory (similar to in DRDOS 5.0).
Loads DOS-related tables (, , , etc.) into upper memory areas.
Specifies an alternate directory path for DOS files.
Designates search paths for data files.
Defines physical parameters for disk drives.
Sets parameters for drives not automatically recognized by the system.
Refer to .
Enables error logging with PDUMP.nnn files and sets target drive location.
Outputs a message on the screen.
Displays messages including ANSI escape sequences support.
Adds extra program startup verification steps.
Assigns an assumed error or return code for subsequent operations.
Controls the A20 gate status during program launch.
Terminates CONFIG.SYS processing prematurely except for certain directives.
Configures hash table size to accelerate file opening (differs from MS-DOS/PC DOS FASTOPEN driver).
Sets how many cached File Control Blocks can be opened concurrently (shares buffer with FILES under DR-DOS).
Same as FCBS but loads caches into upper memory blocks.
Functions as a boot manager.
Defines maximum number of simultaneously open files allowed.
Equivalent to FILES but loads file handles into upper memory areas.
Executes specified subsections within CONFIG.SYS (see IGNORE).

GTemplate:NbndI

Waits for a keypress or timeout, setting the error level to the ASCII code of the key or 1024 if timed out.
Resumes CONFIG.SYS processing at a designated label.
Continues nested CONFIG.SYS processing at a specified label, returning afterwards to the previous point.
Refer to , , or for additional details.
Consult for further information.
See for related commands.
Refer to or as needed.
See or for more context.
Consult for additional usage.
Loads a TSR program into memory after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related functions.
Refer to for further explanation.
See or for similar commands.
Activates console and command line history buffers with enhanced pattern search capabilities.
Defines the HMA segment address.
Configures the HLT power-saving mode.
Sets system boot sector virus scanning options.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits programs to operate at CPU ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
Sets the keyboard Insert mode status.
Loads a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
Rotates PIC interrupt priorities to elevate the priority of a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the relocated keyboard buffer address.
Specifies the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
Lists directories for DLL search paths.
Handles compatibility settings for legacy software applications.
Determines the number of permissible file locks.
Configures boot logo display settings using PTS-DOS boot manager.
Specifies count, order, I/O address, and timeout parameters for the LPT1 device.
Applies LPT1 settings equivalently to LPT2 device.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before increasing process priority levels.
Configures memory allocation policies and strategies.
Defines default DOS memory allocation behavior.
Specifies menu option parameters.
Sets menu color schemes (emulated under DR-DOS).
Determines default menu block (emulated under DR-DOS).
Defines individual menu blocks (emulated under DR-DOS).
Enables multitrack disk operation support.
Continues CONFIG.SYS processing from a new file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default No () character used in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] state on startup.
Executes commands conditionally based on last error code, e.g., .
Displays text and waits for a keypress, similar to DR-DOS's and .
Requires user acknowledgment when errors occur in CONFIG.SYS processing.
Configures buffer sizes for LPT ports output handling.
Executes commands conditionally on PC-compatible machines only.
Sets process scheduler priority levels.
Adjusts priority specifically for disk I/O operations programs.
Changes the default printer device driver among LPT1 through LPT4 options.
Controls whether DOS applications are permitted to run on the system.
Loads a user interface shell environment during startup.
Executes commands conditionally on IBM PS/1-compatible systems only.
Executes commands conditionally on IBM PS/2-compatible systems only.
Suppresses STDOUT display output by muting it.

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 command prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally passing back a return code.
Specifies the amount of real mode memory available.
Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Saves the initial character of deleted files within reserved areas of FAT directory entries.
Under FreeDOS, configures video display mode; in PTS-DOS, determines screen access methodologies.
Toggles the keyboard’s Scroll Lock key state.
Sets environment variables for system use.
Loads the command interpreter shell.
Similar to SHELL but allows preallocation of memory size for COMMAND.COM to be loaded into HMA or UMBs, enhancing memory efficiency especially with third-party shells.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files are closed upon pressing Ctrl+Alt+Del.
Skips the Power-On Self Test (POST) during reboot sequences.
, STACKSIZE, STACKSHIGH
Define stack size parameters across different DOS versions and platforms, each with varying support and memory allocation methods.
, SYSBOOT, SYSGEN, SYSLOAD
Directives specific to PTS-DOS managing boot procedures, system memory layouts, and alternative system loading paths.
, SWITCH
Handles menu blocks and conditional nested CONFIG.SYS processing to provide enhanced configuration flexibility (applicable outside of DR-DOS).
, SWAPPATH
OS/2-specific settings determining locations for error logs and swap files to improve system stability and configuration management.
, SWITCHES
Establish default command-line switch characters ('/' or '-') and specialized options for parsing commands across various DOS versions.
, TRACE, TRACEBUF
Manage timeouts for stepwise execution of CONFIG.SYS and configure buffer sizes for logging purposes to facilitate debugging and automated handling in DR-DOS, PTS-DOS, and OS/2 systems.
Additional directives govern detailed system behaviors primarily relevant to embedded or specialized DOS variants, focusing on memory management, thread concurrency, error handling, and hardware compatibility improvements.

UTemplate:NbndZ

Assigns a specific memory segment for use as Upper Memory Block (UMB).
Specifies which UMB server is utilized by DOS.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version number reported to applications.
Configures VGA display status parameters.
Determines the current video mode setting.
Enables virtual Direct Memory Access (DMA) support.
Controls processor Virtual Mode Extensions (VME).
Configures VxD drivers for Windows environments.
Sets system support options for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Conditional execution directive for XT-compatible hardware platforms.
Configures Year 2000 compliance features.
Defines the default 'Yes' character used in prompt responses.
Enables tracking of file deletions.

Issues

Although the system can initiate booting without a valid CONFIG.SYS file or if it is damaged, both this file and AUTOEXEC.BAT are critical for comprehensive customization and meeting software requirements during startup. Damage or corruption necessitates troubleshooting efforts.

In cases where CONFIG.SYS lacks a SHELL directive or is missing/corrupt, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions will fail to proceed if COMMAND.COM is not found. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7+ provide a prompt requesting the path to a command processor. This prompt also appears if the primary shell terminates or aborts unexpectedly, enabling users to replace the shell at runtime without rebooting.

The COMMAND.COM included with MS-DOS 7.0 and later versions is incompatible with DR-DOS. Typically, DR-DOS prevents bypassing SHELL directives when operating in skip/trace/step modes starting from version 7.02 and beyond. Some later patches partially restored skip functionality to assist recovery from invalid SHELL parameters. If no valid SHELL is found during skipped CONFIG.SYS processing, users are prompted to specify an appropriate shell before COMMAND.COM is loaded from the root directory.

Under MS-DOS/PC DOS environments, CONFIG.SYS file size is constrained to a few kilobytes (up to 64 KB in recent editions), whereas DR-DOS imposes no fixed limit aside from file system restrictions. MS-DOS preprocesses CONFIG.SYS by compiling it into tokenized form before sequentially executing directives—loading device drivers prior to TSRs. Conversely, DR-DOS interprets each directive line-by-line, granting full control over load order via DEVICE and INSTALL commands. This approach facilitates resolving load conflicts and enables conditional execution based on hardware detection or error conditions while integrating temporary utilities into the startup sequence.

In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL command line was limited to 31 characters. Later releases extended this limit up to 128 characters, with DR-DOS supporting up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filename syntax.

Dual booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality. During a DOS boot, these renamed files temporarily assume the names CONFIG.SYS and AUTOEXEC.BAT. The versions specific to Windows 95 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 Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. Instead, DR-DOS utilizes separate startup scripts named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS for driver loading and environment setup prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, the CONFIG.SYS file accessed by OS/2 applications is actually maintained within the system registry.

Numerous CONFIG.SYS commands in OS/2 lack official documentation or are only minimally described.

The use of CONFIG.SYS continues in OS/2 successors 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 commands (archived)
  • Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • Details on FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Guide – includes CONFIG.SYS command descriptions (archived)
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS directives