Jump to content

VGASCREEN (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article VGASCREEN (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source

CONFIG.SYS serves as the essential configuration file for DOS and OS/2 operating systems. This plain text file contains setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS during the startup sequence. CONFIG.SYS was first introduced in DOS version 2.0.

Usage

The directives within CONFIG.SYS configure DOS to manage devices, applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL entry; if none is provided, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.

CONFIG.SYS primarily consists of name=value pairs that set adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, this file is located in the boot drive's root directory.

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

Certain DOS derivatives prioritize alternative configuration filenames over CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI (the latter specific to Multiuser DOS) instead of CONFIG.SYS. These platforms maintain extra settings in a binary file called CCONFIG.BIN, typically managed through CONFIG.EXE.

- From DR DOS 3.31 onward, including distributions like PalmDOS, Novell DOS, and OpenDOS, DCONFIG.SYS supersedes CONFIG.SYS. This arrangement supports multi-boot configurations and compatibility with disk compression utilities that alter drive letter assignments after booting.

- OpenDOS 7.01 and DR-DOS versions 7.02 and later also recognize ODCONFIG.SYS or DRCONFIG.SYS as configuration files.

- Starting with DR-DOS 6.0, users can modify default system file extensions using SYS /DR:ext, allowing multiple sets of system files to coexist and be selected by boot managers like LOADER.

- The SHELL command in DR-DOS offers enhanced flexibility by permitting alternative AUTOEXEC files and support for non-.BAT extensions, capabilities also available in 4DOS.

- DR-DOS includes a CHAIN=filespec directive, enabling continuation of configuration processing from another file anywhere on the boot volume, with optional label arguments to jump to specific sections.

- From DR-DOS 7.03 onwards, the SYS /A command copies CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.

Comparable features exist in other DOS variants:

- FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS appears in RxDOS starting with version 7.24, - CONFIG.PTS serves as the configuration file in PTS-DOS.

In Windows 95 and 98, both CONFIG.SYS and AUTOEXEC.BAT remain on boot drives but are generally left empty due to Windows’ improved startup procedures. Windows Me does not process CONFIG.SYS at all; instead, it retrieves environment variables directly from the Windows Registry (HKLM\System\CurrentControlSet\Control\SessionManager\Environment).

In contrast, under FlexOS, CONFIG.SYS is a binary format file that specifies resource managers and device drivers loaded during system initialization.

Example

Below is a sample CONFIG.SYS tailored 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 for use as jump destinations with , , , and commands.
Functions similarly to , but additionally supports in-line comments after other CONFIG.SYS instructions. Refer to for details. (Note: MS-DOS/PC DOS does not ignore double-quoted inline comments.)
Introduces in-line comments alongside the ; directive.
Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS commands.[1] (FreeDOS extends this with conditional options via boot menus using and .) DOS version 6.0 and later allow similar functionality by appending to directives, e.g., .
Executes the following CONFIG.SYS command without conditions.

ATemplate:NbndC

Determines whether programs can be aborted when errors occur.
Manages file access date stamping on drives formatted with FAT file systems.
Enables conditional execution on AT-compatible hardware.
Acts as a boot manager.
Adjusts verbosity of error messages.
Alters the default serial driver assigned to the AUX: device.
Prevents character devices from being accessible outside the virtual \DEV directory.
Loads fundamental device drivers into memory.
Triggers a brief beep sound even if audible alerts are disabled.
Designates the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Sets the quantity of disk buffers allocated.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Control cache allocation and flushing behavior.
Loads and executes programs within CONFIG.SYS, running them in the foreground and pausing further processing until completion.
(DR-DOS 7.02+)
Sets keyboard Caps Lock state.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver name and buffer count parameters.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label.
, CLS, CODEPAGE (various systems)
Manage system clock type, clear screen display, and define OEM codepages.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Configure serial port counts, I/O addresses, and timeout settings.
, COMMENT(S) (various systems)
Define DMA buffer sizes and customize inline-comment characters or ignore certain lines.
, CPOS, CPSW (various systems)
Enable internationalization support, set cursor position, and manage codepage switching capabilities.
CPU-specific directives (PTS-DOS only)
Execute conditionally based on CPU model or speed (e.g., CPU88, CPU386+).

DTemplate:NbndF

Adjusts relocation of drive descriptor tables in memory.
Defines segment address for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Functions as a boot manager.
Loads device drivers into conventional memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Configures country and codepage settings for keyboard, screen, and printer devices.
Sets cache memory sizes for improved performance.
Specifies compatibility mode for floppy disk drives.
Selects display font settings.
Controls loading of DOS into high or upper memory regions (similar to in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory blocks.
Specifies alternative directories for DOS system files.
Defines search paths for data files used by DOS commands.
Configures physical parameters of disk drives.
Sets parameters for drives that are not natively recognized by the system.
See .
Enables PDUMP.nnn error logging and assigns target drive for logs.
Outputs a message on the screen during processing.
Displays messages incorporating ANSI escape sequences for enhanced formatting.
Activates extra validation checks when launching programs.
Defines assumed error or return codes for subsequent commands in CONFIG.SYS.
Controls A20 gate status when starting programs to manage memory access above 1 MB.
Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL commands.
Sets hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
Specifies number of cached File Control Blocks (FCBs) available simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads FCBs into upper memory regions.
Functions as a boot manager utility.
Defines maximum number of files that can be open at once.
Same as FILES but loads file handles into upper memory blocks.
Includes execution of specified subsections within CONFIG.SYS (see IGNORE).

GTemplate:NbndI

Waits for a keystroke or timeout, setting the error level to the key's ASCII value or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
Refer to , , or for additional details.
Consult for further information.
See for more context.
Refer to or as needed.
See or for related commands.
Consult for more information.
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for related usage.
Refer to for further clarification.
See or for additional options.
Activates console and command line history buffers with enhanced pattern searching capabilities.
Defines the address of the HMA segment.
Configures energy-saving mode using the HLT instruction.
Specifies whether the system checks for boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of certain CONFIG.SYS subsections.
Permits programs to operate at ring 2, granting direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Installs a TSR program into upper memory, analogous to HIINSTALL in DR-DOS 5.0.
Loads a TSR program after relocating DOS data segments. Compare with INSTCDEX.
Adjusts PIC controller interrupt priorities to assign highest priority to 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.
Similar to LASTDRIVE but additionally loads the Current Directory Structure (CDS) into upper memory.
Sets search paths for DLL files.
Manages compatibility with legacy software applications.
Specifies the quantity of file locks allowed.
Configures display settings for boot logos and startup messages using PTS-DOS boot manager.
Defines parameters such as count, order, I/O address, and timeout for the LPT1 device port.
Applies the same configuration as LPT1 but for LPT2 device port.
Mirrors LPT1 settings for LPT3 device port.
Enables and configures LPT4 device in a similar manner.
Sets delay before elevating process priority level.
Configures strategies for memory allocation management.
Establishes default DOS memory allocation behavior.
Specifies options available in menus.
Sets color schemes for menus, which can be emulated via ECHO commands in DR-DOS systems.
Defines default menu block, emulatable using TIMEOUT and SWITCH commands in DR-DOS environments.
Creates a menu block, also emulatable through ECHO and SWITCH in DR-DOS systems.
Enables support for multitrack disk operations.
Continues processing CONFIG.SYS from another file, optionally loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default response character for No () in Yes/No/Resume prompts.
Enables or disables keyboard [[Num Lock|Template:Keypress]] status on startup.
Executes conditionally based on the last error code, e.g., .
Displays text and waits for user key press, similar to and commands under DR-DOS systems.
Requires user confirmation when errors occur in CONFIG.SYS processing.
Configures buffer sizes used by LPT ports.
Executes conditionally on PC-compatible hardware platforms.
Sets parameters for priority scheduling of processes.
Assigns priority levels specifically to disk I/O operations programs.
Changes default printer device driver assignment (for example, switching from LPT1 to LPT3).
Controls whether DOS applications are permitted to run on the system.
Loads a user interface shell environment during startup.
Conditional execution applied on IBM PS/1-compatible machines only.
Conditional execution applied on IBM PS/2-compatible machines only.
Suppresses output sent to STDOUT.

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.
Establishes the default Resume () response character in Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH location, optionally passing a return code.
Defines the size of real mode memory available.
Enables concurrent loading of programs in CONFIG.SYS in the background, functioning similarly to CALL or INSTALL commands in DOS.
Saves the initial character of deleted files within the FAT reserved area.
Determines video mode under FreeDOS or sets screen access methods under PTS-DOS.
Controls the status of the Scroll Lock key, turning it on or off.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, minimizing fragmentation.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files close upon pressing Ctrl+Alt+Del.
Indicates if POST is bypassed during reboot.
Sets the number of stacks allocated for hardware interrupts.
Defines the default stack size for newly created threads.
Functions like STACKS but loads buffers into upper memory areas.
Configures boot manager settings.
Reserved for internal operations.
Manages behavior of the XMS A20 gate.
Specifies submenu blocks (emulated under DR-DOS).
{{nobold|(OS/2 3.0+)} }
Directs error logs to a drive rather than displaying popup messages.
{{nobold|(OS/2)} }
Sets the path for swap file storage.
{{nobold|(DR DOS 6.0+)} }
Allows conditional continuation of nested CONFIG.SYS processing at designated labels with RETURN functionality.
{{nobold|(DOS variants including DR-DOS, PTS-DOS, FreeDOS)} }
Defines the system's default switch character ('/' or '-').
{{nobold|(DOS 4.0, Novell DOS 7+, ignored on PTS-DOS)} }
Specifies special configuration options.
{{nobold|(OS/2 Warp 4 FixPak 1+)} }
Activates a fix addressing FPU rounding errors.
{{nobold|(PTS-DOS only)} }
Designates an alternative DOS boot filename.
{{nobold|(PTS-DOS only)} }
Configures memory layout locations for DOS.
{{nobold|(PTS-DOS only)} }
Loads system components from an alternate disk area.
{{nobold|(Embedded DOS 6-XL)} }
Defines the size of dynamic system memory pool allocation.
{{nobold|(PTS-DOS only)} }
Enables loading of DOS data and code into UMBs if activated.
{{nobold|(OS/2)} }
Specifies maximum number of threads allowed concurrently.
{{nobold|(DR DOS 6+, PTS-DOS)} }
Sets timeouts for CONFIG.SYS commands and determines default responses for queries and selections.
{{nobold|(OS/2)} }
Configures minimum and maximum values for scheduler time slices.
{{nobold|(PTS-DOS)} }
Specifies file extension used for temporary files.
{{nobold|(DR-DOS 7.02+, PTS-DOS, OS/2)} }
Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally, with varying behaviors across operating systems.
{{nobold|(OS/2)} }
Sets the size of the TRACE log buffer.
{{nobold|(OS/2 3.0+)} }
Provides detailed error logging for diagnostic purposes.

UTemplate:NbndZ

Assigns a specific segment to be used as an Upper Memory Block (UMB) by DOS.
Configures parameters for the UMB server functionality.
Defines address ranges designated as UMB RAM areas.
Enables or disables verification of disk writes.
Sets the DOS version reported to applications.
Manages VGA display status settings.
Specifies current video mode similarly to FreeDOS's SCREEN command.
Enables use of virtual DMA capabilities.
Toggles processor Virtual Mode Extensions (VME) on or off.
Configures VxD driver settings for Windows environments.
Adjusts Windows system support parameters.
Controls relocation of Extended BIOS Data Area (EBDA).
Allows conditional execution based on XT-compatible hardware detection.
Manages built-in support for Year 2000 compliance features.
Sets default affirmative response character in prompt dialogs.
Configures tracking behavior for file deletions.

Issues

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive customization and meeting software demands during boot. Troubleshooting becomes necessary if these files are missing or corrupted.

In cases where CONFIG.SYS does not include a SHELL directive or if the file is absent or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Older DOS versions will not boot without COMMAND.COM present, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions prompt users to enter a path for the command interpreter. This recovery prompt also occurs if the main command processor terminates unexpectedly or exits intentionally, allowing replacement of the shell at runtime without requiring a reboot.

Due to incompatibility issues between MS-DOS 7.0+ COMMAND.COM and DR-DOS, versions 7.02 and above of DR-DOS limit skipping SHELL directives during skip, trace, or step modes. Additional recovery features permit reactivation of skip functionality to resolve invalid shell argument errors. When no valid SHELL directive is discovered during CONFIG.SYS skipping, the system requests a shell filename before proceeding to load COMMAND.COM.

CONFIG.SYS size restrictions differ depending on the operating system: MS-DOS and PC DOS limit file size to several kilobytes (up to 64 KB in newer editions), whereas DR-DOS imposes no significant size constraints because it processes CONFIG.SYS line by line instead of tokenizing it. This design gives DR-DOS enhanced control over the sequence of loading drivers and TSRs via DEVICE and INSTALL commands, facilitating resolution of conflicts and conditional execution based on hardware detection or error conditions. The INSTALL command can also execute non-resident programs integrated within the CONFIG.SYS processing flow.

The maximum length for shell command lines has increased over time—from 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 to as many as 128 characters in later releases—with DR-DOS supporting up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS to enable dual-boot functionality between Windows 9x and DOS environments. During a DOS boot, these files are temporarily restored under their standard names. Additionally, Windows 95 versions of these files are backed up as 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 remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its respective startup configuration files.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for loading drivers and setting environment parameters prior to launching its graphical user interface.

Within the OS/2 subsystem integrated into Windows NT, the CONFIG.SYS environment perceived by OS/2 applications is actually maintained within the system registry.

A number of CONFIG.SYS commands used by OS/2 are either undocumented or only sparsely documented.

CONFIG.SYS continues to be employed by OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS available 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)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG