Role of DOS=HIGH in MS-DOS 6.22 CONFIG.SYS
The DOS=HIGH statement in the MS-DOS 6.22
CONFIG.SYS configuration file is a memory management
directive designed to relocate the operating system's kernel from
conventional memory into the High Memory Area (HMA). By default, MS-DOS
loads its core components into the first 640 kilobytes (KB) of RAM,
which directly competes with user applications and games for space. This
article explains how DOS=HIGH works, its technical
prerequisites, and its role in maximizing free conventional memory on
legacy PC hardware.
The Conventional Memory Problem
IBM-compatible PCs running MS-DOS were constrained by the 640 KB conventional memory barrier. All standard DOS programs, device drivers, and terminate-and-stay-resident (TSR) programs required execution space within this base memory address range (0 to 640 KB).
As operating systems, peripherals, and software grew more complex, MS-DOS itself consumed tens of kilobytes of this base memory, leaving insufficient space for demanding business applications or games.
What the High Memory Area (HMA) Is
The High Memory Area (HMA) represents the first 64 KB (minus 16
bytes) of extended memory directly above the 1-megabyte (MB) address
line, spanning from addresses 100000h to
10FFEFh.
Through a microprocessor architectural quirk involving the A20 gate, 80286 and later x86 processors can access this small slice of extended memory while still remaining in 16-bit real mode. Because it is accessible in real mode, code placed here can execute without requiring the CPU to switch into protected mode.
How DOS=HIGH Functions
When the DOS=HIGH command is processed during the boot
sequence:
- MS-DOS instructs its internal loaders to relocate major portions of the DOS kernel code, internal data buffers, and default system tables into the HMA.
- The relocation clears approximately 40 KB to 50 KB of space in conventional memory.
- This newly vacated space is returned to the base memory pool, giving software more headroom to run.
Only one program or driver can occupy the HMA at any given time. Because MS-DOS kernel files are typically sized to fit this exact footprint, the operating system is the ideal candidate to claim this 64 KB block.
Prerequisites for Using
DOS=HIGH
The DOS=HIGH statement cannot function in isolation. It
relies on an extended memory manager to control the A20 gate and provide
access to memory above 1 MB.
In MS-DOS 6.22, this is handled by HIMEM.SYS. The memory
manager must be declared before the DOS=HIGH line in
CONFIG.SYS:
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH
If HIMEM.SYS is absent or fails to load (for example, on
an obsolete 8086/8088 CPU that lacks extended memory), the
DOS=HIGH directive is ignored, and DOS falls back to
loading entirely in conventional memory.
Combining with
Upper Memory Blocks (DOS=HIGH,UMB)
The DOS directive often appears alongside the
UMB (Upper Memory Blocks) parameter:
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
In this configuration:
HIGHsends the MS-DOS kernel into the HMA.UMBlinks the Upper Memory Area (the 384 KB space between 640 KB and 1 MB, managed byEMM386.EXE) into the DOS memory allocation chain.
This combination provided the standard foundation for advanced MS-DOS
6.22 memory optimization, allowing peripheral drivers to load into upper
memory (DEVICEHIGH) and background utilities to execute via
LOADHIGH in AUTOEXEC.BAT.