Jump to content

HMAREA (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article HMAREA (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryOperating systems
Founded1983
ProductsSystem configuration directives for DOS and OS/2

CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text ASCII file holds setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for configuring DOS components such as devices, software applications, and memory management. Once CONFIG.SYS has been processed, DOS proceeds to load the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM, which then runs AUTOEXEC.BAT.

This file predominantly consists of name=value statements that set parameters or initiate device drivers and terminate-and-stay-resident (TSR) programs. In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.

Certain DOS variants utilize alternative configuration filenames that override CONFIG.SYS:

Earlier releases of Concurrent DOS (versions 3.2 through 4.1) did not support CONFIG.SYS; however, subsequent versions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS (short for "Concurrent") or CCONFIG.INI within Multiuser DOS environments. In REAL/32, the preferred filename is MCONFIG.SYS. These platforms also maintain extended configuration data in a binary file named CCONFIG.BIN, which is managed using CONFIG.EXE.

For DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and later DR-DOS editions, DCONFIG.SYS (derived from "DR DOS") takes precedence over CONFIG.SYS. Originally associated with disk compression utilities, this naming convention also supports multi-boot configurations. Moreover, OpenDOS versions 7.01 and DR-OpenDOS 7.02 check for ODCONFIG.SYS, while some DR-DOS releases from 7.02 onward look for DRCONFIG.SYS.

Starting with DR DOS 6.0+, users can alter the default configuration file extensions using SYS /DR:ext, facilitating multiple system file collections selectable by boot loaders like LOADER (employed in Multiuser DOS and DR-DOS). The SHELL command allows specifying an alternate AUTOEXEC file via /P[:filename.ext], with COMMAND.COM supporting extensions beyond ".BAT" (also compatible with 4DOS). The CHAIN=filespec command permits continuation of configuration processing in a different file, optionally targeting specific labels.

From DR-DOS 7.03 onward, the command SYS /A enables copying both CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Other operating systems use different filenames: FreeDOS employs FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; while PTS-DOS utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of Windows 95 and Windows 98, though they are usually left empty. In contrast, Windows Me does not process CONFIG.SYS during startup, instead retrieving environment variables from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Within FlexOS distributions (such as FlexOS 286 version 1.13), CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded.

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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump targets for , , , , and directives.
Functions similarly to , but additionally supports in-line comments following other commands. (Note: Under MS-DOS/PC DOS, in-line comments enclosed in double quotes are not ignored.)
Used at the start of in-line comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support custom messages but allows conditional processing with boot menus.) DOS version 6.0 and later introduces a comparable feature by appending after directives (e.g., ).
Executes the next CONFIG.SYS command without condition.

ATemplate:NbndC

Determines whether programs can be interrupted upon errors.
Sets which drives record file access timestamps within FAT filesystems.
Enables conditional execution on AT-compatible hardware.
Manages boot configuration.
Adjusts the verbosity level of error messages.
Alters the default internal serial driver assigned to the AUX device.
Prevents character devices from being accessible outside the virtual \DEV directory.
Loads a fundamental device driver into system memory.
Produces a beep sound regardless of notification settings.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C detection.
Defines the quantity of disk buffers to be allocated.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage allocation and flushing intervals for cache blocks.
Executes programs within CONFIG.SYS in the foreground, pausing further processing until completion.
(DR-DOS 7.02+)
Sets keyboard Caps Lock state on or off.
, CDDBUFFERS (PTS-DOS only)
Designates CD-ROM driver name and buffer quantity.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label.
, CLS, CODEPAGE, CMOSADDR, COLOR
Configure system settings including screen clearing, codepage selection, CMOS RAM address, and boot menu color schemes (specific to PTS-DOS or OS/2).
, COM2, COM3, COM4 (DR-DOS 7.02+)
Define serial port parameters such as count, sequence, I/O addresses, and timeouts.
, COMMENT(S), COUNTRY
Manage DMA buffer assignments, inline comment handling, and internationalization support respectively.
, CPSW (MS-DOS 4.x), CPU settings (PTS-DOS only)
Control cursor positioning, codepage switching capabilities, and CPU-specific conditional commands.

This segment outlines essential CONFIG.SYS directives crucial for system setup and performance tuning across various DOS platforms including DR-DOS, MS-DOS, FreeDOS, OS/2, PTS-DOS, and Embedded DOS—vital for enterprises maintaining legacy environments or embedded systems requiring precise hardware management.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Specifies memory segment address used for multi-sector disk data deblocking operations.
Activates built-in debugger support.
Manages boot configuration options.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
Configures country codes and codepage information for keyboard, screen, and printer devices.
Sets sizes for cache memory allocation.
Defines compatibility mode for floppy disk drives.
Selects display font settings.
Controls loading of DOS into high memory and utilization of upper memory blocks (similar functionality as in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES into upper memory segments.
Specifies an alternative directory path for DOS system files.
Defines search paths for data files.
Sets physical parameters for disk drives.
Establishes parameters for unrecognized or unknown drives.
See .
Enables creation of PDUMP.nnn error log files on a specified drive.
Displays a plain text message on screen.
Outputs a message incorporating ANSI escape codes for formatting.
Applies additional validation checks when initiating programs.
Defines expected error or return codes from programs.
Controls the state of the A20 gate during program startup sequences.
Terminates CONFIG.SYS processing prematurely (with some exceptions).
Configures hash table size to accelerate file open operations—differs from MS-DOS/PC DOS FASTOPEN driver behavior.
Sets the maximum number of cached File Control Blocks open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but explicitly loads buffers into upper memory areas.
Manages boot configurations via boot manager utility.
Determines maximum number of concurrently open files allowed by the system.
Like FILES but explicitly loads file handles into upper memory blocks.
Executes specified subsections within CONFIG.SYS (refer also to IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
Resumes processing of CONFIG.SYS at the designated label.
Continues nested CONFIG.SYS execution at a given label, returning to the prior location afterward.
Refer to , , or for more details.
See .
See .
Refer to or for additional information.
Refer to or for guidance.
See .
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or .
See .
Refer to or for further explanation.
Activates console and command line history buffers with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures the HLT power-saving mode.
Sets system verification for boot sector viruses.
Loads file systems that are installable.
Prevents execution of specified subsections within CONFIG.SYS.
Permits designated programs to execute at ring 2, allowing direct hardware I/O access.
Includes directives from an alternate menu block (simulated via GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode state.
Installs a TSR program into memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.
Installs a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a specified 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 the Current Directory Structure (CDS) into upper memory.
Lists directories searched for DLL files.
Manages compatibility with legacy applications.
Specifies the quantity of file locks permitted.
Configures boot logo display and startup messages using PTS-DOS boot manager.
Defines parameters such as count, order, I/O address, and timeout for LPT1 device.
Defines parameters such as count, order, I/O address, and timeout for LPT2 device.
Defines parameters such as count, order, I/O address, and timeout for LPT3 device.
Enables and configures settings for LPT4 device support.
Sets delay before process priority is increased.
Specifies strategy for memory allocation management.
Defines default strategy for DOS memory allocation.
Establishes menu options configuration.
Specifies menu color schemes (emulation supported under DR-DOS).
Sets default menu block (emulatable under DR-DOS).
Defines a menu block (emulated under DR-DOS).
Enables multitrack disk operations support.
Continues CONFIG.SYS processing in a separate file after loading device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default character for No () responses in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status (on/off).
Executes commands conditionally based on last return code or error status, e.g., .
Displays text and pauses until key press, similar to and commands in DR-DOS.
Requires user confirmation of errors during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Executes conditionally on PC-compatible hardware platforms.
Sets priority level for scheduler processes.
Assigns priority for disk I/O-related programs.
Changes default printer device driver assignment (e.g., from LPT1 to LPT3 or LPT4).
Determines whether DOS applications are permitted to run.
Loads a user interface shell environment.
Executes conditionally on IBM PS/1-compatible systems.
Executes conditionally on IBM PS/2-compatible systems.
Suppresses STDOUT display output.

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.
Sets the default character for Resume () prompts in Yes/No/Resume dialogues.
Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH statement, optionally passing back a return code.
Defines the size of real mode memory.
Enables simultaneous loading of programs in CONFIG.SYS in the background, similar to CALL or INSTALL commands in DOS.
Determines whether the first character of deleted filenames is preserved in the FAT reserved area.
Configures video mode (FreeDOS) or screen access methods (PTS-DOS).
Controls the keyboard Scroll Lock key state, turning it on or off.
Sets environment variables.
Loads the command interpreter shell.
Functions like SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, reducing fragmentation.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Indicates whether files should close upon pressing Ctrl+Alt+Del.
Determines if POST is bypassed during reboot.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer locations across different DOS variants with varying support levels.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Exclusive to PTS-DOS, these directives manage boot processes, system loading, and memory allocation including UMB utilization.
, SWITCH
Controls submenu blocks and conditional nested CONFIG.SYS processing (supported with RETURN in DR DOS).
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific directives that manage error logging paths, swap file locations, thread concurrency, and scheduler time slices.
, SWITCHES
Define default command-line switch characters ('/' or '-') and special options for DOS variants except PTS-DOS.
, TRACE, TRACEBUF
OS/2 directives used for addressing FPU bugs and enabling or disabling single-step execution of CONFIG.SYS with configurable trace buffer sizes.
, TRAPDUMP
Directives in PTS-DOS and OS/2 that specify temporary file extensions and detailed error logging respectively.

UTemplate:NbndZ

Configures DOS to utilize a specified segment as Upper Memory Block (UMB) memory.
Sets which UMB server is employed.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Manages VGA display status settings.
Defines the current video mode similarly to FreeDOS's SCREEN directive.
Determines if virtual DMA functionality is enabled.
Indicates whether Virtual Mode Extensions of the processor should be disabled.
Configures VxD driver settings for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible machines.
Enables built-in Year 2000 compliance support.
Sets the default character used for Yes responses in prompts.
Configures tracking of file deletions.

Issues

The files CONFIG.SYS and AUTOEXEC.BAT play a critical role in tailoring DOS behavior during startup and specifying necessary software components. Although booting can occur without CONFIG.SYS, its absence or corruption demands troubleshooting measures.

When CONFIG.SYS omits a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM within the root directory of the boot drive. Versions prior to MS-DOS 6.0 will fail to start without this file. Conversely, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to provide a path for the command interpreter. This recovery prompt also appears if the primary command processor terminates unexpectedly or exits deliberately, offering limited shell replacement functionality without requiring a reboot.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS systems, complicating dual-boot configurations where COMMAND.COM resides on drive C:. To prevent bypass issues during skip/trace/step modes, DR-DOS version 7.02 and newer enforce SHELL directives strictly. Additional key combinations allow restoration of previous skip behaviors to recover from invalid SHELL parameters. If no valid shell is found when skipping CONFIG.SYS processing, users must manually enter a shell filename before COMMAND.COM loads, enhancing fault recovery capabilities.

The maximum size allowed for CONFIG.SYS varies by operating system: MS-DOS and PC DOS limit it to a few kilobytes (up to approximately 64 KB in later versions), whereas DR-DOS imposes no practical limit beyond filesystem constraints. MS-DOS processes CONFIG.SYS by compiling it into tokenized memory before executing directives in a fixed sequence—device drivers first followed by TSRs. By contrast, DR-DOS interprets directives sequentially line-by-line, enabling precise control over load order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during loading and supports conditional execution based on hardware detection or error conditions, improving customization and debugging options.

Significantly, DR-DOS’s INSTALL directive can execute non-resident programs integrated into the CONFIG.SYS processing flow, expanding system management capabilities.

Earlier MS-DOS releases restricted SHELL command line lengths to 31 characters. Later editions increased this limit up to 128 characters, while DR-DOS accepts up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows setup, the system renames the original CONFIG.SYS and AUTOEXEC.BAT files to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality. During a DOS boot, these files are temporarily restored to their original filenames. Meanwhile, Windows 95 creates backup copies named CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS version 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain unaltered. Instead, DR-DOS utilizes separate configuration files named DCONFIG.SYS and AUTODOS7.BAT to manage its startup process.

OS/2 and Windows NT

OS/2 depends extensively on CONFIG.SYS for defining system settings, loading drivers, and establishing the environment before the graphical user interface starts.

Within the OS/2 subsystem on Windows NT, the CONFIG.SYS file perceived by OS/2 applications is actually maintained within the Windows registry. OS/2 employs a variety of CONFIG.SYS commands that are not officially documented.

CONFIG.SYS continues to play a vital role 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 CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
  • Caldera’s CONFIG.SYS Command Reference (archived) – details for DR-DOS 7
  • Guide to FreeDOS CONFIG.SYS directives
  • User Manual for PTS-DOS 2000 Pro including CONFIG.SYS commands (archived)
  • Unofficial German FAQ for PTS-DOS with CONFIG.SYS details (archived)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG