High memory area

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Not to be confused with High memory.
The high memory area is highlighted.

In DOS memory management, the high memory area (HMA) is the RAM area consisting of the first 64 kilobytes (216 bytes) (KB), minus 16 bytes, of the extended memory on an IBM AT or compatible microcomputer.

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 0000:0000.

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).

See also[edit]

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.