Jump to content

LPT2 (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article LPT2 (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsOperating system configuration

CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This ASCII text file contains setup commands accessible to users, which are interpreted by the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS customize DOS settings for hardware devices, software applications, and memory allocation. 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 subsequently executes AUTOEXEC.BAT.

This configuration file primarily consists of name=value pairs that establish adjustable parameters or instruct the loading of files such as device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the boot drive’s root directory.

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

Certain DOS variants prioritize alternative filenames over CONFIG.SYS:

Early editions of Concurrent DOS from versions 3.2 through 4.1 did not support CONFIG.SYS; however, later releases including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 recognize CCONFIG.SYS (derived from "Concurrent"). Some Multiuser DOS editions employ CCONFIG.INI, while REAL/32 may utilize MCONFIG.SYS. These platforms accommodate enhanced configuration options (such as INIT_INSTALL) stored in binary files like CCONFIG.BIN, which are typically edited via CONFIG.EXE.

On systems like DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, a file named DCONFIG.SYS (originating from "DR DOS") takes precedence over CONFIG.SYS. Originally created for disk compression utilities to manage drive letter reassignment, it also facilitates multi-boot setups.

Versions such as OpenDOS 7.01 and DR-OpenDOS 7.02 search for ODCONFIG.SYS, whereas some DR-DOS 7.02+ variants look for DRCONFIG.SYS. Since DR DOS 6.0, the command SYS /DR:ext enables modification of default system file extensions, allowing multiple distinct sets of system files to coexist in a single root directory and be selected via boot loaders like LOADER from Multiuser DOS and DR-DOS 7.02/7.03.

The SHELL directive can specify alternative AUTOEXEC.BAT files using the /P[:filename.ext] option; notably, COMMAND.COM accepts extensions other than ".BAT" in this context—a capability also supported by 4DOS. Starting with DR-DOS 6.0, a CHAIN=filespec directive allows continuation of configuration processing with another file located outside the root directory; from DR-DOS 7.02 onward, this supports CHAIN=filespec,label to jump directly to specific labels within the chained file.

With DR-DOS 7.03 and later releases, the SYS /A option copies relevant CONFIG.SYS and AUTOEXEC.BAT files alongside system files during setup.

In other systems, FreeDOS uses FDCONFIG.SYS, while RxDOS version 7.24 and above employs RXCONFIG.SYS. The PTS-DOS operating system utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of Windows 95 and Windows 98 boot drives but are generally left empty. Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

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

Example

Here is a 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 in CONFIG.SYS that serve as jump points for , , , , and commands.
Functions similarly to , but is also used for comments placed inline after other directives. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
Used at the start of inline comments along with the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support optional messages but allows conditional execution with boot menus defined by and .) DOS version 6.0 and later supports a comparable feature by appending after directives (e.g., ).
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be aborted upon errors.
Sets which drives record file access dates in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the detail level of error messages.
Changes the default serial device driver (COM1 through COM4) assigned to AUX.
Deactivates character devices located outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a brief beep sound even if audible alerts are disabled.
Specifies the next operating system to start.
Enables or disables extended Ctrl+C checking functionality.
Defines the number of disk buffers to allocate.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, , (Embedded DOS 6-XL only)
Controls cache block allocation and flushing intervals.
Executes programs within CONFIG.SYS, running them in the foreground and pausing processing until they return.
(DR-DOS 7.02+)
Indicates keyboard Caps Lock status.
, (PTS-DOS only)
Configures CD-ROM hardware drivers and buffer settings.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label.
, , , etc.
Various system settings mostly applicable to specific DOS versions.

Important serial port configuration directives include:

, ;, ;, ; (DR-DOS 7.02+)
Specify count, order, I/O port address, and timeout values for COM ports.

Other directives manage device buffer sizes, internationalization support, cursor placement, CPU-specific execution conditions, and more, primarily relevant to specialized DOS variants or embedded environments.

DTemplate:NbndF

Adjusts relocation of drive descriptor tables.
Sets memory segment address for multi-sector disk data deblocking routines.
Activates internal debugger features.
Boot management utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Configures country and codepage settings for keyboard, screen, and printer devices.
Sets cache memory sizes for improved performance.
Defines floppy disk compatibility mode settings.
Specifies font used for display output.
Controls loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory blocks.
Defines an alternate search path for DOS files.
Specifies search paths for data files used by DOS utilities.
Defines physical parameters for disk drives.
Sets parameters for drives not recognized by default configurations.
See .
Enables error logging with PDUMP.nnn files on specified drives.
Displays a message on screen during processing.
Shows a message that includes ANSI escape sequences for formatting.
Adds extra checks when launching programs to ensure stability or compatibility.
Specifies expected error or return codes from executed programs.
Sets the A20 gate state prior to program execution to manage memory access above 1MB.
Ends CONFIG.SYS processing before reaching file end (except for SWITCHES and SHELL under certain conditions).
Defines hash table size used for faster file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation.
Sets maximum number of cached File Control Blocks open at once (shares buffer space with FILES in DR-DOS).
Similar to FCBS but loads these structures into upper memory areas.
Boot management utility.
Determines maximum number of files that can be opened simultaneously by the system.
Similar to FILES but loads file handles into upper memory blocks.
Includes execution of specified CONFIG.SYS subsections (see IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII value 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 and returns to the previous location afterward.
Refer to , , or for details.
See also .
Consult .
Refer to or for more information.
See or as applicable.
Consult .
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
See , , or for related commands.
Refer to .
See or for further details.
Activates console and command line history buffers with enhanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving mode using HLT instruction.
Specifies system checks for boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of certain CONFIG.SYS subsections.
Permits specific programs to operate at ring 2, allowing direct hardware I/O access.
Includes directives from another menu section, emulated by GOSUB/RETURN in DR-DOS environments.
Sets the status of keyboard Insert mode.
Installs a TSR program into conventional memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment (see also INSTCDEX).
Adjusts PIC interrupt priorities to prioritize a particular IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer address.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but also loads the Current Directory Structure into upper memory.
Establishes paths for DLL searches.
Manages backward compatibility for legacy software applications.
Determines the number of file locks allowed.
Configures boot logo display when using the PTS-DOS boot manager.
Sets parameters such as count, order, I/O address, and timeout for LPT1 device operation.
Applies similar configuration settings to LPT2 device.
Configures LPT3 device with analogous parameters.
Enables and sets up LPT4 device functionality.
Specifies wait duration before increasing process priority level.
Configures memory allocation methods and strategies.
Defines default DOS memory allocation strategy preferences.
Specifies available menu options within CONFIG.SYS menus.
Sets color schemes for menus, emulatable under DR-DOS systems.
Establishes the default menu block, also emulatable in DR-DOS environments.
Defines individual menu blocks, compatible with DR-DOS emulation methods.
Enables multitrack disk operations support.
Continues CONFIG.SYS processing from an external file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default character representing No () in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] state, enabling it on or off by default.
Allows conditional execution based on the last error code, such as .
Displays text and waits for a key press, functioning similarly to and commands in DR-DOS systems.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer sizes for printers connected to LPT1 through LPT3 ports.
Enables conditional execution on PC-compatible hardware platforms.
Adjusts scheduler priority settings for processes.
Sets priority levels specifically for disk I/O-related programs.
Changes the default printer device driver among LPT1, LPT2, LPT3, or LPT4 ports.
Determines whether DOS programs are permitted to run under current conditions.
Loads a user interface shell environment during startup.
Enables conditional execution on IBM PS/1-compatible systems only.
Enables conditional execution on IBM PS/2-compatible systems only.
Suppresses standard output (STDOUT) display during command execution.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates a drive letter for local block device drivers.
Establishes the default Resume () character for Yes/No/Resume prompts.
Returns nested CONFIG.SYS execution to the preceding GOSUB or SWITCH command, optionally passing a return code.
Specifies the size of real mode memory.
Enables concurrent loading of programs in the background within CONFIG.SYS, functioning similarly to DOS INSTALL or OS/2 CALL commands.
Saves the initial character of deleted files in the FAT reserved area.
Determines video mode under FreeDOS or defines screen access methods under PTS-DOS.
Sets the keyboard Scroll Lock status to either on or off.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but accepts a size parameter to relocate COMMAND.COM into HMA or UMBs, optimizing memory usage with third-party shells.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close upon pressing Ctrl+Alt+Del.
Specifies whether the POST sequence is skipped during reboot.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and memory allocation across various DOS versions and derivatives to optimize system performance.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS-specific commands managing boot procedures, system file locations, and alternative operating system booting methods.
, SWAPPATH, THREADS
OS/2 directives that regulate error logging paths, swap file locations, and concurrent thread counts to improve multitasking and system reliability.
, SWITCHES
Enable conditional processing within CONFIG.SYS based on user input or special options in DOS variants excluding PTS-DOS and FreeDOS.
, TIMEOUT
Set global defaults such as switch characters ('/' or '-') and timeout durations for prompts and batch file execution under various DOS versions including DR-DOS and PTS-DOS.
, TRACEBUF
Manage single-step execution of CONFIG.SYS/AUTOEXEC.BAT scripts and configure trace log buffer sizes across DOS variants and OS/2 for debugging purposes.

UTemplate:NbndZ

Directs DOS to utilize a specific segment as Upper Memory Block (UMB).
Identifies which UMB server is in use.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Sets the reported DOS version to applications.
Manages VGA display status settings.
Specifies the active video mode, akin to FreeDOS’s SCREEN command.
Allows use of virtual DMA channels.
Controls processor Virtual Mode Extensions (VME).
Configures Virtual Device Drivers (VxD) for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally only on XT-compatible hardware.
Enables built-in Year 2000 compliance support.
Sets the default affirmative character in user prompts.
Configures tracking for file deletions.

Issues

While the system can initialize without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for full operating system customization and meeting software demands. Corruption or damage necessitates troubleshooting efforts.

If a SHELL directive is absent from CONFIG.SYS—or if the file is missing or corrupted—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail if COMMAND.COM is not found. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7+ will prompt users for a command interpreter path, offering limited shell functionality without requiring a reboot.

Due to incompatibilities between MS-DOS version 7+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later prohibit bypassing SHELL directives during skip, trace, or step modes. This restriction ensures valid shell loading to prevent startup failures.

CONFIG.SYS file size is restricted to a few kilobytes in MS-DOS/PC DOS (up to 64 KB in recent releases), whereas DR-DOS imposes no such limit because it processes directives sequentially rather than tokenizing them. This approach grants DR-DOS users enhanced control over driver and TSR loading order through DEVICE and INSTALL, facilitating conflict resolution and seamless integration of debugging utilities.

The line-by-line parsing method employed by DR-DOS also supports conditional branching based on hardware detection, key presses, error conditions, or return codes. This capability increases customization flexibility and allows temporary incorporation of external programs within CONFIG.SYS.

In MS-DOS/PC DOS versions 2.0 through 4.01, the SHELL directive was limited to a maximum length of 31 characters. Subsequent releases expanded this limit to 128 characters, while DR-DOS permits up to 255 characters. Notably, CONFIG.SYS directives do not support long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, it renames the CONFIG.SYS and AUTOEXEC.BAT files to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual-boot setup between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily restored to their original filenames. Additionally, Windows 95 system files are saved under the names CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain unaltered. Instead, DR-DOS employs separate startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

The OS/2 operating system depends extensively on CONFIG.SYS for configuring the system prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, these CONFIG.SYS configurations are maintained within the system registry rather than traditional configuration files.

A significant number of CONFIG.SYS commands in OS/2 lack thorough documentation or are only partially documented. Despite this, the CONFIG.SYS file continues to play a vital role in OS/2-based 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) – summary of DR-DOS 7 directives
  • Guide to FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
  • Unofficial German PTS-DOS FAQ including CONFIG.SYS details (archived)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG