# EMM386

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/EMM386
> Markdown URL: https://mediated.wiki/source/EMM386.md
> Source: https://en.wikipedia.org/wiki/EMM386
> Source revision: 1328544438
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Device driver in MS-DOS

This article needs more citations. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "EMM386" – news · newspapers · books · scholar · JSTOR (December 2009) (Learn how and when to remove this message)

EMM386 Developers Microsoft, IBM, DR, Datalight, The FreeDOS team Release 1988, 37–38 years ago Operating system MS-DOS, PC DOS, DR DOS, ROM-DOS, FreeDOS Platform Intel 80386 Type Expanded memory manager, Command

**EMM386** is the [expanded memory](/source/Expanded_memory) manager of [Microsoft](/source/Microsoft)'s [MS-DOS](/source/MS-DOS), [IBM](/source/IBM)'s [PC DOS](/source/PC_DOS), [Digital Research](/source/Digital_Research)'s [DR-DOS](/source/DR-DOS), and [Datalight](/source/Datalight)'s [ROM-DOS](/source/ROM-DOS)[1] which is used to create expanded memory using [extended memory](/source/Extended_memory) on [Intel 80386](/source/Intel_80386) CPUs. There also is an EMM386.EXE available in [FreeDOS](/source/FreeDOS).[2]

## Overview

EMM386.EXE can map memory into unused blocks in the [upper memory area](/source/Upper_memory_area) (UMA), allowing device drivers and [terminate-and-stay-resident programs](/source/Terminate-and-stay-resident_program) to be "loaded high", preserving [conventional memory](/source/Conventional_memory).

The technique probably first appeared with the development of [CEMM](/source/CEMM), included with Compaq's OEM [MS-DOS](/source/MS-DOS) for the [Compaq Deskpro 386](/source/Compaq_Deskpro_386) in 1986. Microsoft's version first appeared, built-in, with [Windows/386](/source/Windows%2F386) 2.0 in 1987 and as standalone EMM386.SYS with [MS-DOS 4.0](/source/MS-DOS_4.0) in 1988; the more flexible EMM386.EXE version appeared in [MS-DOS 5.0](/source/MS-DOS_5.0) in 1991.

EMM386 uses the processor's [virtual 8086 mode](/source/Virtual_8086_mode). This forces memory accesses made by DOS applications to go through the processor's [MMU](/source/Memory_management_unit) (introduced in the 386), and the page table entries used by the MMU are configured by EMM386 to map certain regions in upper memory to areas of extended memory (obtained by EMM386 through the extended memory manager [HIMEM.SYS](/source/HIMEM.SYS)). This technique enabled both EMS (expanded memory) as well as [UMBs](/source/Upper_Memory_Block) - both of which appear to DOS applications to be memory in the upper area but are in fact mapped to physical memory locations beyond 1MB.

It temporarily shuts down during a Windows session in *386 Enhanced* mode, with Windows' [protected mode](/source/Protected_mode) kernel taking over its role.

Windows uses the GEMMIS API to take over memory management from EMM386.EXE. **Global EMM Import Specification** (GEMMIS) is supported via a document available to a select number of memory-manager vendors ("Windows/386 Paging Import Specification").[3][4][5][6]

Only a few memory managers implemented the GEMMIS API, some of the ones that include it are: EMM386.EXE, Quarterdeck [QEMM](/source/QEMM), Qualitas [386MAX](/source/386MAX), [Helix Netroom](/source/Helix_Netroom)[3] and [DOSBox builtin DOS](/source/DOSBox_builtin_DOS). Notably missing are FreeDOS's memory managers.

None of the FreeDOS memory managers (HIMEMX.EXE, JEMM386.EXE, JEMMEX.EXE) implement the GEMMIS API and Windows fails to start when running in conjunction with JEMMxxx since Windows fails to take over the memory management role. [Windows ME](/source/Windows_ME), [Windows 98](/source/Windows_98), [Windows 95](/source/Windows_95), [Windows for Workgroups 3.1x](/source/Windows_for_Workgroups_3.1), and [Windows 3.xx](/source/Windows_3.x) all will fail with JEMMxxx displaying:

 Cannot run Windows while the currently installed protected-mode software is
 running.

 Quit the protected-mode software, and then try again.
 You may need to restart your computer.

With JEMMxx, it is possible to run Windows 3.x and Windows for Workgroups 3.1x in limited capabilities by forcing Windows to use Standard Mode; i.e. using 80286 Protected Mode, not 80386 Enhanced Mode. Three conditions are required:

1. limit total XMS to 64MB

1. EMS must be enabled, can't use NOEMS option. For example JEMMEX X2MAX=65422

1. Windows operate in Standard Mode only, WIN /S or WIN /2

Note that Windows in standard mode is limited in functionality, it lacks virtual memory, it skips the [386Enh] section in SYSTEM.INI and any device drivers in [386Enh] are not loaded.

## History

EMM386 Version history[7][8][9] Bundled with Date Filename Version MS-DOS 4.01 November 1988 EMM386.SYS 4.00 Windows 3.0 May 1990 EMM386.SYS 4.10.0419 MS-DOS 5.0 June 1991 EMM386.EXE 4.20.06x IBM PC DOS 5.0 June 1991 EMM386.EXE 4.20.06x IBM PC DOS 5.02 September 1992 EMM386.EXE 4.33 MS-DOS 5.00a November 1992 EMM386.EXE 4.33 Windows 3.1 April 1992 EMM386.EXE 4.44 Windows for Workgroups 3.1 October 1992 EMM386.EXE 4.44 MS-DOS 6.0 March 1993 EMM386.EXE 4.45 IBM PC DOS 6.1 June 1993 EMM386.EXE 4.45 MS-DOS 6.2 September 1993 EMM386.EXE 4.48 Windows 3.11 November 1993 EMM386.EXE 4.48 Windows for Workgroups 3.11 November 1993 EMM386.EXE 4.48 MS-DOS 6.21 March 1994 EMM386.EXE 4.48 IBM PC DOS 6.3 April 1994 EMM386.EXE 4.48 MS-DOS 6.22 June 1994 EMM386.EXE 4.49 IBM PC DOS 7.0 April 1995 EMM386.EXE 4.50 IBM PC DOS 2000 May 1998 EMM386.EXE 4.50 Windows 95 August 1995 EMM386.EXE 4.95 Windows 98 June 1998 EMM386.EXE 4.95

## See also

- [Upper memory area](/source/Upper_memory_area) (UMA)

- [Extended memory](/source/Extended_memory) (XMS)

- [Expanded memory](/source/Expanded_memory) (EMS)

- [List of DOS commands](/source/List_of_DOS_commands)

## References

1. **[^](#cite_ref-1)** ["Datalight ROM-DOS User's Guide"](https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf) (PDF). *www.datalight.com*.

1. **[^](#cite_ref-Platt_2003_EMM386_2-0)** Platt, Robert; Spiegl, W. (2008) [2003]. ["Command: EMM386"](http://help.fdos.org/en/hhstndrd/base/emm386.htm). [Archived](https://web.archive.org/web/20170823174504/http://help.fdos.org/en/hhstndrd/base/emm386.htm) from the original on 2017-08-23. Retrieved 2015-10-21.

1. ^ [***a***](#cite_ref-Okazaki_1994_GEMMIS_3-0) [***b***](#cite_ref-Okazaki_1994_GEMMIS_3-1) Okazaki, Taku; Schulman, Andrew (1994-09-01). ["The Windows Global EMM Import Interface"](http://www.drdobbs.com/windows/undocumented-corner/184409317). *[Dr. Dobb's Journal](/source/Dr._Dobb's_Journal)*. Undocumented Corner (9). [Archived](https://web.archive.org/web/20170823174701/http://www.drdobbs.com/windows/undocumented-corner/184409317) from the original on 2017-08-23. Retrieved 2015-10-21. [\[1\]](http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/DDJ/1994/9409/9409m/9409m.htm) [Deprecated link](https://en.wikipedia.org/wiki/Wikipedia:Archive.today_guidance) archived 2014-05-29 at [archive.today](/source/Archive.today) [\[2\]](https://web.archive.org/web/20170823174853/http://www.drdobbs.com/windows/undocumented-corner/windows/sourcecode/undocumented-corner/30400554) [\[3\]](https://web.archive.org/web/20170823175353/http://www.drdobbs.com/windows/undocumented-corner/windows/sourcecode/undocumented-corner/30400553)

1. **[^](#cite_ref-Brown_1994_4-0)** [Brown, Ralf D.](/source/Ralf_D._Brown); Schulman, Andrew (July 1994). ["QPI: The QEMM-386 Programming Interface"](https://www.cs.cmu.edu/~ralf/papers/qpi.txt). *[Dr. Dobb's Journal](/source/Dr._Dobb's_Journal)*. Undocumented Corner. San Mateo, California: 123–131. [Archived](https://web.archive.org/web/20170823173501/https://www.cs.cmu.edu/~ralf/papers/qpi.txt) from the original on 2017-08-23. Retrieved 2017-08-23.

1. **[^](#cite_ref-Lespinasse_5-0)** Lespinasse, Michel. ["How to kick out a memory manager"](http://dgi_il.tripod.com/gemmis.txt). Amiens, France: Walken / Impact Studios. [Archived](https://web.archive.org/web/20170104093930/http://dgi_il.tripod.com/gemmis.txt) from the original on 2017-01-04. Retrieved 2015-10-21.

1. **[^](#cite_ref-Paul_2002_HMA7_6-0)** Paul, Matthias R. (2002-08-13). ["Suche freien Speicherbereich unterhalb von 1 MB, der nicht von OS überschrieben wird"](https://groups.google.com/d/msg/de.comp.lang.assembler.x86/boKnIpqPl-Q/ZLDFDX9E1e0J) (in German). [Newsgroup](/source/Usenet_newsgroup): [de.comp.lang.assembler.x86](news:de.comp.lang.assembler.x86). Retrieved 2017-09-03.{{[cite newsgroup](https://en.wikipedia.org/wiki/Template:Cite_newsgroup)}}: CS1 maint: deprecated archival service ([link](https://en.wikipedia.org/wiki/Category:CS1_maint:_deprecated_archival_service))

1. **[^](#cite_ref-7)** ["Q98768 - Troubleshooting MS-DOS 6.x and EMM386.EXE"](https://www.infania.net/ms6kb/Q98768.htm).

1. **[^](#cite_ref-8)** ["EMM386 Troubleshooting and Technical Information (78557)"](https://hwiegman.home.xs4all.nl/msdos/78557.htm).

1. **[^](#cite_ref-9)** ["EMM386 and Early Versions of HIMEM.SYS (74977)"](https://hwiegman.home.xs4all.nl/msdos/74977.htm).

This DOS software-related article is a stub. You can help Wikipedia by adding missing information.

- [v](https://en.wikipedia.org/wiki/Template:DOS-stub)
- [t](/source/Template_talk%3ADOS-stub)
- [e](https://en.wikipedia.org/wiki/Special:EditPage/Template:DOS-stub)

---
Adapted from the Wikipedia article [EMM386](https://en.wikipedia.org/wiki/EMM386) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/EMM386?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
