Jump to content

PRINTMONBUFSIZE (CONFIG.SYS directive)

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

CONFIG.SYS serves as the principal configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions accessible to users that are interpreted by the operating system's DOS BIOS during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

Within CONFIG.SYS, directives are used to set up DOS for hardware devices, software applications, and memory handling. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified in the SHELL directive, or defaults to COMMAND.COM if none is designated; this shell then executes AUTOEXEC.BAT.

The file primarily comprises name=value pairs that configure adjustable settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the bootable drive.

Certain DOS variants check for alternative configuration filenames that take precedence over CONFIG.SYS:

Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS), along with MCONFIG.SYS for REAL/32. These support additional configuration options stored in binary form within CCONFIG.BIN, commonly edited via CONFIG.EXE.

Starting with DR DOS 3.31 and continuing through versions such as PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS supersedes CONFIG.SYS. This facilitates disk compression setups and multi-boot environments. OpenDOS 7.01 and DR-OpenDOS 7.02 also acknowledge ODCONFIG.SYS, while some DR-DOS releases detect DRCONFIG.SYS. The command SYS /DR:ext permits customization of default file extensions to allow multiple concurrent system file sets managed by boot loaders like LOADER.

Enhancements in DR-DOS include extending the SHELL directive to specify alternative AUTOEXEC.BAT files and accept non-.BAT extensions—capabilities also available in 4DOS. The CHAIN=filespec directive enables continuation of processing configuration files beyond the root directory; from DR-DOS 7.02 onward, this includes support for label-specific jumps.

With DR-DOS 7.03 and subsequent versions, a SYS /A option is introduced to copy both CONFIG.SYS and AUTOEXEC.BAT alongside system files.

Other systems use variant names: FreeDOS employs FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; PTS-DOS uses CONFIG.PTS.

In Windows 95 and Windows 98, which are based on DOS, CONFIG.SYS and AUTOEXEC.BAT remain present but are typically left empty. Conversely, Windows Me does not process CONFIG.SYS at all, instead loading environment variables directly from the Windows Registry.

In the case of FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during boot-up.

Example

Sample CONFIG.SYS 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 destinations for , , , and commands.
Functions similarly to , but additionally supports inline comments following other directives in CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
Used to introduce inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but allows conditional execution with boot menus.) Starting from DOS 6.0, a comparable feature exists by appending after directives.
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs should terminate upon encountering errors.
Configures which drives maintain file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible computers.
Manages the boot process.
Adjusts the level of detail for error messages.
Alters the default internal serial device driver assigned to the AUX device.
Restricts access to character devices outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a brief beep even if sound notifications are disabled.
Specifies the operating system designated for the next boot sequence.
Enables or disables extended Ctrl+C detection.
Sets the quantity of disk buffers to allocate.
Loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB), similar to HIBUFFERS in DR DOS 6 and later versions.
Defines the maximum number of cache blocks allocated from the system memory pool.
Sets the maximum duration before unused cache blocks are returned to the system pool.
Determines the maximum interval before dirty cache blocks are written back to disk.
Executes programs listed in CONFIG.SYS, running them in the foreground and pausing further processing until completion.
Sets the status of the keyboard Caps Lock key.
Specifies the name of the CD-ROM hardware driver.
Defines the number of buffers allocated for CD-ROM access.
Allows continuation of CONFIG.SYS processing in a new file and label, starting from DR-DOS version 7.02.
Specifies the type of system clock used.
Clears the display screen.
Defines OEM codepage(s).
Indicates CMOS RAM address location.
Sets colors used in the boot menu interface.
, ;, ;, ;

Defines parameters such as count, logical order, I/O address, and timeout for COM ports (available from DR-DOS 7.02 onwards).

, ;, ;, ;, ;, ;, ;, and others
Various directives related to device setup, internationalization support, cursor positioning on display, codepage switching, and CPU-specific conditional execution for PTS-DOS and DR-DOS variants.

DTemplate:NbndF

Controls relocation settings for drive descriptor tables.
Specifies memory segment address for handling multi-sector disk data deblocking.
Activates internal debugger functionality.
Manages boot process operations.
Loads specified device drivers into memory.
Loads device drivers into upper memory area, functioning similarly to in DRDOS 5.0.
Configures country codes and codepage information for keyboard (KBD), screen (SCR), and printer (LPT) devices.
Adjusts cache memory allocation sizes.
Defines floppy disk compatibility mode settings.
Selects display font type.
Controls loading of DOS into high memory and/or utilization of upper memory blocks.
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Specifies an alternative directory path for DOS files.
Defines search paths for data files.
Sets physical characteristics for disk drives.
Establishes parameters for drives that are not recognized by default.
Refer to .
Enables error log generation with PDUMP.nnn files and specifies target drive for logs.
Displays a message on screen output.
Outputs messages including ANSI escape sequences for formatting purposes.
Adds additional validation checks when launching programs.
Defines an assumed error or return code following execution.
Controls A20 gate status when initiating a program run.
Terminates CONFIG.SYS processing prematurely (exceptions apply to SWITCHES and SHELL under specific conditions).
Sets hash table size to optimize fast file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads these structures into upper memory areas.
Boot management utility.
Defines maximum number of concurrently open files allowed by the system.
Equivalent to FILES but explicitly loads file handles into upper memory space.
Supports execution of designated CONFIG.SYS subsections (see IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, assigning the error level to the ASCII value of the key or 1024 if timed out.
Resumes CONFIG.SYS execution at the indicated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for additional details.
See also .
Consult .
Refer to or for related information.
See or for further context.
Consult .
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
Refer to , , or for more information.
See .
Consult or for related commands.
Activates console and command line history buffer with advanced pattern searching capabilities.
Defines the memory address of the High Memory Area (HMA) segment.
Configures CPU halt (HLT) energy-saving mode.
Sets system checks 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, granting direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Controls keyboard Insert mode status.
Installs a TSR program into memory.
Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating DOS data segment—see INSTCDEX for comparison.
Adjusts PIC interrupt priorities to assign highest priority to a specific IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address of the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
Lists directories for DLL search paths.
Manages compatibility with legacy programs.
Specifies the number of file locks permitted.
Configures display of boot logo when using PTS-DOS boot manager.
Defines count, sequence, I/O address, and timeout parameters for LPT1 device.
Same parameters applied to LPT2 device as for LPT1.
Same configuration as LPT1 applied to LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before a waiting process receives elevated priority.
Configures strategy for memory allocation management.
Specifies default DOS memory allocation method.
Defines menu selections available in CONFIG.SYS menus.
Sets menu color schemes (can be emulated under DR-DOS).
Establishes default menu block (emulatable under DR-DOS).
Defines various menu blocks (supported by DR-DOS emulation).
Activates multitrack disk operation support.
Continues processing CONFIG.SYS from a new file after driver loading and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default "No" character used in Yes/No/Resume prompts.
Controls keyboard Num Lock state on startup (enabled or disabled).
Enables conditional command execution based on the last error code, e.g., .
Displays a message and waits for key press, similar to and commands in DR-DOS.
Requires user confirmation when errors occur in CONFIG.SYS processing.
Configures buffer size parameters for LPT ports.
Enables conditional execution on PC-compatible systems only.
Adjusts scheduler priority settings.
Sets priority levels for disk input/output operations.
Changes default printer device driver assignment (e.g., from LPT1 to LPT3 or LPT4).
Determines whether DOS applications are allowed to run.
Loads a user interface shell program.
Enables conditional execution on IBM PS/1-compatible machines only.
Enables conditional execution on IBM PS/2-compatible machines only.
Suppresses output directed to STDOUT.

RTemplate:NbndT

Enables system to reboot automatically upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter for local block device drivers.
Establishes the default Resume () character displayed in prompts.
Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH instruction, optionally with a return code.
Specifies the size of real mode memory available.
Allows programs listed in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands.
Saves the initial character of deleted files within the FAT reserved space.
Determines video mode settings in FreeDOS or screen access methods in PTS-DOS.
Sets the Scroll Lock key status on the keyboard, either enabled or disabled.
Assigns environment variables for system use.
Loads the command interpreter shell into memory.
Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency when using third-party shells.
Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close automatically when Ctrl+Alt+Del is pressed.
Bypasses POST routines during system reboot sequences.

Serves as a compatibility placeholder due to reentrant characteristics of earlier DR DOS versions with differing stack configurations.

(DOS 3.2, Novell DOS 7+)
Defines the number of stacks for hardware interrupt handling (ignored by DR DOS 6.0 and PTS-DOS).
(Embedded DOS 6-XL)
Sets default stack size for newly created threads.
(MS-DOS 7.0, DR-DOS 7.02+, FreeDOS)
Similar to STACKS but loads buffers into upper memory areas.
(PTS-DOS)
Used for boot manager setup.
, reserved for internal operations (MS-DOS 3.0, disregarded by DR-DOS 7.02+).
, manages XMS A20 gate operation (PTS-DOS).
, defines submenu blocks (DOS 6.0+, excluding DR DOS and FreeDOS).
, directs error logs to disk instead of displaying text popups (OS/2).
, specifies path for swap files (OS/2).
, conditionally continues nested CONFIG.SYS processing based on key input, with RETURN returning control to previous location (DR DOS 6.0+).
, sets default switch character ('/' or '-') used by the operating system (DOS 2.x, DR-DOS 7.02+, PTS-DOS, FreeDOS).
, specifies special options parameters (DOS 4.0, Novell DOS 7+, ignored by PTS-DOS).
, activates FPU rounding bug correction (OS/2 Warp 4 FixPak 1+).
, alternative filename for booting DOS OS (PTS-DOS).
, configures memory locations for DOS components (PTS-DOS).
, loads system from an alternate disk partition or area (PTS-DOS).
, defines size of dynamic allocation memory pool (Embedded DOS 6-XL).
, loads DOS data and code into upper memory blocks (PTS-DOS).
, specifies number of concurrent threads supported (OS/2).
, sets timeouts for single-stepping through CONFIG.SYS and defaults for Yes/No prompts (DR DOS 6.0+, PTS-DOS).
, adjusts scheduler time slice minimum and maximum values (OS/2).
, indicates file extension used for temporary files (PTS-DOS).
, globally or locally enables/disables single-stepping through CONFIG.SYS and AUTOEXEC.BAT scripts with behavior varying across OS versions (DR-DOS 7.02+, PTS-DOS, OS/2).
, determines size of TRACE log buffer (OS/2).
, logs comprehensive error details upon trap events (OS/2 3.0+).

UTemplate:NbndZ

Configures a specific memory segment to act as an Upper Memory Block (UMB) within DOS.
Defines the server responsible for managing UMBs.
Specifies address ranges designated as UMB RAM areas.
Enables or disables verification of disk writes.
Sets the version number of DOS reported to applications.
Manages VGA display status configurations.
Indicates current video mode, similar in function to FreeDOS's SCREEN setting.
Activates support for virtual DMA operations.
Controls processor Virtual Mode Extensions (VME) features.
Configures VxD drivers utilized by Windows environments.
Adjusts Windows system support parameters.
Handles relocation procedures for the Extended BIOS Data Area (XBDA).
Enables conditional execution tailored for XT-compatible hardware platforms.
Sets up built-in Year 2000 compliance support mechanisms.
Defines default affirmative character used in prompt dialogues.
Manages tracking of file deletions within the system.

Issues

Although the system can start without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive operating system customization and meeting software demands. If either file becomes damaged or corrupted, troubleshooting is required.

In cases where CONFIG.SYS is missing a SHELL directive or is absent or compromised, 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, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify a command processor path. This prompt also appears if the command processor terminates or exits intentionally, allowing users to replace the runtime shell temporarily without rebooting.

Because MS-DOS 7.0 and later versions of COMMAND.COM are incompatible with DR-DOS, DR-DOS 7.02 and above enforce the presence of SHELL directives during skip, trace, and step modes to prevent bypassing them in dual-boot environments. Special key sequences can restore prior skip behaviors to recover from invalid SHELL parameters. If no SHELL directive is detected when skipping CONFIG.SYS processing, users will be asked to input a valid shell filename before COMMAND.COM loads.

The maximum size allowed for CONFIG.SYS varies depending on the operating system: MS-DOS and PC DOS limit it to a few kilobytes (with recent versions supporting up to 64 KB), while DR-DOS imposes no practical size restrictions beyond those dictated by the filesystem. MS-DOS processes CONFIG.SYS by compiling it into a tokenized format executed in a fixed sequence—device drivers are loaded before TSRs—whereas DR-DOS interprets each directive sequentially, providing fine control over load order through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during loading and supports conditional execution based on hardware or software conditions, thereby improving system customization and troubleshooting capabilities.

In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL command lines were limited to 31 characters; subsequent releases expanded this limit to 128 characters. DR-DOS permits up to 255 characters for SHELL lines. Notably, CONFIG.SYS directives do not support long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality between Windows 9x and DOS. During a DOS boot session, these files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. Additionally, backups of Windows 95’s versions are maintained under the names CONFIG.W40 and AUTOEXEC.W40.

In configurations where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup routines.

OS/2 / Windows NT

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

Within the OS/2 subsystem of Windows NT, what OS/2 applications interpret as CONFIG.SYS is actually stored within the Windows registry rather than as a traditional file.

There exist numerous undocumented CONFIG.SYS commands specific to OS/2 configuration.

CONFIG.SYS continues to be employed by OS/2 derivatives such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS – Computer Hope (2017)
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS parameters – Microsoft Support (archived)
  • CONFIG.SYS Command Guide – Caldera (1998) (partial DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS directive descriptions – FreeDOS Help
  • PTS-DOS 2000 Pro User Guide with CONFIG.SYS directives (partial) – Paragon Software
  • Unofficial German PTS-DOS FAQ (2004) featuring additional CONFIG.SYS parameters