A General Tutorial on the Various Forms of Memory
This article was previously published under Q37242 On This PageSUMMARY
This article provides a general description of the different forms of
memory available in the MS-DOS environment on PC and PS/2 systems. It
also discusses what kinds of software use these different areas, and
what drivers are needed to create and control some of these areas.
The first section of this article, "The Memory Map," shows a memory map that outlines the layout of these different forms of memory. The next 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 of memory can be used or emulated. After this is the "Memory Drivers" section, which gives a brief description of the memory management device drivers mentioned in this article. The last section, "Further Reading," gives additional reading material for more information on some of these forms of memory. MORE INFORMATION
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;
because
there are many relationships, you may have to read the following material
twice to eliminate any references to undefined terms.
The Memory MapThe following is an illustration that shows the various components of memory 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
EquationsThe 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 convert their 80386 extended memory into EMS memory is as follows: <EMS memory> = <80386 system> + <extended memory> + XMAEM.SYS + XMA2EMS.SYSThe one state processed is needed by Microsoft MS-DOS users to convert their 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 use EMM386.SYS to obtain EMS memory. If you have the same system and memory with IBM PC-DOS, you must use two drivers, XMAEM.SYS and XMA2EMS.SYS, to achieve EMS memory. If you have an 80286 system and want to use your extended memory as EMS memory, you will not be able to use the existing drivers included with MS-DOS. Some of these extended memory boards come with EMS emulators, which can be used. Memory DriversThe Microsoft driver HIMEM.SYS takes over 80286 and 80386 extended memory, converting it to the extended memory area of the XMS specification. It also takes the first 64K of this extended memory area and converts it into the HMA.The IBM PC-DOS version 4.0 driver XMAEM.SYS takes IBM PS/2 Model 80 80386 extended memory and uses it to emulate IBM XMA memory. (Used in conjunction with the XMA2EMS.SYS driver, it is possible to use this memory 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 uses it to emulate LIM/EMS memory. The Microsoft MS-DOS version 4.0 driver EMM386.SYS takes 80386 extended memory and uses it to emulate LIM/EMS memory. REFERENCES
For more information on LIM/EMS memory, refer to the official
specification, the "Lotus/Intel/Microsoft Expanded Memory
Specification Version 4.0," available free from Intel by calling
(800) 538-3373.
For more information on XMS memory, refer to the official specification, 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 and compatible OEM systems, refer to the "IBM PS/2 and PC BIOS Interface Technical Reference," part number 68X2260, available from IBM by calling (800) IBM-PCTB. (Another reference that contains similar material is the Microsoft Press book "Programmer's Quick Reference Series: 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. APPLIES TO
| Article Translations
|