Chapter Objectives:
Understand the concept of memory
Understand the relationship of RAM to memory
Learn how the first megabyte of memory is organized
See how to reduce conventional memory use
Take a detailed tour through CONFIG.SYS and AUTOEXEC.BAT
![]()
Conventional Memory:
On DOS systems, conventional memory refers to the portion of memory that is available to standard DOS programs. DOS systems have an address space of 1MB (megabyte), but the top 384K (called high memory) is reserved for system use.
Starting memory location is at 00000 and it continues to build up to the DOS prompt. Let's look at in greater detail what's going on behind the scenes.
The one megabyte of memory locations can be broken down to areas: conventional memory ( 00000 - 9FFFFF ) (640 kb) and reserved memory (A00000 - FFFFF0) (384 kb) combined = 1024 kb or 1 MB of memory. This leaves 640K of conventional memory and 384K of reserved memory. Everything above 1MB is either extended or expanded memory.
Conventional memory contains all the memory addresses that are set aside for RAM to run programs (00000 - 9FFFFF). Reserved memory (A00000 - FFFFF0) is set aside to run everything else.
Reserved Memory: UMA, UMB
In DOS -based systems, high memory refers to the memory area between the first 640K and 1 megabyte. It is also called the upper memory area (UMA) Short for upper memory block, a block of memory in the DOS upper memory area (UMA). UMBs are allocated and managed by a special memory manager such as EMM386.EXE, and can be used for TSRs and device drivers.
The most important device in the reserved area is the System BIOS which is located in the memory location of F0000 - FFFFF. (the very topmost of reserved memory).
When a program or a device wants to get the CPUs attention to perform a task, it uses an Interrupt (IRQ). There are two types of interrupts; software and hardware. The Interrupt Vector Table (IVT) is a data structure used by the system to handle both hardware and software interrupts. Every address in the IVT is dedicated to a particular function, which is locked in stone and cannot be changed.
Memory Address:
| Extended Memory | 1MB - 8MB | |
| Reserved Memory | A0000 - FFFF0 | 641k - 1MB |
| Conventional Memory | 00000 - 9FFFF | 0 - 640k |
Conventional Memory Addresses schema:
| IVT (Interrupt Vector Table) | 00000 - 003FF (0 - 1024 kb) |
Expanded Memory:
Also known as EMS (Expanded Memory Specification), expanded memory is a technique for utilizing more than 1MB (megabyte) of main memory in DOS -based computers. The limit of 1MB is built into the DOS operating system. The upper 384K is reserved for special purposes, leaving just 640K of conventional memory for programs.
There are several versions of EMS. The original versions, called EMS 3.0 and 3.2, enable programs to use an additional 8MB of memory, but for data only. An improved version developed by AST, Quadram and Ashton-Tate is known as EEMS (Extended EMS). EEMS enables programs to use extra memory for code as well as for data. The most recent version of EMS (created in 1987) is known as EMS 4.0 or LIM 4.0, LIM being the initials of the three companies that developed the specification: Lotus, Intel, and Microsoft. EMS 4.0 raises the available amount of memory to 32MB.
Until the release of Microsoft Windows 3.0 in 1990, expanded memory was the preferred way to add memory to a PC. The alternative method, called extended memory, was less flexible and could be used only by special programs such as RAM disks. Windows 3.0 and all later versions of Windows, however, contain an extended memory manager that enables programs to use extended memory without interfering with one another. In addition, Windows can simulate expanded memory for those programs that need it (by using the EMM368.EXE driver).
Expanded memory was originally an expansion card full of RAM chips. The chips were divided into 16K chunks called pages. A card could have 4 to 512 pages (64 K to 8MB). In order to access this card of RAM chips, you needed two things: a device driver to access card and applications that know how to talk to the device driver.
The device driver was called EMM.SYS, which evolved to EMM386.EXE. This file electronically readdressed the chips on the expanded memory board. When EMM.SYS initialized, it took the expanded memory card's first four (16K) pages and addresses and changed them into one, unused 64K area in the reserved area. This was known as the EMS page frame, which is immoveable. It almost all machines, this address range was from D0000 to DFFFF or E0000 to EFFFF.
Programs ask EMM.SYS to move different pages into this 64K area, you could load large amounts of data onto the EMS card while using only 64K of memory. Each program had to keep track of these pages.
DOS programs were written to use Expanded Memory.
Extended Memory:
Memory above and beyond the standard 1MB (megabyte) of main memory that DOS supports. Extended memory is only available in PCs with an Intel 80286 or later microprocessor.
If you have a PC with 32 MB of RAM, then 31 MB is extended memory. Extended memory cannot be directly used by DOS. In DOS -based systems, the high memory area refers to the first 64K of extended memory.
(Shadowing)
Two types of memory can be added to a PC to increase memory beyond 1MB: expanded memory and extended memory. Expanded memory conforms to a published standard called EMS that enables DOS programs to take advantage of it. Extended memory, on the other hand, is not configured in any special manner and is therefore unavailable to most DOS programs. However, MS-Windows and OS/2 can use extended memory.
HIMEM.SYS:
An extended memory (XMS) driver included with DOS, Windows 3.1, Windows for Workgroups and Windows 95. Windows 95 automatically loads himem.sys during start-up. With older versions of Windows, and with DOS, himem.sys must be explicitly loaded by placing a command in CONFIG.SYS.
UMB (Upper Memory Block)
UMBs are unused memory addresses in the reserved area.