You are currently offline, waiting for your internet to reconnect

A General Tutorial on the Various Forms of Memory

This article was previously published under Q37242
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
This article provides a general description of the different forms ofmemory available in the MS-DOS environment on PC and PS/2 systems. Italso discusses what kinds of software use these different areas, andwhat drivers are needed to create and control some of these areas.

The first section of this article, "The Memory Map," shows a memorymap that outlines the layout of these different forms of memory. Thenext section, "Types of Memory," discusses the major forms of memory,and their physical and logical components and drivers. The "Equations"section gives some handy equations for showing how these areas ofmemory can be used or emulated. After this is the "Memory Drivers"section, which gives a brief description of the memory managementdevice drivers mentioned in this article. The last section, "FurtherReading," gives additional reading material for more information onsome of these forms of memory.
There are many forms of memory: conventional, extended, EMS, XMA, and XMS.Below is a description of each form of memory, and how they relate;becausethere are many relationships, you may have to read the following materialtwice to eliminate any references to undefined terms.

The Memory Map

The following is an illustration that shows the various components ofmemory that are available (please note that it is a very general map):
    32M +--------------------------------------------+        |                                            |        | expanded memory board                      | ----+        |                                            |     |      0 +--------------------------------------------+     |                                                           |                                                           |        +------------------------------------------- +     |        |                                            |     |        | built-in memory                            |     |        |                                            |     |    nM* +--------------------------------------------+     |        |                                            |     |        | extended memory (1M-nM*)                   |     |        |                                            |     |        +- - - - - - - - - - - - - - - - - - - - - - +     |        |                                            |     |        | high memory area (FFFF:0010-FFFF:FFFFh)    |     |        |                                            |     |     1M +--------------------------------------------+     |        |                                            |     |        | upper memory area (640K-1M)                |     |        |                                            |     |        +- - - - - - - - - - - - - - - - - - - - - - +     |        |                                            |     |        | expanded memory page frame (64K)           | <---+        |                                            |        +- - - - - - - - - - - - - - - - - - - - - - +        |                                            |   640K +--------------------------------------------+        |                                            |        | extended BIOS data area (1K)               |        |                                            |   639K +- - - - - - - - - - - - - - - - - - - - - - +        |                                            |        | conventional memory (0K-640K)              |        |                                            |      0 +--------------------------------------------+        +--------------------------------------------+        |                                            |        | IBM expanded memory adapter (XMA)          |        |                                            |        +--------------------------------------------+* nM = 16 MB on an 80286, 4 gigabytes on an 80386				

Types of Memory

  • Conventional Memory

    Intel 8086 systems can address 1 MB of memory. (Later systems can address more, in other modes.) On PC and PS/2 systems, this is divided into the conventional memory area and the upper memory area (UMA).

    The conventional memory area is the 0K-640K section of "normal" memory. This area of memory is used by MS-DOS and normal application software.

    The UMA is the 640K-1 MB section of memory that normally contains video adapter buffers, network card buffers, and other buffers and work areas for peripherals and the ROM BIOS. It is also normally used on EMS systems to store the expanded memory page frame. This area of memory is normally used by the ROM BIOS and peripherals, such as the expanded memory manager.
  • Extended Memory

    The extended memory area is an area of memory that is available only on 80286 and 80386 systems. This memory begins at 1 MB. On 80286 systems, the upper limit is 16 MB; on 80386 systems, the upper limit is 4 gigabytes. This memory is only addressable while in protected mode. It is normally used by systems software (RAMDrive, SMARTDrive, VDISK, EMM386.SYS, XMAEM.SYS, and HIMEM.SYS).

    Built-in memory (BIM) is a form of memory that exists on Compaq and some other 80386 OEM systems. These systems have 1 MB of conventional memory on their motherboard, and this extra 384K of "built-in memory" is mapped to the top of extended memory, because the UMA already occupies the upper 384K of conventional memory. This area of memory is normally used by systems software. HIMEM.SYS uses this memory and includes it in its extended memory blocks, if it is available. (Other OEM systems also have 384K of otherwise unused memory on their motherboard. A common place for this memory to be mapped into is the first section of extended memory.)
  • EMS Memory

    An expanded memory board is a separate board that contains EMS memory of up to 32 MB, which can be addressed on any Intel 80x86 system by paging 16K portions of memory into the expanded memory page frame, located in the UMA.

    The expanded memory page frame, normally located in the UMA, is a collection of 16K physical pages from which an application program accesses expanded memory. These page frames are memory frames paged in from the expanded memory board. This area of memory is controlled exclusively by the expanded memory manager (such as EMM386.SYS), which is in turn called by systems software (such as Buffers/X, Fastopen/X, SMARTDrive, RAMDrive, VDISK, MSCDEX, and Windows) and applications software (such as Excel and the Programmer's Library).

    Alternatively, 80386 systems can use 80386-specific features to emulate EMS memory by paging 16K portions of memory into the expanded memory page frame, as always located in the UMA. EMM386, QEMM, and 386MAX are examples of this software.
  • XMA Memory

    An IBM expanded memory adapter (XMA) is a separate board that contains IBM (or compatible) XMA memory, which can be addressed as either expanded memory or extended memory, with the appropriate software drivers.
  • XMS Memory

    XMS memory is the collection of the UMA and the extended memory area, and is controlled by an extended memory manager (XMM) such as HIMEM.SYS. The extended memory area is only available on 80286 and 80386 systems. The extended memory area is broken up into two logical areas by the XMM: the high memory area (HMA) and extended memory blocks. Thus, XMS memory consists of the UMA, the HMA, and the extended memory area.

    The HMA is 64K of memory located at the beginning of the extended memory area. It exists only on 80286 and 80386 systems with extended memory. This area only exists in a controlled, easily accessible manner when HIMEM.SYS or another XMS driver is installed. This area of memory is controlled exclusively by the extended memory manager (such as HIMEM.SYS), which is in turn called by systems software (such as Windows) and applications software.

    Upper memory blocks (UMBs) are blocks of memory that are available on some 80286 and 80386 systems, and are located in the UMA. The number, size, and location of these blocks vary widely, depending upon the types of hardware adapter cards installed in the machine. The XMS specification creates these abstract data types. (HIMEM.SYS does not implement UMBs; in MS-DOS 5.0 and later, EMM386.EXE does.)

    Extended memory blocks (EMBs) are blocks of extended memory. The XMS specification creates these abstract data types. This area can only be used for data storage (that is, they cannot be used to store code). EMBs exist to allow systems and applications software to allocate extended memory, which is otherwise very difficult to address and manipulate in a controlled manner.


The following are some rules and "equations" for combining, modifying,and emulating memory to make it useful:
  <XMS memory> = <extended memory> + HIMEM.SYS   <XMS memory including UMBS> = <80386 system> + <extended memory> +                   HIMEM.SYS + EMM386.EXE (version 4.33.06x or later)   <XMA memory> = proprietary memory adapter of IBM   <EMS memory> = usable by MS-DOS and applications   <extended memory> = usable by some applications   <XMA memory> = <80386 system> + <extended memory> + XMAEM.SYS   <EMS memory> = <80386 system> + <extended memory> +                  EMM386.SYS (version 4.0)   <EMS memory> = <80386 system> + <extended memory> + HIMEM.SYS +                  EMM386.SYS or EMM386.EXE (version 4.10.0419 or later)				
This means the two-stage system needed by IBM PC-DOS owners to converttheir 80386 extended memory into EMS memory is as follows:
   <EMS memory> = <80386 system> + <extended memory> + XMAEM.SYS +                  XMA2EMS.SYS				
The one state processed is needed by Microsoft MS-DOS users to converttheir 80386 systems to EMS memory is as follows:
   <EMS memory> = <80386 system> + <extended memory> +                  EMM386.SYS (version 4.0)   <EMS memory> = <80386 system> + <extended memory> + HIMEM.SYS +                  EMM386.SYS (version 4.10.0419)   <EMS memory> = <80386 system> + <extended memory> + HIMEM.SYS +                  EMM386.EXE (version 4.20.06x)				
If you have an 80386 system, extended memory, and MS-DOS, you can useEMM386.SYS to obtain EMS memory. If you have the same system andmemory with IBM PC-DOS, you must use two drivers, XMAEM.SYS andXMA2EMS.SYS, to achieve EMS memory.

If you have an 80286 system and want to use your extended memory asEMS memory, you will not be able to use the existing drivers includedwith MS-DOS. Some of these extended memory boards come with EMSemulators, which can be used.

Memory Drivers

The Microsoft driver HIMEM.SYS takes over 80286 and 80386 extendedmemory, converting it to the extended memory area of the XMSspecification. It also takes the first 64K of this extended memoryarea and converts it into the HMA.

The IBM PC-DOS version 4.0 driver XMAEM.SYS takes IBM PS/2 Model 8080386 extended memory and uses it to emulate IBM XMA memory. (Used inconjunction with the XMA2EMS.SYS driver, it is possible to use thismemory as EMS memory.)

The IBM PC-DOS version 4.0 driver XMA2EMS.SYS takes IBM XMA memory(or the emulated XMA memory created by the XMAEM.SYS driver) and usesit to emulate LIM/EMS memory.

The Microsoft MS-DOS version 4.0 driver EMM386.SYS takes 80386extended memory and uses it to emulate LIM/EMS memory.
For more information on LIM/EMS memory, refer to the officialspecification, the "Lotus/Intel/Microsoft Expanded MemorySpecification Version 4.0," available free from Intel by calling(800) 538-3373.

For more information on XMS memory, refer to the officialspecification, the "eXtended Memory Specification Version 3.0,"available free from Microsoft. To obtain the specification, see the"Instructions for Downloading" section below.

For more information on the extended BIOS data area of IBM PS/2 andcompatible OEM systems, refer to the "IBM PS/2 and PC BIOS InterfaceTechnical Reference," part number 68X2260, available from IBM bycalling (800) IBM-PCTB. (Another reference that contains similarmaterial is the Microsoft Press book "Programmer's Quick ReferenceSeries: IBM ROM BIOS," by Ray Duncan, ISBN 1-55615-135-7.)

For more information on Compaq built-in memory (BIM), refer to the"Compaq DeskPro 386(TM) Personal Computer Technical Reference Guide,"available from Compaq.
6.22 5.00 5.00a 6.00 6.20

Article ID: 37242 - Last Review: 05/12/2003 20:57:11 - Revision: 2.0

  • Microsoft MS-DOS 2.11 Standard Edition
  • Microsoft MS-DOS 3.1
  • Microsoft MS-DOS 3.2 Standard Edition
  • Microsoft MS-DOS 3.21 Standard Edition
  • Microsoft MS-DOS 3.3 Standard Edition
  • Microsoft MS-DOS 3.3a
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 4.01 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • 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
  • KB37242