EMM386

Last updated
EMM386
Developer(s) Microsoft, IBM, DR, Datalight, The FreeDOS team
Initial release1988, 3435 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 manager of Microsoft's MS-DOS, IBM's PC DOS, Digital Research's DR-DOS, and Datalight's ROM-DOS [1] which is used to create expanded memory using extended memory on Intel 80386 CPUs. There also is an EMM386.EXE available in FreeDOS. [2]

Contents

Overview

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

The technique probably first appeared with the development of CEMM, included with Compaq's OEM MS-DOS for the Compaq Deskpro 386 in 1986. Microsoft's version first appeared, built-in, with Windows/386 2.0 in 1987 and as standalone EMM386.SYS with MS-DOS 4.0 in 1988; the more flexible EMM386.EXE version appeared in MS-DOS 5.0 in 1991.

EMM386 uses the processor's virtual 8086 mode. This forces memory accesses made by DOS applications to go through the processor's MMU (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). This technique enabled both EMS (expanded memory) as well as UMBs - 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 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, Qualitas 386MAX, Helix Netroom [3] and 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, Windows 98, Windows 95, Windows for Workgroups 3.1x, and Windows 3.xx, 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
  2. EMS must be enabled, can't use NOEMS option. For example JEMMEX X2MAX=65422
  3. 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 withDateFilenameVersion
MS-DOS 4.01 November 1988EMM386.SYS4.00
Windows 3.0 May 1990EMM386.SYS4.10.0419
MS-DOS 5.0 June 1991EMM386.EXE4.20.06x
IBM PC DOS 5.0 June 1991EMM386.EXE4.20.06x
IBM PC DOS 5.02 September 1992EMM386.EXE4.33
MS-DOS 5.00aNovember 1992EMM386.EXE4.33
Windows 3.1 April 1992EMM386.EXE4.44
Windows for Workgroups 3.1 October 1992EMM386.EXE4.44
MS-DOS 6.0 March 1993EMM386.EXE4.45
IBM PC DOS 6.1 June 1993EMM386.EXE4.45
MS-DOS 6.2 September 1993EMM386.EXE4.48
Windows 3.11November 1993EMM386.EXE4.48
Windows for Workgroups 3.11 November 1993EMM386.EXE4.48
MS-DOS 6.21March 1994EMM386.EXE4.48
IBM PC DOS 6.3 April 1994EMM386.EXE4.48
MS-DOS 6.22 June 1994EMM386.EXE4.49
IBM PC DOS 7.0 April 1995EMM386.EXE4.50
IBM PC DOS 2000 May 1998EMM386.EXE4.50
Windows 95 August 1995EMM386.EXE4.95
Windows 98 June 1998EMM386.EXE4.95

See also

Related Research Articles

<span class="mw-page-title-main">DESQview</span> Text mode multitasking operating environment

DESQview (DV) is a text mode multitasking operating environment developed by Quarterdeck Office Systems which enjoyed modest popularity in the late 1980s and early 1990s. Running on top of DOS, it allows users to run multiple programs concurrently in multiple windows.

In computing, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS program to run in protected mode, giving access to many features of the new PC processors of the time not available in real mode. It was initially developed by Microsoft for Windows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership. Almost all modern DOS extenders are based on DPMI and allow DOS programs to address all memory available in the PC and to run in protected mode.

<span class="mw-page-title-main">Extended memory</span>

In DOS memory management, extended memory refers to memory above the first megabyte (220 bytes) of address space in an IBM PC or compatible with an 80286 or later processor. The term is mainly used under the DOS and Windows operating systems. DOS programs, running in real mode or virtual x86 mode, cannot directly access this memory, but are able to do so through an application programming interface called the Extended Memory Specification (XMS). This API is implemented by a driver (such as HIMEM.SYS) or the operating system, which takes care of memory management and copying memory between conventional and extended memory, by temporarily switching the processor into protected mode. In this context, the term "extended memory" may refer to either the whole of the extended memory or only the portion available through this API.

<span class="mw-page-title-main">Expanded memory</span> System of bank switching in DOS memory management

In DOS memory management, expanded memory is a system of bank switching that provided additional memory to DOS programs beyond the limit of conventional memory (640 KiB).

<span class="mw-page-title-main">Conventional memory</span> First 640K of RAM under DOS

In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system and application programs. As memory prices rapidly declined, this design decision became a limitation in the use of large memory capacities until the introduction of operating systems and processors that made it irrelevant.

Quarterdeck Expanded Memory Manager (QEMM) is a memory manager produced by Quarterdeck Office Systems in the late 1980s through the late 1990s. It was the most popular third-party memory manager for the MS-DOS and other DOS operating systems.

In x86 computing, unreal mode, also big real mode, flat real mode, or voodoo mode is a variant of real mode, in which one or more segment descriptors has been loaded with non-standard values, like 32-bit limits allowing access to the entire memory. Contrary to its name, it is not a separate addressing mode that the x86 processors can operate in. It is used in the 80286 and later x86 processors.

Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit DOS and 16-bit Windows programs when there is already another operating system running and controlling the hardware.

CEMM, for Compaq Expanded Memory Manager was the first so-called PC "memory manager" for Intel 80386 CPUs, able to provide expanded memory (EMS) emulation by using the virtual memory features and the virtual 8086 mode of the CPU.

A DOS extender is a computer software program running under DOS that enables software to run in a protected mode environment even though the host operating system is only capable of operating in real mode.

LOADALL is the common name for two different, undocumented machine instructions of Intel 80286 and Intel 80386 processors, which allow access to areas of the internal processor state that are normally outside of the IA-32 API scope, like descriptor cache registers. The LOADALL for 286 processors is encoded 0Fh 05h, while the LOADALL for 386 processors is 0Fh 07h.

<span class="mw-page-title-main">Upper memory area</span> Physical memory region on IBM PC compatibles

In DOS memory management, the upper memory area (UMA) is the memory between the addresses of 640 KB and 1024 KB (0xA0000–0xFFFFF) in an IBM PC or compatible. IBM reserved the uppermost 384 KB of the 8088 CPU's 1024 KB address space for BIOS ROM, Video BIOS, Option ROMs, video RAM, RAM on peripherals, memory-mapped I/O, and obsoleted ROM BASIC.

HIMEM.SYS is a DOS device driver which allows DOS programs to store data in extended memory according to the Extended Memory Specification (XMS). The memory beyond the first 1 MB of address space is required by Windows 9x/Me in order to load; therefore, these versions of Microsoft Windows require HIMEM.SYS to be loaded to be able to run.

SmartDrive is a disk caching program shipped with MS-DOS versions 4.01 through 6.22 and Windows 3.0 through Windows 3.11. It improves data transfer rates by storing frequently accessed data in random-access memory (RAM).

<span class="mw-page-title-main">MSCDEX</span>

MSCDEX or Microsoft CD-ROM Extensions is a software program produced by Microsoft and included with MS-DOS 6.x and certain versions of Windows to provide CD-ROM support. Earlier versions of MSCDEX since 1986 were installable add-ons for MS-DOS 3.1 and higher.

In computing, the Virtual Control Program Interface (VCPI) is a specification published in 1989 by Phar Lap Software that allows a DOS program to run in protected mode, granting access to many features of the processor not available in real mode. It was supplanted by DOS Protected Mode Interface (DPMI) shortly after being introduced, due in large part to VCPI's inability to work in Windows 3.0's protected mode.

<span class="mw-page-title-main">Architecture of Windows 9x</span>

The Windows 9x series of operating systems refers to the kernel which lies at the heart of Windows 9x. Its architecture is monolithic.

Memory manager may refer to:

DOS Protected Mode Services (DPMS) is a set of extended DOS memory management services to allow DPMS-enabled DOS drivers to load and execute in extended memory and protected mode.

<span class="mw-page-title-main">Compaq Portable 386</span>

The Compaq Portable 386 is a computer released by Compaq Computer Corporation in 1987. It was equipped with a 20 MHz Intel 80386 CPU, 1 MB RAM, 16 KB ROM, 1.2 MB5¼-inch floppy, 40 or 100 MB hard disk drive, priced at US$7,999 or 9,999 respectively, and a 10" amber gas-plasma display.

References

  1. "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
  2. Platt, Robert; Spiegl, W. (2008) [2003]. "Command: EMM386". Archived from the original on 2017-08-23. Retrieved 2015-10-21.
  3. 1 2 Okazaki, Taku; Schulman, Andrew (1994-09-01). "The Windows Global EMM Import Interface". Dr. Dobb's Journal . Undocumented Corner (9). Archived from the original on 2017-08-23. Retrieved 2015-10-21. Archived 2014-05-29 at archive.today
  4. Brown, Ralf D.; Schulman, Andrew (July 1994). "QPI: The QEMM-386 Programming Interface". Dr. Dobb's Journal . Undocumented Corner. San Mateo, California: 123–131. Archived from the original on 2017-08-23. Retrieved 2017-08-23.
  5. Lespinasse, Michel. "How to kick out a memory manager". Amiens, France: Walken / Impact Studios. Archived from the original on 2017-01-04. Retrieved 2015-10-21.
  6. Paul, Matthias R. (2002-08-13). "Suche freien Speicherbereich unterhalb von 1 MB, der nicht von OS überschrieben wird" (in German). Newsgroup:  de.comp.lang.assembler.x86. Archived from the original on 2017-09-04. Retrieved 2017-09-03.
  7. "Q98768 - Troubleshooting MS-DOS 6.x and EMM386.EXE".
  8. "EMM386 Troubleshooting and Technical Information (78557)".
  9. "EMM386 and Early Versions of HIMEM.SYS (74977)".