How DEVICEHIGH Optimizes Driver Loading in MS-DOS 6.22
In MS-DOS 6.22, the DEVICEHIGH directive optimizes
driver loading by moving device drivers out of precious conventional
memory and into the Upper Memory Area (UMA). By utilizing Upper Memory
Blocks (UMBs) located between the 640 KB and 1024 KB address range,
DEVICEHIGH frees up the critical base 640 KB of
conventional memory required by memory-hungry DOS applications and
games. This article explains how DEVICEHIGH works, its
prerequisites, its syntax and parameters, and its role in DOS memory
optimization.
The Conventional Memory Bottleneck
MS-DOS was fundamentally constrained by the 8086 processor
architecture, reserving the first 640 KB of system RAM as conventional
memory. Every standard device driver loaded using the basic
DEVICE directive in CONFIG.SYS—such as mouse
drivers, CD-ROM drivers, and network interface cards—consumed a portion
of this 640 KB footprint. As drivers and terminate-and-stay-resident
(TSR) programs accumulated, the remaining conventional memory often
became insufficient to run complex programs.
How DEVICEHIGH Intervenes
The DEVICEHIGH directive functions as a drop-in
replacement for the DEVICE command. Instead of allocating
memory sequentially from base RAM, MS-DOS evaluates the Upper Memory
Area for available Upper Memory Blocks. If a suitable block of free UMB
space is found, the operating system loads and initializes the driver
directly within that upper address space.
If the upper memory is insufficient to accommodate the driver during either its load phase or resident phase, MS-DOS 6.22 automatically falls back to conventional memory, preventing system crashes during boot.
Required Prerequisites in CONFIG.SYS
DEVICEHIGH cannot function in isolation; it requires
memory managers to configure extended memory and create UMBs. A properly
ordered CONFIG.SYS file requires three preliminary
declarations:
HIMEM.SYS: Manages extended memory (XMS) beyond 1 MB.EMM386.EXE: Converts unmapped addresses between 640 KB and 1024 KB into usable UMBs (using parameters such asRAMorNOEMS).DOS=UMB(orDOS=HIGH,UMB): Instructs MS-DOS to maintain a link to the UMBs created by EMM386.
A typical base configuration appears as follows:
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
Once established, device drivers can be loaded high:
DEVICEHIGH=C:\DOS\SETVER.EXE
DEVICEHIGH=C:\DRIVERS\VIDE-CDD.SYS /D:MSCD001
Advanced Optimization Using the /L Switch
Drivers often require more memory during initialization than they
consume once fully loaded. To prevent drivers from fragmenting the UMB
pool or failing to load when space is tight, MS-DOS 6.22 supports the
/L (link/region) switch with DEVICEHIGH.
The syntax for this optimization is:
DEVICEHIGH /L:region1[,minsize1][;region2[,minsize2]...] = driver_path [driver_parameters]
- Region: Specifies the specific UMB segment where the driver should load.
- Minsize: Dictates the minimum amount of contiguous memory required in that region to hold the driver during execution.
By specifying explicit regions and memory sizes, the operating system packs drivers into the UMBs with minimal wasted space between boundaries.
Integration with MemMaker
In MS-DOS 6.22, the manual calculation of driver sizes and region
placement was largely automated by the MEMMAKER utility.
When run, MemMaker tests driver loading sizes, calculates memory
fragmentation across available UMB regions, and automatically rewrites
standard DEVICEHIGH directives in CONFIG.SYS
with precise /L values to achieve the highest possible
yield of conventional memory.