High memory area
   HOME

TheInfoList



OR:

In DOS memory management, 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 Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. The mode gets its name from the fact that addresses in real mode always correspond to real locations in memory. Real mode is characterized by a 20- bit ...
, 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 ser ...
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 (allo ...
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 The megabyte is a multiple of the unit byte for digital information. Its recommended unit symbol is MB. The unit prefix ''mega'' is a multiplier of (106) in the International System of Units (SI). Therefore, one megabyte is one million bytes o ...
(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 (allo ...
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 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 A motherboard (also called mainboard, main circuit board, mb, mboard, backplane board, base board, system board, logic board (only in Apple computers) or mobo) is the main printed circuit board (PCB) in general-purpose computers and other expand ...
to simulate the wrapping around. This circuit was a simple
logic gate A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...
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 (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 Stub or Stubb may refer to: Shortened objects and entities * Stub (stock), the portion of a corporation left over after most but not all of it has been bought out or spun out * Stub, a tree cut and allowed to regrow from the trunk; see Pollardi ...
remaining in memory outside the HMA, which would invoke the A20 handler in order to (temporarily) enable the A20 gate. 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, Washi ...
products was Windows/286 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 ...
's DR DOS 5.0 (via HIDOS.SYS /
BDOS CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Inc ...
=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 oper ...
(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 In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the b ...
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 licensed to Altus, Oklahoma Altus () is a city in and the county seat of Jackson County, Oklahoma, United States. The population was 19,813 at the 2010 census, a loss of 7.7 percent compared ...
, 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 Novell, Inc. was an American software and services company headquartered in Provo, Utah, that existed from 1980 until 2014. Its most significant product was the multi- platform network operating system known as Novell NetWare. Under the le ...
'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 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, N ...
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 (1993) and higher, a ca. 5 KB portion of
DBLSPACE.BIN DriveSpace (initially known as DoubleSpace) is a disk compression utility supplied with MS-DOS starting from MS-DOS 6.0, version 6.0 in 1993 and ending in 2000 with the release of Windows Me. The purpose of DriveSpace is to increase the amount ...
/ DRVSPACE.BIN can coexist with DOS in the HMA (unless DBLSPACE/ DRVSPACE /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 ...
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 8 (eight) is the natural number following 7 and preceding 9. In mathematics 8 is: * a composite number, its proper divisors being , , and . It is twice 4 or four times 2. * a power of two, being 2 (two cubed), and is the first number of ...
(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 (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 *
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 Memory-mapped I/O (MMIO) and port-mapped I/O (PMIO) are two complementary methods of performing input/output (I/O) between the central processing unit (CPU) and peripheral devices in a computer. An alternative approach is using dedicated I/O p ...


Notes


References


Further reading

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