How MS-DOS 6.22 Processes MENUDEFAULT Boot Delays

This article examines how MS-DOS 6.22 handles startup pauses and automated configuration selection using the MENUDEFAULT directive in CONFIG.SYS. It details the underlying mechanics of multi-configuration menus, explains how the operating system reads the directive's syntax, and explores the low-level hardware timer routines that drive the boot countdown before falling back to a default configuration block.

Purpose and Syntax of MENUDEFAULT

Introduced to provide multi-boot flexibility, the MS-DOS 6.22 multi-configuration manager relies on CONFIG.SYS blocks defined under a [menu] header. Within this block, the MENUDEFAULT directive specifies which configuration to load automatically and how long the system should wait for user intervention.

The syntax for the command is:

MENUDEFAULT=blockname[,timeout]
  • blockname: Designates the label of the configuration block (for example, [normal] or [clean]) that MS-DOS automatically executes if the user makes no selection.
  • timeout: An optional parameter specifying the delay in seconds, ranging from 0 to 90.

The Internal Processing Mechanism

When the system boots, IO.SYS initializes core hardware drivers and begins parsing CONFIG.SYS. If it detects a [menu] section, execution temporarily shifts from direct sequential driver loading to an interactive pre-boot phase.

  1. Parameter Parsing: The MS-DOS text parser evaluates the MENUDEFAULT line, storing the target blockname string in an internal buffer. It then converts the ASCII value of the timeout parameter into an integer counter. If the timeout is omitted, MS-DOS defaults to an indefinite wait, requiring manual user input. If set to 0, the prompt is bypassed entirely, immediately loading the designated block.

  2. The Timer Loop and Interrupt 1Ah: To track the passage of time without relying on fully loaded DOS clock drivers, MS-DOS queries the system BIOS directly via Interrupt 1Ah (Clock Services) or monitors the BIOS data area timer tick counter located at memory address 0040:006C. The IBM PC BIOS timer ticks approximately 18.206 times per second. MS-DOS calculates the initial tick value and initiates a decrementing loop that maps roughly 18 ticks to each elapsed second.

  3. Input Polling and Display Updates: During each iteration of the timing loop, MS-DOS updates the on-screen countdown counter to inform the user of remaining seconds. Simultaneously, it calls BIOS Interrupt 16h (Keyboard Services) function 01h to check the keyboard buffer non-destructively:

    • Keypress Detected: If the user presses an arrow key, a number, or another selection key, the polling loop breaks immediately. The countdown display is erased, the timer is aborted, and MS-DOS shifts to manual selection mode.
    • Timeout Expiration: If the tick counter reaches zero without user interaction, the routine exits the loop and automatically assigns the predefined blockname as the active configuration.
  4. Execution Handoff: Once the selection is resolved—either through timeout expiration or explicit manual entry—MS-DOS sets the internal %CONFIG% environment variable to match the chosen block name. IO.SYS then proceeds down the CONFIG.SYS file, executing only the directives defined under the active configuration block alongside common blocks, followed by the associated logic in AUTOEXEC.BAT.