How MS-DOS 6.22 HELP Formats Manual Pages

The MS-DOS 6.22 HELP system delivers interactive, indexed documentation through a text-mode hypertext environment powered by HELP.COM, QBASIC.EXE, and the HELP.HLP database. Instead of presenting flat plain text, the system uses Microsoft's QuickHelp database structure to compile individual command references into indexed topics, rendering them in a character-based window with interactive navigation points, cross-references, and categorical jump tags.

The Underlying Engine

The HELP.COM executable does not parse documentation directly. When executed, it acts as a launcher that calls QBASIC.EXE with the undocumented /QHELP parameter, pointing it to HELP.HLP. This instructs QBasic to run in a read-only viewer mode using the same MS-DOS Editor interface introduced in MS-DOS 5.0, complete with a menu bar, scroll bars, and mouse support via INT 33h.

The HELP.HLP File Structure

The manual content resides inside HELP.HLP, encoded in Microsoft's proprietary QuickHelp binary database format. This format consists of:

  • File Header: Contains magic bytes identifying the QuickHelp version, database flags, topic counts, and offsets to the master index tables.
  • Topic Index: A lookup table mapping command names, keywords, and context strings to byte offsets within the compressed data blocks.
  • Compressed Text Blocks: Documentation content compressed using a custom Huffman-based or run-length encoding scheme to conserve floppy disk and hard drive space.
  • Context Tables: Cross-reference tables that resolve internal jumps when a user activates a link.

Screen Layout and Section Organization

When a user selects a command, the viewer extracts and renders the topic onto an 80-column by 25-row text grid. Each command's entry is standardized into specific structural areas:

  1. Title Bar and Header: Displays the command name followed by a concise, one-line summary of its purpose.
  2. Sub-topic Jump Anchors: Positioned directly beneath the header, providing instant access to specific sections. These anchors are enclosed in graphical pointer characters:
    • ◄Syntax►
    • ◄Parameters►
    • ◄Notes►
    • ◄Examples►
  3. Body Text: Uses standard ASCII line wraps at approximately 72–76 characters to prevent horizontal scrolling on default CGA/EGA/VGA displays.
  4. Related Commands: Placed at the bottom of the entry, linking to associated utilities (for example, the DIR page links to ATTRIB, CHDIR, and TREE).

Hyperlinks within the raw QuickHelp source files are defined using control markers that specify the display label and the target topic string. When rendered by the viewer:

  • Jump targets appear surrounded by ASCII pointer symbols: ◄ (ASCII 17) and ► (ASCII 16).
  • The active hyperlink is highlighted using video attribute bytes (typically light green or high-intensity white against a blue or black background).
  • Keyboard navigation is handled by the Tab key, which cycles the cursor through active screen anchors, while Enter resolves the target offset from the context table and redraws the display buffer with the new topic.

The system maintains a stack of visited topic offsets in memory. Users can press Alt+B or select the "Back" option from the menu bar to pop the previous offset off the stack, restoring the prior manual page without re-reading the entire file index from the disk.