Jump to content

CLOCK (CONFIG.SYS directive)

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

CONFIG.SYS serves as the essential configuration file for DOS and OS/2 operating systems. This plain text file, formatted in ASCII, holds configuration commands that the system's DOS BIOS (usually found in IBMBIO.COM or IO.SYS) interprets during the startup process. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to set up DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

CONFIG.SYS primarily contains name=value pairs that configure system parameters or load device drivers and terminate-and-stay-resident (TSR) programs. Typically, this file is located in the root directory of the boot drive in DOS environments.

Certain DOS variants prioritize alternative configuration files over CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS or CCONFIG.INI, while storing supplementary settings in a binary file called CCONFIG.BIN. These are usually managed through a utility named CONFIG.EXE. - In DR DOS versions 3.31 and later—including PalmDOS, Novell DOS, and OpenDOS—the DCONFIG.SYS file overrides CONFIG.SYS. This arrangement facilitates disk compression utilities and multi-boot configurations. - Versions OpenDOS 7.01 and DR-OpenDOS 7.02 may also process ODCONFIG.SYS or DRCONFIG.SYS. - From DR-DOS 6.0 onward, users can alter default system file extensions using SYS /DR:ext, enabling coexistence of several system file sets selectable via boot managers such as LOADER. - The SHELL command allows specifying alternate AUTOEXEC.BAT filenames; COMMAND.COM accepts extensions other than .BAT when configured this way. - The CHAIN=filespec directive permits continuation of configuration processing from another file, optionally jumping to a labeled section—functionality supported in DR-DOS 7.02 and newer. - Starting with DR-DOS 7.03, the SYS /A command can copy CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Among other systems, FreeDOS employs FDCONFIG.SYS, while RxDOS and PTS-DOS utilize RXCONFIG.SYS and CONFIG.PTS, respectively.

In the case of Windows 95 and 98 (both based on DOS), CONFIG.SYS and AUTOEXEC.BAT files exist but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry path:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the FlexOS operating system, CONFIG.SYS is implemented as a binary file that specifies resource managers and device drivers.

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>

:;*?!

Defines labels within CONFIG.SYS that serve as jump points for directives such as , , , and .
Functions similarly to , providing inline comments after other commands. (Note: In MS-DOS/PC DOS, inline comments enclosed in quotes are not ignored.)
Introduces inline commentary alongside the ; directive.
Prompts the user with a Yes/No confirmation before executing subsequent commands.[1] FreeDOS additionally supports conditional execution using boot menus with and . DOS versions 6.0 and above allow similar conditional processing by appending a after commands (for instance ).
Executes the following CONFIG.SYS directive without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional command execution on AT-compatible hardware.
Acts as a boot management utility.
Adjusts the verbosity level of error messages.
Changes the default serial port driver (from COM1 to COM4) used by the AUX device.
Prevents access to character devices outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a brief beep even if notification sounds are disabled via switches.
Defines the operating system to load on the next boot cycle.
Enables or disables extended Ctrl+C interrupt checking.
Specifies how many disk buffers should be allocated.
Functions like BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMBs).
, CACHETTL, CACHEFLUSH} (Embedded DOS 6-XL exclusive)
Controls cache block allocation timing and flushing intervals.
Comparable to INSTALL in DOS, this loads programs listed in CONFIG.SYS and runs them in the foreground, suspending further processing until completion.
(DR-DOS 7.02+)
Sets Caps Lock state on the keyboard to on or off.
, CDDBUFFERS} (PTS-DOS specific)
Defines CD-ROM driver name and number of buffers allocated.
(DR-DOS 5.0+ and Embedded DOS)
Continues processing CONFIG.SYS from another file or specified label.
, CLS, CODEPAGE} (PTS-DOS or OS/2 only)
Configures system clock type, clears the screen, and sets OEM codepages.
, COLOR} (PTS-DOS only)
Specifies CMOS RAM address and assigns colors for the boot menu interface.
, COM2, COM3, COM4} (DR-DOS 7.02+)
Sets count, sequence, I/O addresses, and timeout values for COM ports beyond COM1.
, COMMENT}, COUNTRY} (various DOS versions)
Defines DMA buffer settings, reassigns comment characters, and activates internationalization support.
, CPSW} (DR-DOS/MS-DOS variants)
Sets cursor position for menu displays and manages codepage switching capabilities.
, CPU88+, CPU86+, CPU286+, CPU386+} (PTS-DOS/DR-DOS)
Executes commands conditionally based on CPU model or clock speed.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables in memory.
Specifies memory segment address used for multi-sector disk data deblocking processes.
Activates built-in debugger support within the operating system.
Functions as a boot management tool.
Loads a device driver into conventional memory space.
Loads a device driver into upper memory area (equivalent to in DRDOS 5.0).
Sets country and codepage parameters for keyboard, screen, and printer devices.
Configures sizes for cache memory allocation.
Defines compatibility mode settings for floppy disk drives.
Specifies the font used for display output.
Controls whether DOS is loaded into high memory and/or utilizes upper memory blocks (similar to in DRDOS 5.0).
Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory areas.
Defines an alternate directory path for DOS system files.
Sets search paths for data files used by the system.
Specifies physical characteristics of disk drives connected to the system.
Establishes parameters for drives that are not natively recognized by DOS.
See .
Enables specifying drive letters when creating PDUMP.nnn error log files.
Displays a textual message on screen during processing.
Shows messages that include ANSI escape sequences for enhanced formatting.
Implements additional verification checks when launching programs.
Assigns an assumed error or return code for subsequent commands in batch processing.
Controls the state of the A20 gate when executing programs to manage memory addressing beyond 1MB boundary.
Terminates CONFIG.SYS processing prematurely except under certain conditions where SWITCHES and SHELL directives are still processed.
Defines size of hash tables used to accelerate file open operations (differs from MS-DOS/PC DOS FASTOPEN driver implementation).
Number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but specifically loads FCBs into upper memory segments explicitly.
Boot manager utility facilitating OS selection at startup.
Determines maximum number of files that can be opened concurrently by the system.
Equivalent to FILES but explicitly loads file handles into upper memory areas for optimization purposes.
Supports execution of designated subsections within CONFIG.SYS files (refer to IGNORE directive).

GTemplate:NbndI

Waits for a key press or times out, setting the error level to the ASCII value or 1024 if timed out.
Resumes CONFIG.SYS processing at the indicated label.
Continues nested CONFIG.SYS execution at the given label, then returns to the prior location.
Refer to , , or for additional details.
See also .
Refer to .
Consult or for more information.
Refer to or as applicable.
See .
Loads a TSR program into memory after relocating the DOS data segment; compare with INSTCDEX.
Refer to , , or for further guidance.
See .
Consult or for related commands.
Activates console and command line history buffer along with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures the HLT power-saving mode.
Specifies system checks for boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections; see also .
Permits designated programs to operate at CPU ring 2, enabling direct hardware I/O access.
Incorporates instructions from another menu block (can be emulated using GOSUB/RETURN in DR-DOS).
Sets the keyboard Insert mode status.
Installs a TSR program into memory.
Loads a TSR program into upper memory (similar to HIINSTALL in DR DOS 5.0).
Installs a TSR program following DOS data segment relocation; see also INSTCDEX.
Rotates PIC 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.
Sets the maximum number of accessible drive letters.
Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
Establishes DLL search paths.
Controls execution behavior of legacy applications.
Determines the quantity of file locks allowed.
Manages boot logo display when using PTS-DOS boot manager.
Configures count, order, I/O address, and timeout settings for LPT1 device.
Applies identical settings as LPT1 for LPT2 device.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before increasing process priority level.
Adjusts memory allocation strategies used by DOS.
Defines default DOS memory allocation approach.
Specifies menu options available during boot or configuration.
Sets color schemes for menus (emulated via ECHO in DR-DOS).
Defines default menu block (emulated through TIMEOUT and SWITCH in DR-DOS).
Establishes a menu block (emulated using ECHO and SWITCH in DR-DOS).
Enables multitrack disk operations support.
Continues CONFIG.SYS processing in a new file after loading a device driver, setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () response character in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] status, turning it on or off at startup.
Enables conditional execution based on previous error code, such as .
Displays text and waits for key input, similar to and commands in DR-DOS.
Requires user confirmation of errors encountered in CONFIG.SYS processing.
Configures buffer sizes for LPT ports to optimize performance.
Enables conditional execution on PC-compatible systems only.
Adjusts priority scheduler settings for task management.
Alters priority levels specifically for disk I/O operations.
Changes internal default printer driver, e.g., switching from LPT1 to LPT3 or LPT4 devices.
Specifies whether DOS programs are permitted to execute under certain conditions.
Loads the user interface shell during system startup.
Conditional execution applies only on IBM PS/1-compatible machines.
Conditional execution applies only on IBM PS/2-compatible machines.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
Allocates a drive letter exclusively, preventing assignment by local block device drivers.
Sets the default character for Resume () prompts in Yes/No/Resume dialogs.
Returns control from nested CONFIG.SYS processing to a previous GOSUB or SWITCH statement, optionally passing a return code.
Specifies the amount of real mode memory available.
Enables simultaneous loading of programs in CONFIG.SYS running in the background, functioning similarly to CALL or INSTALL commands found in other DOS variants.
Determines if the initial character of deleted files is preserved within the FAT reserved area.
Defines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Controls the Scroll Lock key status on the keyboard, enabling or disabling it.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes support for a SIZE parameter to pre-allocate COMMAND.COM in High Memory Area (HMA) or Upper Memory Blocks (UMBs), optimizing memory usage especially with third-party shells.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files are closed automatically when Ctrl+Alt+Del is pressed.
Configures whether Power-On Self-Test (POST) is bypassed during reboot.
, STACKSIZE, STACKSHIGH, STACK (various DOS versions)
Manage interrupt stack sizes and memory allocation for threads or buffers, with variations depending on DOS version.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB (PTS-DOS exclusive)
Control boot manager options, alternative boot file selections, system memory locations, and loading into upper memory areas.
, SUPPRESSPOPUPS, SWAPPATH (various OS/2 versions)
Define submenu block usage, drives for error logging, and swap file directory paths respectively.
, SWITCHES, SWITCHAR (multiple DOS versions)
Govern conditional processing within CONFIG.SYS using customizable switch characters such as '/' or '-'.
, THREADS, TIMESLICE (OS/2 only)
Enable fixes for floating-point unit bugs, specify concurrent thread counts, and set scheduler time slice durations.
, TRACE, TRACEBUF (DR-DOS, PTS-DOS, OS/2)
Configure timeouts during CONFIG.SYS processing and enable stepwise execution with adjustable log buffer sizes.
, TRAPDUMP (PTS-DOS and OS/2)
Specify temporary file extensions and detailed error logging parameters.

UTemplate:NbndZ

Assigns a specific memory segment to function as an Upper Memory Block (UMB).
Configures the UMB server settings.
Defines address ranges allocated for UMB RAM usage.
Enables or disables verification of disk writes.
Sets the DOS version number reported to applications.
Manages VGA display status parameters.
Specifies the active video mode configuration.
Activates virtual Direct Memory Access (DMA) support.
Controls processor Virtual Mode Extensions (VME) functionality.
Configures VxD drivers for Windows environments.
Adjusts Windows system support features.
Handles relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware platforms.
Configures built-in support for Year 2000 compliance.
Sets the default character used in Yes/No prompts.
Tracks file deletion operations.

Issues

Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT present, these files are crucial for comprehensive operating system customization and fulfilling software dependencies. Corruption or absence of these configuration files requires diagnostic procedures.

If CONFIG.SYS does not include a SHELL directive or if it is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions prior to 6.0 will fail if COMMAND.COM is not found. However, DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify an alternate command processor path. This prompt also appears if the shell terminates unexpectedly or aborts execution, providing an opportunity to replace the shell at runtime without restarting the system.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS environments. This incompatibility affects dual-boot configurations where COMMAND.COM resides in the C:\ root directory. DR-DOS versions 7.02 and above enforce SHELL directives during skip/trace/step modes to prevent bypassing these commands, thereby enhancing system stability and improving recovery capabilities.

CONFIG.SYS size constraints differ across systems: MS-DOS and PC DOS limit this file to a few kilobytes—up to approximately 64 KB in recent releases—whereas DR-DOS imposes no size restrictions beyond those inherent to the file system. MS-DOS processes CONFIG.SYS by compiling it into a tokenized structure before executing directives according to priority—loading device drivers prior to TSRs. Conversely, DR-DOS interprets each directive sequentially as encountered in the file. This approach grants precise control over loading order through DEVICE and INSTALL commands. Such flexibility resolves conflicts between device drivers and TSRs and enables conditional execution based on hardware detection, user input, or error conditions—features beneficial for debugging and dynamic configuration adjustments.

The INSTALL command in DR-DOS allows integration of non-resident programs into the CONFIG.SYS processing sequence, further enhancing customization options.

Earlier MS-DOS versions restricted the length of the SHELL command line to 31 characters. Subsequent releases expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over a preexisting DOS or Windows environment, it renames the CONFIG.SYS and AUTOEXEC.BAT files to CONFIG.DOS and AUTOEXEC.DOS respectively. This approach enables dual boot functionality between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily reinstated, while the original Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain untouched. Instead, DR-DOS relies on separate startup scripts named DCONFIG.SYS and AUTODOS7.BAT to manage its boot configuration.

OS/2 / Windows NT

OS/2 makes extensive use of CONFIG.SYS to manage system settings, device drivers, and environment variables prior to loading its graphical user interface.

Within the OS/2 subsystem of Windows NT, the CONFIG.SYS parameters are visible to OS/2 applications; however, these settings are actually stored within the system registry. There exists a range of undocumented CONFIG.SYS commands specific to OS/2.

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