Getting 630 KB Free in MS-DOS 6.22: A Practical CONFIG.SYS Walkthrough
A step-by-step CONFIG.SYS recipe for freeing 620+ KB conventional memory in MS-DOS 6.22 using HIMEM.SYS, EMM386.EXE, DOS=HIGH, and DOS=UMB—with real MEM /C before/after numbers and the fragmentation gotchas that bite.
16 Oct 2025, 04:03 UTC

The Problem: 512 KB Isn't Enough
You're trying to launch a 1994 game or a hefty database on a 386DX-40 with 4 MB RAM. The installer claims it needs 580 KB conventional memory free. MEM shows 512 KB. You've already stripped ANSI.SYS and the mouse driver from CONFIG.SYS, but the kernel and COMMAND.COM still sit in the first 640 KB, leaving no room. The fix isn't buying more RAM—it's moving what you already have.
How the Pieces Fit Together
MS-DOS 5.0 through 6.22 can relocate its own kernel and load drivers into the upper memory area (UMA) between 640 KB and 1 MB, but only if you stack three components in the right order:
- HIMEM.SYS — installs the XMS (Extended Memory Specification) driver. Without it, DOS cannot address memory above 1 MB, so
DOS=HIGHdoes nothing. - DOS=HIGH in
CONFIG.SYS— tells the kernel to copy itself into the High Memory Area (HMA), the first 64 KB above 1 MB. This alone frees ~45 KB in conventional memory. - EMM386.EXE with the
RAMorNOEMSswitch — maps upper memory blocks (UMBs) into the 640 KB–1 MB window soDEVICEHIGHandLOADHIGHhave somewhere to put drivers and TSRs. - DOS=UMB — authorizes DOS to manage those UMBs. Without it,
DEVICEHIGHfalls back to low memory.
Order matters: HIMEM.SYS must load before DOS=HIGH takes effect, and EMM386.EXE must load before DOS=UMB can hand out UMBs. A typical CONFIG.SYS sequence looks like this:
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE RAM
DEVICEHIGH=C:\DOS\SETVER.EXE
DEVICEHIGH=C:\MOUSE\MOUSE.SYS
DEVICEHIGH=C:\CDROM\MSCDEX.EXE /D:MSCD001
Worked Example: Before and After
On a test machine (MS-DOS 6.22, 4 MB RAM, no network stack), run MEM /C from a clean boot with only HIMEM.SYS and DOS=HIGH active:
Memory Type Total = Used + Free
---------------- ------- ------- -------
Conventional 640K 96K 544K
Upper 0K 0K 0K
Reserved 384K 384K 0K
Extended (XMS) 3,584K 128K 3,456K
---------------- ------- ------- -------
Total memory 4,608K 608K 4,000K
Largest executable program size: 544K (557,056 bytes)
Now add EMM386.EXE RAM, DOS=UMB, and move the mouse and CD-ROM drivers high. Reboot and run MEM /C again:
Memory Type Total = Used + Free
---------------- ------- ------- -------
Conventional 640K 18K 622K
Upper 128K 72K 56K
Reserved 384K 384K 0K
Extended (XMS) 3,456K 128K 3,328K
---------------- ------- ------- -------
Total memory 4,608K 602K 4,006K
Largest executable program size: 622K (636,928 bytes)
Conventional free jumped from 544 KB to 622 KB—enough for that 580 KB requirement. The kernel lives in the HMA; MOUSE.SYS and MSCDEX occupy two UMBs totaling ~72 KB. SETVER.EXE also moved high but is too small to show separately.
Where It Breaks: Fragmentation and Hardware Conflicts
UMBs are not one contiguous block. Video ROM, BIOS extensions, and network cards carve the 640 KB–1 MB region into holes of varying sizes. EMM386.EXE scans for unused ranges and presents them as UMBs, but a 24 KB driver won't fit in a 16 KB hole. MS-DOS 6.x will silently load the driver low if no UMB fits, defeating the purpose. Use MEM /DEBUG to see exact UMB boundaries and sizes.
Hardware conflicts are the other failure mode. Some VGA cards, SCSI BIOSes, or Ethernet adapters map registers into the same upper addresses EMM386 wants to use. The symptom: a hang at the EMM386 banner or a driver failing with "No UMBs available." The fix is to exclude the conflicting range:
DEVICE=C:\DOS\EMM386.EXE RAM X=C800-CFFF
This tells EMM386 to treat C800–CFFF as reserved. You find the range by trial or by checking the hardware manual. If you exclude too much, you lose UMBs; if you exclude too little, the system hangs.
Verification Checklist
- Boot with a known-good floppy first. Keep a backup
CONFIG.SYS/AUTOEXEC.BATon that floppy. - Run
MEM /Cand confirm conventional free ≥ 620 KB. - Run
MEM /DEBUGand verify eachDEVICEHIGH/LOADHIGHentry appears under "Upper Memory" with a non-zero size. - Launch the target application. If it starts, you're done.
If conventional memory is still short, check whether SMARTDRV or a disk cache loaded low—move it high with LOADHIGH in AUTOEXEC.BAT. If the machine has a network stack (NDIS/ODI), those drivers often consume 40–60 KB each; consider a minimal PROTOCOL.INI or dropping the stack for gaming sessions.
Closing: The Minimal Viable Config
For most MS-DOS 6.22 systems, this four-line CONFIG.SYS gets you 90% of the gain:
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE NOEMS
DEVICEHIGH=C:\DOS\SETVER.EXE
NOEMS disables EMS emulation (faster, less UMB fragmentation) unless you have an EMS-only app. Add DEVICEHIGH lines for your actual drivers one at a time, rebooting and running MEM /C after each. Stop when the target program launches. That's the engineering decision: iterate with measurement, not guesswork.