Detailed Explanation of EMM386.EXE Switches

This article was previously published under Q78433
This article has been archived. It is offered "as is" and will no longer be updated.
This article explains the following EMM386.EXE switches for MS-DOS 5.0or later:
   W=on/off   Mx   FRAME=   /Pmmmm   Pn=address   X=   I=				
This article explains these switches in-depth, and describes some ofthe differences and limitations associated with the switches. There isalso a separate note regarding the use of X= and I= to maximizeavailable UMB space.


This switch enables or disables support for the Weitek 3167 mathcoprocessor. If W=on, MS-DOS 5.0 must be loaded low because the HMAwill be used by the coprocessor.

The Weitek coprocessor and the Intel coprocessor use different methodsof passing instructions and results back and forth to the 80386/80486chip controlling the system. The Intel chips do not reside in thememory space of the CPU. The Weitek chip is memory-mapped; it appearsto take up a certain amount of space in extended memory, but the areaof memory it uses is the HMA. Because the HMA is also the locationused to load the MS-DOS 5.0 kernel high, the Weitek processor cannotbe used while MS-DOS 5.0 is loaded high. Therefore, if the W=on switchis used, the DOS=HIGH command will be unusable and MS-DOS must beloaded low.

Mx/FRAME=/Paddress versus Pn=address

The Mx, FRAME=address, and /Pmmmm parameters are all essentiallyequivalent. They create a 64K LIM 3.2 compatible page frame at theaddress specified. The syntax for specifying the address for each ofthese is on page 606 of the version 5.0 "Microsoft MS-DOS User's Guideand Reference."

The Pn=address parameter allows you to create LIM 4.0 compatible 16Kpages. This allows you to create 16K pages at any available address inthe allowable memory ranges (8000-9C00, which is in conventionalmemory space, or C000-EC00 which is part of the upper memory area).Note that multiple uses of this parameter with a different value for nwill create additional 16K pages (up to a maximum of four). Theseadditional pages do not necessarily need to reside in contiguous areasof memory with respect to the other pages.

To use LIM expanded memory emulation, a page frame must becreated somewhere in memory to provide a location for the visiblepages of expanded memory to appear as they get bank-switched in andout by the applications using EMS.

LIM versions 3.2 and earlier require a 64K contiguous block for use asthe page frame. LIM 4.0 allows for disjoint page frames of 16K each,and it is not necessary to create four frames for a total of 64K. Anapplication written for LIM 4.0 can function with a single page of16K. However, because most expanded memory boards in use conform toLIM 3.2 or earlier, very few applications can take advantage of thereduced "footprint" capability of LIM 4.0. For these applications, itis still necessary to create a 64K LIM 3.2 compatible page frame.

X=address and I=address

These switches force EMM386 to include (I=) or exclude (X=) specificareas of memory between A000-FFFF when EMM386 is determining where toplace upper memory blocks (UMBs) or finding a location for the EMSpage frame.

Using I=address can often increase available UMB space by includingareas that EMM386 was not able to automatically detect. Be carefulwhen using this switch to not include memory areas in use by systemadapters or ROMs. If these areas are included, it may cause the systemto hang when booting, or to display other unpredictable behavior. Youcan determine which memory areas are free by using memory scanningutilities from several third party vendors, or MSD from Microsoft.

The X=address statement is sometimes required to prevent EMM386 fromusing areas that it might otherwise attempt to use, such as RAM oncertain network adapters, which is otherwise undetectable.
6.22 5.00 5.00a 6.00 6.20

Article ID: 78433 - Last Review: 10/26/2013 12:41:00 - Revision: 3.0

Microsoft MS-DOS 5.0 Standard Edition, Microsoft MS-DOS 6.0 Standard Edition, Microsoft MS-DOS 6.2 Standard Edition, Microsoft MS-DOS 6.21 Standard Edition, Microsoft MS-DOS 6.22 Standard Edition

  • kbnosurvey kbarchive KB78433