Jump to content

CPSW (CONFIG.SYS directive)

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

CONFIG.SYS serves as the main configuration file utilized by DOS and OS/2 operating systems. This particular ASCII text document holds setup instructions that are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the system's startup sequence. CONFIG.SYS made its debut with DOS version 2.0.

Usage

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

The file predominantly contains name=value pairs that set parameters or load components like device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the boot drive’s root directory.

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

Certain DOS versions prioritize alternate configuration filenames over CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 favor CCONFIG.SYS or CCONFIG.INI, with supplementary settings stored in a binary file named CCONFIG.BIN, which is managed through CONFIG.EXE. - From DR DOS 3.31 onward, including versions like Novell DOS 7 and DR-DOS 7.02+, DCONFIG.SYS takes precedence. This feature supports multi-boot configurations and disk compression scenarios where drive letter assignments change. - OpenDOS 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS; some DR-DOS releases also recognize DRCONFIG.SYS. - Starting with DR-DOS 6.0, users can modify default system file extensions using SYS /DR:ext, enabling multiple system files and configurations to coexist, selectable via boot managers such as LOADER. - The SHELL command permits specifying alternative AUTOEXEC.BAT files through the /P[:filename.ext] option, a capability also supported by enhanced shells like 4DOS. - DR-DOS includes the CHAIN=filespec directive to continue processing another configuration file, optionally jumping to specific labels.

Other operating systems use different configuration filenames: FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS, and CONFIG.PTS for PTS-DOS.

Although based on DOS, both Windows 95 and Windows 98 maintain CONFIG.SYS and AUTOEXEC.BAT on their boot drives but typically leave these files empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry.

Within the context of FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded at boot time.

Example

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 serving as jump points for , , , , and directives.
Functions similarly to , but additionally permits inline comments after other commands.
Used at the start of inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS instructions. DOS versions 6.0 and later support a comparable feature by appending after commands.
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Configures drives to record file access timestamps within reserved FAT directory entries.
Enables conditional execution on AT-compatible systems.
Provides boot management functionality.
Adjusts the level of detail in error message output.
Alters the default serial port driver (from COM1 to COM4) used by the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a brief beep even when audible alerts are disabled.
Specifies which operating system to boot next.
Enables or disables advanced Ctrl+C interrupt checking.
Defines the quantity of disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
Sets the maximum number of cache blocks allocated dynamically.
Specifies the maximum idle time before unused cache blocks are returned to the system pool.
Defines the maximum interval before dirty cache blocks are flushed to disk.
Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
Sets the initial status of the keyboard Caps Lock key.
Indicates the name of the CD-ROM hardware driver.
Determines the number of buffers allocated for CD-ROM access.
Allows continuation of CONFIG.SYS processing in a new file and optional label, supported since DR-DOS 7.02.
Specifies the type of system clock used.
Clears the screen display.
Defines OEM codepage(s) used by the system.
Specifies CMOS RAM address parameters.
{ { nobold | (PTS-DOS only) } }
Defines colors for the boot menu interface.
{ { mono | 1 = COM1 } } { { nobold | (DR-DOS 7.02+) } }
Configures device count, order, I/O port, and timeout for COM1.
{ { mono | 1 = COM2 } } { { nobold | (DR-DOS 7.02+) } }
Similar configuration settings for COM2 device.
{ { mono | 1 = COM3 } } { { nobold | (DR-DOS 7.02+) } }
Similar configuration settings for COM3 device.
{ { mono | 1 = COM4 } } { { nobold | (DR-DOS 7.02+) } }
Similar configuration settings for COM4 device.
{ { mono | 1 = COMAREA } } { { nobold | (PTS-DOS only) } }
Defines buffer area used for DMA operations.
{ { mono | 1 = COMMENT } } { { nobold | (DOS 4.0+, RxDOS) ignored under DR-DOS 7.02+, Embedded DOS, PTS-DOS) } }
Redefines inline comment characters or causes subsequent line to be ignored.
{ { mono | 1 = COUNTRY } } { { nobold | (DOS 3.0+, DOS Plus, DR DOS, OS/2, PTS-DOS) } }
Activates and configures internationalization support features.
{ { mono | 1 = CPOS } } { { nobold | (DR DOS 6.0+) } }
Sets cursor position on screen within configuration menus.
{ { mono | CPSW } } { { nobold | (MS-DOS 4.x, ignored under DR-DOS 7.02+) } }
Enables codepage switching capability.

CPU-Specific Directives

Conditional directives identify CPU architectures for execution: - ;CPU88: Targets Intel 8088 processors - ;CPU86: Targets Intel 8086 processors - ;CPU286: Targets Intel 286 processors - ;CPU386: Targets Intel 386 and newer processors (supported by DR-DOS and PTS-DOS) - ;CPU486: Targets Intel 486 processors A plus sign (+) indicates that execution applies to the specified CPU model and all subsequent higher models.

These directives facilitate hardware-specific configuration, enhancing system efficiency and ensuring compatibility tailored to business computing environments.

DTemplate:NbndF

Manages relocation settings for drive descriptor tables.
Defines the memory segment boundary up to which multi-sector disk data deblocking is permitted.
Activates support for the internal debugger.
Functions as a boot manager.
Loads a device driver into system memory.
Loads a device driver into upper memory area (similar to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and parallel port devices.
Adjusts cache memory capacity.
Determines floppy disk compatibility mode.
Selects the display font.
Controls whether DOS loads into high memory and/or utilizes upper memory.
Directs loading of DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
Specifies an alternative directory path for DOS files.
Defines search paths for data files.
Details physical characteristics of disk drives.
Sets parameters for drives that are not recognized.
Refer to .
Enables error logging with PDUMP.nnn files and designates the drive for storage.
Outputs a message on the display screen.
Outputs a message incorporating ANSI escape codes.
Specifies additional verification steps when launching programs.
Sets an error or return code to be assumed subsequently.
Determines A20 gate status at program start.
Terminates CONFIG.SYS processing prior to file end (except for SWITCHES and SHELL commands).
Configures the hash table size to optimize file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Sets the count of cached File Control Blocks that can be open concurrently (FCBS and FILES share buffers in DR-DOS).
Similar to FCBS but loads File Control Blocks into upper memory area.
Acts as a boot manager.
Defines the maximum number of files allowed open simultaneously.
Similar to FILES but loads file handles into upper memory space.
Executes designated CONFIG.SYS subsections (refer to IGNORE).

GTemplate:NbndI

Pauses awaiting key press or timeout, setting error level to ASCII code of key pressed or 1024 if timed out.
Resumes CONFIG.SYS execution at a specified label.
Continues nested CONFIG.SYS processing at a given label, returning afterward to previous location.
Refer to , , or .
Refer to .
Refer to .
Refer to or .
Refer to or .
Refer to .
Loads a TSR program into memory after relocating DOS data segment. Compare with INSTCDEX.
Refer to , , or .
Refer to .
Refer to or .
Activates console and command line history buffer featuring advanced pattern search capabilities.
Specifies segment address for HMA (High Memory Area).
Configures CPU HLT instruction energy-saving mode.
Enables scanning for boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits designated programs to execute at CPU ring 2 level for direct hardware I/O access.
Includes directives from another menu block (emulated via GOSUB/RETURN in DR-DOS).
Controls keyboard Insert mode status.
Installs TSR program into conventional memory.
Installs TSR program into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Loads TSR program after relocating DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priority by rotating priorities so specified IRQ number receives highest priority.

KTemplate:NbndM

Determines the keyboard layout configuration.
Indicates the address for the relocated keyboard buffer.
Sets the limit for the highest accessible drive letter.
Similar to LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
Defines paths to search for dynamic-link libraries (DLLs).
Handles backward compatibility with legacy applications.
Specifies the number of permissible file locks.
Configures support for boot logos when using the PTS-DOS boot manager.
Establishes count, sequence, I/O port, and timeout settings for the LPT1 device.
Establishes count, sequence, I/O port, and timeout settings for the LPT2 device.
Establishes count, sequence, I/O port, and timeout settings for the LPT3 device.
Enables and configures the LPT4 device with similar parameters.
Sets the delay before a waiting process receives elevated priority.
Defines the strategy for memory allocation.
Specifies DOS’s default memory allocation method.
Configures menu selections.
Sets menu color schemes (emulatable under DR-DOS).
Defines the default menu block (emulatable under DR-DOS).
Specifies a particular menu block (emulatable under DR-DOS).
Toggles multitrack disk operation support on or off.
Continues processing of CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE%.

NTemplate:NbndQ

Sets the default character representing No () in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status activation or deactivation.
Enables conditional execution based on error code evaluations, e.g., .
Displays a message and waits for a key press, akin to and in DR-DOS.
Requires user confirmation of errors within CONFIG.SYS processing.
Configures buffer sizes assigned to LPT ports.
Enables conditional execution on PC-compatible hardware platforms.
Adjusts scheduler priority settings.
Assigns priority levels to disk input/output programs.
Changes the default printer driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
Determines whether DOS applications are permitted to execute.
Loads a user interface shell environment.
Enables conditional execution on IBM PS/1-compatible systems.
Enables conditional execution on IBM PS/2-compatible systems.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Reserves drive letters specifically for local block device drivers.
Defines the default Resume () character used in prompts.
Returns control from nested CONFIG.SYS processing back to a previous GOSUB or SWITCH point, optionally passing a return code.
Specifies size allocation for real mode memory segments.
Loads programs in the background during CONFIG.SYS processing, similar in function to INSTALL under DOS systems.
Stores the initial character of deleted files within FAT’s reserved space area.
Sets video display mode (FreeDOS) or screen access method (PTS-DOS).
Controls keyboard Scroll Lock status as either enabled or disabled.
Assigns environment variables within the system context.
Loads the command interpreter shell program.
Functions like SHELL but supports a SIZE parameter allowing COMMAND.COM memory allocation into HMA or UMBs, optimizing memory usage with third-party shells.
Specifies states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert keys.
Determines whether files close automatically upon Ctrl+Alt+Del key combination.
Skips Power-On Self-Test (POST) during system reboot sequences.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer locations across various DOS versions and derivatives.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Directives specific to PTS-DOS that manage boot procedures, system memory allocation, and alternative system loading methods.
, SWITCH
Facilitates nested CONFIG.SYS processing with conditional branching capabilities for advanced configurations (available from DOS 6.0 onwards).
, SWAPPATH, THREADS, TIMESLICE
OS/2 directives managing error logging paths, swap file locations, thread concurrency levels, and scheduler time slice durations.
, TRACE
Controls timeout settings and enables single-step execution during CONFIG.SYS processing within DR-DOS and PTS-DOS environments.
, Additional directives like TMPEXT specify temporary file extensions (PTS-DOS), while SXFAKEHWFPU addresses hardware bugs encountered in OS/2 Warp systems.

This collection of CONFIG.SYS commands represents a comprehensive configuration framework spanning multiple DOS variants and OS/2 platforms. It empowers organizations to customize system behavior for enhanced performance tuning, robust error management, efficient device handling, and optimized memory utilization—critical aspects in legacy computing infrastructures.

UTemplate:NbndZ

Directs DOS to allocate a particular segment for UMB (Upper Memory Block) usage.
Determines which UMB server is employed.
Defines the memory address ranges designated as UMB RAM.
Controls whether disk write verification is active or not.
Sets the DOS version that is reported to applications.
Manages the status of the VGA display.
Indicates the current video display mode.
Specifies permission for virtual DMA utilization.
Disables the processor’s Virtual Mode Extensions (VME).
Configures the VxD driver for use with Windows environments.
Establishes system compatibility settings for Windows.
Handles relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware.
Sets parameters for built-in Year 2000 (Y2K) compliance support.
Defines the default affirmative response character in prompts.
Manages tracking of file deletions.

Issues

Although the system can initiate without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for comprehensive customization and meeting software prerequisites. Corruption or loss of these files necessitates diagnostic efforts.

If CONFIG.SYS lacks a SHELL command or if it is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to DOS 6.0 will fail to boot if COMMAND.COM is absent, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users to specify the command interpreter’s location. This prompt also appears if the main command processor terminates unexpectedly or intentionally, allowing limited shell replacement at runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 onward is not compatible with DR-DOS, so DR-DOS versions 7.02 and later prevent skipping SHELL directives during skip, trace, or step operations to avoid conflicts in dual-boot scenarios. Some subsequent patches restored skip functionality to recover from invalid SHELL parameters. If no valid shell is found when bypassing CONFIG.SYS processing, users must input a shell filename before COMMAND.COM loads.

CONFIG.SYS file size restrictions differ: MS-DOS and PC DOS limit it to a few kilobytes (with recent editions supporting up to 64 KB), whereas DR-DOS imposes no meaningful limit. This allows DR-DOS users full control over the sequence of driver and TSR loading via DEVICE and INSTALL commands, aiding in resolving load order conflicts and enabling conditional processing based on hardware detection or error conditions.

In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL lines were limited to 31 characters; later releases expanded this limit to 128 characters, while DR-DOS supports up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows system, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to support dual-boot functionality between Windows 9x and DOS environments. Booting into DOS temporarily restores these original filenames. Backups of the Windows 95 versions are retained as CONFIG.W40 and AUTOEXEC.W40.

With Caldera DR-DOS versions 7.02 or 7.03 installed alongside Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain unchanged. Instead, DR-DOS uses DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS to set up drivers and environment parameters prior to the launch of its graphical user interface.

In the Windows NT environment, specifically within the OS/2 subsystem, the counterpart to CONFIG.SYS is maintained within the system registry instead of being a separate file.

Numerous CONFIG.SYS commands in OS/2 lack comprehensive documentation or are only sparsely detailed.

The use of CONFIG.SYS continues in OS/2-based operating systems like 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
  • PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
  • German-language unofficial PTS-DOS FAQ (PTS/FAQD) including details on CONFIG.SYS directives