High memory area
|This article does not cite any sources. (December 2016) (Learn how and when to remove this template message)|
In real mode, the segmentation architecture of the Intel 80286 and subsequent processors identifies memory locations with 16-bit segment and 16-bit offset, which is resolved into a physical address via (segment) x 16 + (offset). Although intended to address only 1 Megabyte (MB) (220 bytes) of memory, segment:offset addresses at
FFFF:0010 and beyond reference memory beyond 1 MB (
FFFF0 + 0010 = 100000). So this mode can actually address the first 65520 bytes of extended memory as part of the 64 KB range starting 16 bytes before the 1 MB mark—
FFFF:0000 (0xFFFF0) to
FFFF:FFFF (0x10FFEF). The Intel 8086 and Intel 8088 processors, unable to handle more than 1 MB of memory because they had only 20 address lines, wrapped around at the 20th bit, so that address
FFFF:0010 was equivalent to
In order to allow running existing MS-DOS programs which relied on this feature on their newer IBM PC AT computers, IBM added special circuitry on the motherboard to simulate the wrapping around. This circuit was a simple logic gate which could disconnect the microprocessor's 21st addressing line, A20, from the rest of the motherboard. This gate could be controlled, initially through the keyboard controller, to allow running programs which wanted to access the entire RAM.
So-called A20 handlers could control the addressing mode dynamically, thereby allowing programs to load themselves into the 1024–1088 KB region and run in real mode. The first user of the HMA among Microsoft products was Windows/286 2.1 in 1988, which introduced the HIMEM.SYS device driver. Starting with versions 5.0 of DR-DOS (1990) and of MS-DOS (1991), parts of the operating system could be loaded into HMA as well, freeing up to 46 KB of conventional memory. Other components, such as device drivers and TSRs, could be loaded into the upper memory area (UMA).
- DOS memory management
- Conventional memory
- Upper memory area
- Extended memory
- Expanded memory
- Unreal mode