Free MS-DOS Conventional Memory by Loading Drivers High
Move MS-DOS drivers and TSRs into Upper Memory Blocks with CONFIG.SYS and AUTOEXEC.BAT to free conventional memory for applications.
06 Sept 2026, 20:34 UTC

You boot an MS-DOS machine, launch a memory-hungry application, and see "Out of memory." The computer may have several megabytes of RAM, but MS-DOS restricts most programs to the first 640 KB, called conventional memory. Startup drivers and terminate-and-stay-resident utilities (TSRs) often consume that space before your application ever runs.
The practical fix is to move those background components into Upper Memory Blocks (UMBs), the unused address space between 640 KB and 1 MB. This keeps conventional memory free for the program you actually want to run. The steps below apply to MS-DOS 5.0 through 6.22 on an 80386 or newer processor.
Why conventional memory fills up
MS-DOS reserves the first megabyte of the CPU address space. The bottom 640 KB is conventional memory. The region from 640 KB to 1 MB is normally used by video BIOS, ROM, and hardware, but EMM386.SYS can map unused portions of it into UMBs on 80386-class systems. HIMEM.SYS manages the High Memory Area (HMA), the first 64 KB above 1 MB, and allows DOS to move part of its kernel out of conventional memory.
Edit CONFIG.SYS for high memory and UMBs
Open C:\CONFIG.SYS with EDIT.COM. Add or change these lines near the top:
DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.SYS NOEMS DOS=HIGH,UMB DEVICEHIGH=C:\DOS\MOUSE.SYS DEVICEHIGH=C:\DOS\SETVER.SYS
DEVICE loads a driver into conventional memory. DEVICEHIGH attempts to load it into a UMB instead. DOS=HIGH,UMB moves the DOS kernel into the HMA and enables UMB support. NOEMS tells EMM386.SYS to provide UMBs without expanded memory, which reduces conflicts with software that does not need EMS.
Load TSRs high in AUTOEXEC.BAT
Open C:\AUTOEXEC.BAT and prefix memory-resident programs with LOADHIGH, or its shorter alias LH:
@ECHO OFF PATH C:\DOS LH C:\DOS\MOUSE.COM LH C:\DOS\SMARTDRV.EXE LH C:\DOS\MSCDEX.EXE /D:MSCD000
LOADHIGH only works if EMM386.SYS is active and DOS=UMB is set in CONFIG.SYS. Programs with hardcoded segment addresses are not relocatable and may fail to load high or may load low anyway.
Verify with MEM
Restart the computer. At the C:\> prompt, run:
MEM /C
This reports free conventional memory. Compare it against a baseline boot before the changes. A successful configuration often leaves 500 KB or more free, depending on how many drivers remain low.
To see where each item loaded, run:
MEM /P /C
The /P switch pauses after each screen. Review the module list and segment addresses. Addresses in the Dxxx or Exxx range generally indicate upper memory, while addresses below 0A000 indicate conventional memory. If a driver still appears low, return that line to standard DEVICE or remove LOADHIGH, reboot, and retest.
Trade-offs and risks
- EMM386.SYS can conflict with network cards, sound cards, or other hardware using the same upper memory addresses, causing boot hangs or device failure.
- Not every driver or TSR is relocatable. Interrupt-hooking programs are especially likely to fail above 640 KB.
- CONFIG.SYS and AUTOEXEC.BAT changes take effect only after a reboot.
Rollback if the system will not boot
Because these edits change system state, keep a bootable MS-DOS floppy or a known-good copy of CONFIG.SYS and AUTOEXEC.BAT. If the machine hangs after editing, boot from the floppy, restore the original files to C:, and reboot. You can also press F5 at the MS-DOS startup prompt to bypass both files once, then edit them from the prompt.
Work incrementally: add one DEVICEHIGH or LOADHIGH line, reboot, run MEM /C, and confirm stability before moving the next item. This makes it easier to isolate the program that causes a conflict.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.