High Memory Area Address Range in MS-DOS 6.22

In MS-DOS 6.22, the High Memory Area (HMA) is a specific 64-kilobyte region of extended memory located just above the standard 1-megabyte conventional memory boundary. This article outlines the exact memory address range defining the HMA, the architectural anomaly that enables it, and how MS-DOS 6.22 utilizes this space to maximize conventional memory for applications.

The HMA Address Range

The High Memory Area covers the linear address range from 100000h to 10FFEFh (hexadecimal), which translates to 1,048,576 to 1,114,095 bytes in decimal notation.

In the segmented memory architecture (segment:offset) used by real-mode x86 processors, the HMA spans from FFFF:0010 to FFFF:FFFF.

The total capacity of the HMA is exactly 65,520 bytes (64 KB minus 16 bytes). The initial 16 bytes (FFFF:0000 to FFFF:000F) are excluded because they point to physical addresses 0000h to 000Fh below the 1 MB line due to segment alignment.

How the HMA Works

Real-mode addressing on original 8086 processors was limited to 1 MB (\(2^{20}\) bytes). When calculating segment * 16 + offset, any address exceeding 0FFFFFh would wrap around to 00000h because the processor lacked a 21st address line (the A20 line).

With the introduction of the Intel 80286 and later processors, the physical A20 line existed. When enabled, addresses calculated past 0FFFFFh no longer wrapped to zero. Instead, they accessed the first 64 KB of extended memory while the CPU remained in real mode, creating the High Memory Area.

Implementation in MS-DOS 6.22

To access the HMA in MS-DOS 6.22, system configuration files must enable extended memory support and instruct DOS to relocate itself:

  1. DEVICE=C:\DOS\HIMEM.SYS: Loaded in CONFIG.SYS, this driver controls the A20 line and manages extended memory allocation.
  2. DOS=HIGH: Directs MS-DOS 6.22 to load parts of its operating system kernel into the HMA.

By shifting roughly 40 to 50 KB of kernel routines out of conventional memory (the first 640 KB) and into the HMA address range of 100000h–10FFEFh, MS-DOS 6.22 preserves critical lower memory space for running memory-intensive DOS programs.