In DOS memory management, expanded memory is a system of bank switching introduced April 24, 1985 that provided additional memory to DOS programs beyond the limit of conventional memory. Expanded memory uses parts of the address space normally dedicated to communication with peripherals for program memory as well. The practice is outlined in the Expanded Memory Specification (EMS), which was developed jointly by Lotus Software, Intel, and Microsoft, so that this specification was sometimes referred to as "LIM EMS." The use of expanded memory became common with games and business programs in the late 1980s through the mid-1990s, but its use declined as users switched from DOS to 32-bit operating systems such as Microsoft Windows and Linux.
The 8088 processor of the IBM PC and IBM PC/XT could address one Megabyte (MB or 220 bytes) of memory. It inherited this limit from the 20-bit external address bus of the Intel 8086. The designers allocated the lower 640 kB (655,360 bytes) of address space for read-write program memory (RAM), called "conventional memory", and the remaining 384 kB of memory space was reserved for uses such as the system BIOS, video memory, and memory on expansion peripheral boards.
To fit potentially much more memory than the 384 kB of free address space would allow, a bank switching scheme was devised, where only selected parts of the additional memory would be accessible at the same time. Originally, a single 64 kB (216 bytes) window of memory, called a page frame, was possible; later this was made more flexible. Programs had to be written in a specific way to access expanded memory. The 'window' between lower RAM and expanded RAM could be moved around to different locations within the Expanded RAM.
Lotus Development, Intel, and Microsoft cooperated to develop the standard; IBM notably did not participate. (Microsoft thought that bank switching was a necessary, but inelegant and temporary, stopgap measure; Bill Gates said of expanded memory, "It's garbage! It's a kludge! ... But we're going to do it".) The companies planned to launch the standard at the Spring 1985 COMDEX, with many expansion-card and software companies announcing their support.
An expanded memory board, being a hardware peripheral, needed a software device driver, which exported its services. Such a device driver was called expanded memory manager. Its name was variable; the previously mentioned boards used REMM.SYS (AST), PS2EMM.SYS (IBM), AEMM.SYS (AT&T) and EMM.SYS (Intel) respectively. Later, the expression became associated with software-only solutions requiring the Intel 80386 processor, for example Quarterdeck's QEMM, Qualitas' 386MAX or the default EMM386 in MS-DOS, PC DOS and DR-DOS.
Expanded memory was a common term for several incompatible technology variants. EEMS, an expanded memory management standard competing with LIM EMS, was developed by AST Research, Quadram and Ashton-Tate. It allowed to also remap some or all of the lower 1024 kB of memory not associated with interrupts or dedicated I/O memory (such as network or video cards), so that entire programs could be switched in and out of the extra RAM. This feature was used by early DOS multitasker software such as DESQview. The two standards were eventually combined as LIM EMS 4.0.
Expanded Memory usage declined in the 1990s. The IBM AT Intel 80286 supported 24 bits of address space (16 MB) in protected mode and the 386 supported 32 bit addresses, or 4 Gigabytes (232) of RAM - roughly four thousand times the addressable space of the original 8086. DOS itself did not directly support protected mode, but Microsoft eventually developed DPMI and several DOS extenders were published based on it. DOS programs like DOOM could use extenders like DOS/4G to run in protected mode while still using the DOS API. In the early 1990s new operating systems like Linux, Microsoft Windows NT, OS/2, and BSD/OS supported protected mode 'out of the box'. These and similar developments rendered Expanded Memory an obsolete concept.
Expanded Memory Specification (EMS)
The Expanded Memory Specification or EMS is the specification describing the use of expanded memory. EMS functions are accessible through software interrupt 67h. Programs using EMS must first establish the presence of an installed expanded memory manager by checking for a device driver with the device name EMMXXXX0.
The first publicly available version of EMS, version 3.0 allowed access of up to 4 MB of expanded memory. This was increased to 8 MB with version 3.2 of the specification. The final version of EMS, version 4.0 increased the maximum amount of expanded memory to 32 MB and supported additional functionality.
This insertion of a memory window into the peripheral address space could originally be accomplished only through specific expansion boards, plugged into the ISA expansion bus of the computer. Famous 1980s expanded memory boards were AST RAMpage, IBM PS/2 80286 Memory Expansion Option, AT&T Expanded Memory Adapter and the Intel Above Board. Given the price of RAM during the period, up to several hundred dollars per MiB, and the quality and reputation of the above brand names, an expanded memory board was very expensive.
Later, some motherboard chipsets of Intel 80286-based computers implemented an expanded memory scheme that did not require add-on boards, notably the NEAT chipset. Typically, software switches determined how much memory should be used as expanded memory and how much should be used as extended memory.
Beginning in 1986, the built-in memory management features of Intel 80386 processor freely modeled the address space when running legacy real mode software, making hardware solutions unnecessary. Expanded memory could be simulated in software.
The first software expanded memory management (emulation) program was CEMM, available in September 1986 as a utility for the Compaq Deskpro 386. A popular and well-featured commercial solution was Quarterdeck's QEMM. A contender was Qualitas' 386MAX|386MAX. Functionality was later incorporated into MS-DOS 4.01 in 1989 and into DR-DOS 5.0 in 1990, as EMM386.
Software expanded memory managers in general offered additional, but closely related functionality. Notably, they could create ordinary memory in unused parts of the upper memory area (UMA) (the high 384 kB of real mode address space) called upper memory blocks (UMBs) and provided tools for loading small programs, typically TSRs inside ("LOADHI" or "LOADHIGH").
Interaction between extended memory, expanded memory emulation and DOS extenders ended up being regulated by the XMS, Virtual Control Program Interface (VCPI), DOS Protected Mode Interface (DPMI) and DOS Protected Mode Services (DPMS) specifications.
Certain emulation programs, colloquially known as LIMulators, did not rely on motherboard or 80386 features at all. Instead, they reserved 64 kB of the base RAM for the expanded memory window, where they copied data to and from either extended memory or the hard disk when application programs requested page switches. This was programmatically easy to implement, but performance was low. This technique was offered by AboveDisk from Above Software and by several shareware programs.
- Conventional memory
- DOS memory management
- Extended memory (XMS)
- High memory area (HMA)
- Upper memory area (UMA)
- Global EMM Import Specification (GEMMIS)
- x86 memory segmentation
- Address Windowing Extensions (AWE)
- New 1-2-3 Gets 4 Megabytes of Memory, Lotus, Intel Break PC-DOS Memory Barrier, InfoWorld, Apr 29, 1985
- Machrone, Bill (1985-05-14). "Memory Scheme Breaks 640K". PC Magazine. p. 33. Retrieved 28 October 2013.
- Lotus, Intel, Microsoft (October 1987). Expanded Memory Specification. Version 4.0.
- PC System Programming for Developers. 1989. ISBN 1-55755-036-0.
- Understanding EMS 4.0 by Lloyd Borrett, Technical Cornucopia, January–February 1989