High Memory Area
   HOME

TheInfoList



OR:

In
DOS memory management In IBM PC compatible computing, DOS memory management refers to software and techniques employed to give applications access to more than 640 kibibytes (640*1024 bytes) (KiB) of "conventional memory". The 640 KiB limit was specific to the IBM P ...
, the high memory area (HMA) is the
RAM Ram, ram, or RAM may refer to: Animals * A male sheep * Ram cichlid, a freshwater tropical fish People * Ram (given name) * Ram (surname) * Ram (director) (Ramsubramaniam), an Indian Tamil film director * RAM (musician) (born 1974), Dutch * ...
area consisting of the first 65520
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
s above the one megabyte in an IBM AT or compatible computer. In real mode, the segmentation architecture of the
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
8086 The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allowi ...
and subsequent processors identifies memory locations with a 16-bit segment and a 16-bit offset, which is resolved into a physical address via (segment) × 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, on an
80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non- multiplexed address and data buses and also the ...
and subsequent processors, 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 The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allowi ...
and
8088 The Intel 8088 ("''eighty-eighty-eight''", also called iAPX 88) microprocessor is a variant of the Intel 8086. Introduced on June 1, 1979, the 8088 has an eight-bit external data bus instead of the 16-bit bus of the 8086. The 16-bit registers a ...
processors, with only 1 MB of memory and only 20 
address line In computer architecture, a bus (shortened form of the Latin '' omnibus'', and historically also called data highway or databus) is a communication system that transfers data between components inside a computer, or between computers. This e ...
s, wrapped around at the 20th bit, so that address FFFF:0010 was equivalent to 0000:0000. To allow running existing DOS programs which relied on this feature to access
low memory In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system ...
on their newer IBM
PC AT The IBM Personal Computer/AT (model 5170, abbreviated as IBM AT or PC/AT) was released in 1984 as the fourth model in the IBM Personal Computer line, following the IBM PC/XT and its IBM Portable PC variant. It was designed around the Intel 80 ...
computers, IBM added special
circuitry An electronic circuit is composed of individual electronic components, such as resistors, transistors, capacitors, inductors and diodes, connected by conductive wires or traces through which electric current can flow. It is a type of electrical ...
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. Code suitable to be executed in the HMA must either be coded to be position-independent (using only relative references), be compiled to work at the specific addresses in the HMA (typically allowing only one or at most two pieces of code to share the HMA), or it must be designed to be paragraph boundary or even
offset relocatable Relocation is the process of assigning load addresses for position-dependent code and data of a program and adjusting the code and data to reflect the assigned addresses. Prior to the advent of multiprocess systems, and still in many embedded ...
(with all addresses being fixed up during load). Before code (or data) in the HMA can be addressed by the CPU, the corresponding driver must ensure that the HMA is mapped in. This requires that any such requests are tunneled through a stub remaining in memory outside the HMA, which would invoke the A20 handler in order to (temporarily) enable the
A20 gate The A20, or address line 20, is one of the electrical lines that make up the system bus of an x86-based computer system. The A20 line in particular is used to transmit the 21st bit on the address bus. A microprocessor typically has a number o ...
. If the driver does not exhibit any public data structures and only uses interrupts or calls already controlled by the underlying operating system, it might be possible to register the driver with the system in a way so that the system will take care of A20 itself thereby eliminating the need for a separate stub. The first user of the HMA among
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
products was
Windows/286 Windows 2.0 is a major release of Microsoft Windows, a family of graphical operating systems for personal computers developed by Microsoft. It was released to manufacturing on December 9, 1987, as a successor to Windows 1.0. The product incl ...
 2.1 in 1988, which introduced the
HIMEM.SYS HIMEM.SYS is a DOS device driver which allows DOS programs to store data in extended memory according to the Extended Memory Specification (XMS). The memory beyond the first 1 MB of address space is required by Windows 9x/ Me in order to load ...
device driver. Starting in 1990 with
Digital Research Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS and Gr ...
's DR DOS 5.0 (via HIDOS.SYS / BDOS=FFFF and CONFIG.SYS HIDOS=ON) and since 1991 with
MS-DOS 5.0 MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
(via
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
=HIGH
), parts of the operating system's BIOS and kernel could be loaded into the HMA as well, freeing up to 46 KB of
conventional memory In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system ...
. Other components, such as device drivers and TSRs, could at least be loaded into the
upper memory area In DOS memory management, the upper memory area (UMA) refers to memory between the addresses of 640  KB and 1024 KB ( 0xA0000–0xFFFFF) in an IBM PC or compatible. IBM reserved the uppermost 384 KB of the 8088 CPU's 1024 KB ...
(UMA), but not into the HMA. Under DOS 5.0 and higher, with DOS=HIGH, the system additionally attempted to move the disk buffers into the HMA. Under DR DOS 6.0 (1991) and higher, the disk buffers (via HIBUFFERS, and later also BUFFERSHIGH), parts of the command processor
COMMAND.COM COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
as well as several special self-relocating drivers like
KEYB KEYB (107.9 FM, "108 Key FM") is a radio station Radio broadcasting is transmission of audio (sound), sometimes with related metadata, by radio waves to radio receivers belonging to a public audience. In terrestrial radio broadcast ...
, NLSFUNC and SHARE could load into the HMA as well (using their /MH option), thereby freeing up even more conventional memory and upper memory for conventional DOS software to work with.
TASKMAX DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-DO ...
seems to have relocated parts of itself into the HMA as well. Novell's NLCACHE from
NetWare Lite NetWare Lite and Personal NetWare are a series of discontinued peer-to-peer local area networks developed by Novell for DOS- and Windows-based personal computers aimed at personal users and small businesses in the 1990s. NetWare Lite In 1991, N ...
and early versions of
NWCACHE NetWare Lite and Personal NetWare are a series of discontinued peer-to-peer local area networks developed by Novell for DOS- and Windows-based personal computers aimed at personal users and small businesses in the 1990s. NetWare Lite In 1991, N ...
from
Personal NetWare NetWare Lite and Personal NetWare are a series of discontinued peer-to-peer local area networks developed by Novell for DOS- and Windows-based personal computers aimed at personal users and small businesses in the 1990s. NetWare Lite In 1991, ...
and
Novell DOS 7 DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
could utilize the HMA as well. Under MS-DOS/PC DOS, a ca. 2 KB shared portion of COMMAND.COM can be relocated into the HMA, as well as DISPLAY.SYS bitmaps for prepared
codepage In computing, a code page is a character encoding and as such it is a specific association of a set of printable characters and control characters with unique numbers. Typically each number represents the binary value in a single byte. (In some co ...
s. Under
MS-DOS 6.2 MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
(1993) and higher, a ca. 5 KB portion of DBLSPACE.BIN/ DRVSPACE.BIN can coexist with DOS in the HMA (unless
DBLSPACE DriveSpace (initially known as DoubleSpace) is a disk compression utility supplied with MS-DOS starting from version 6.0 in 1993 and ending in 2000 with the release of Windows Me. The purpose of DriveSpace is to increase the amount of data the ...
/
DRVSPACE DriveSpace (initially known as DoubleSpace) is a disk compression utility supplied with MS-DOS starting from version 6.0 in 1993 and ending in 2000 with the release of Windows Me. The purpose of DriveSpace is to increase the amount of data the ...
/NOHMA is invoked). Under PC DOS 7.0 (1995) and
2000 File:2000 Events Collage.png, From left, clockwise: Protests against Bush v. Gore after the 2000 United States presidential election; Heads of state meet for the Millennium Summit; The International Space Station in its infant form as seen from S ...
,
DOSKEY DOSKEY is a command for DOS, IBM OS/2, Microsoft Windows, and ReactOS that adds command history, macro functionality, and improved editing features to the command-line interpreters COMMAND.COM and cmd.exe. History The command was included as ...
loads into the HMA (if available), and SHARE can be loaded into the HMA as well (unless its /NOHMA option is given). Under
MS-DOS 7.0 MS-DOS 7 is a real mode operating system for IBM PC compatibles. Unlike earlier versions of MS-DOS it was not released separately by Microsoft, but included in the Windows 9x family of operating systems. Windows 95 RTM reports to be MS-DOS 7.0, w ...
(1995) to 8.0 (2000), parts of the HMA are also used as a scratchpad to hold a growing data structure recording various properties of the loaded real-mode drivers.


See also

*
Low memory In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system ...
(the first 64 KB of memory) *
Extended memory In DOS memory management, extended memory refers to memory above the first megabyte (220 bytes) of address space in an IBM PC or compatible with an 80286 or later processor. The term is mainly used under the DOS and Windows operating systems. D ...
(XMS) *
Expanded memory In DOS memory management, expanded memory is a system of bank switching that provided additional memory to DOS programs beyond the limit of conventional memory (640 KiB). ''Expanded memory'' is an umbrella term for several incompatible tec ...
(EMS) *
Unreal mode In x86 computing, unreal mode, also big real mode, huge real mode, flat real mode, or voodoo mode is a variant of real mode, in which one or more segment descriptors has been loaded with non-standard values, like 32-bit limits allowing access to ...
*
Rebasing In computing, rebasing is the process of modifying data based on one reference to another. It can be one of the following: Shared libraries Rebasing is the process of creating a shared library image in such a way that it is guaranteed to use v ...
* Paragraph boundary relocation * Intra-segment offset relocation * SHELLHIGH (CONFIG.SYS directive) SIZE=xxxx parameter to override default HMA pre-allocation (DR-DOS 7.02 and higher only) * HMAREA (CONFIG.SYS directive) to specify the HMA segment (PTS-DOS only), similar to the DR DOS HIDOS.SYS /BDOS=xxxx parameter * Incomplete address decoding


Notes


References


Further reading

* * * {{DEFAULTSORT:High Memory Area X86 memory management DOS memory management