Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
High memory area
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|RAM area of an IBM AT or compatible computer}} {{Distinguish|High memory}} {{Use dmy dates|date=May 2019|cs1-dates=y}} {{Use list-defined references|date=December 2021}} [[File:IBM PC Memory areas.svg|thumb|The high memory area is highlighted.]] In [[DOS memory management]], the '''high memory area''' ('''HMA''') is the [[random-access memory|RAM]] area consisting of the first 65520 [[byte]]s above the one megabyte in an [[IBM]] [[IBM AT|AT]] or compatible computer. In [[real mode]], the [[x86 memory segmentation|segmentation architecture]] of the [[Intel]] [[Intel 8086|8086]] 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) (2<sup>20</sup> bytes) of memory, segment:offset addresses at <code>FFFF:0010</code> and beyond reference memory beyond 1 MB (<code>FFFF0 + 0010 = 100000</code>). So, on an [[Intel 80286|80286]] 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—<code>FFFF:0000 (0xFFFF0)</code> to <code>FFFF:FFFF (0x10FFEF)</code>. The Intel [[Intel 8086|8086]] and [[Intel 8088|8088]] processors, with only 1 MB of memory and only 20 [[address line]]s, wrapped around at the 20th bit, so that address <code>FFFF:0010</code> was equivalent to <code>0000:0000</code>.<ref name="Paul_2002_HMA"/> To allow running existing DOS programs which relied on this feature to access [[low memory]] 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 line|A20]], from the rest of the motherboard. This gate could be controlled, initially through the [[keyboard controller (computing)|keyboard controller]], to allow running programs which wanted to access the entire RAM.<ref name="Paul_2002_HMA"/> So-called [[A20 handler]]s could control the addressing mode dynamically,<ref name="Paul_2002_HMA"/> thereby allowing programs to load themselves into the 1024–1088 KB region and run in real mode.<ref name="Paul_2002_HMA"/> Code suitable to be executed in the HMA must either be coded to be [[position-independent code|position-independent]] (using only relative references),<ref name="Ingenoso_1998"/><ref name="Paul_2002_HMA"/> 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<!-- with one loaded at the top and the other at the bottom of the HMA -->), or it must be designed to be [[paragraph boundary relocatable|paragraph boundary]] or even [[offset relocatable]] (with all addresses being fixed up during load).<ref name="Ingenoso_1998"/><ref name="Paul_2002_HMA"/> 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 [[DOS memory stub|stub]] remaining in memory outside the HMA, which would invoke the A20 handler in order to (temporarily) enable the [[A20 gate]].<ref name="Ingenoso_1998"/><ref name="Paul_2002_HMA"/> 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.<ref name="Paul_2002_HMA"/><ref group="nb" name="NB_Backdoor"/> The first user of the HMA among [[Microsoft]] products was [[Windows/286]] 2.1 in 1988, which introduced the [[HIMEM.SYS]] device driver. Starting in 1990 with [[Digital Research]]'s [[DR DOS 5.0]]<ref name="Dryfoos_1991_DOS5"/> (via <kbd>HIDOS.SYS /[[BDOS (DOS)|BDOS]]=FFFF</kbd><ref name="Novell_1994_DR6"/> and [[CONFIG.SYS]] <kbd>[[HIDOS (CONFIG.SYS directive)|HIDOS]]=ON</kbd>) and since 1991 with [[MS-DOS 5.0]]<ref name="Dryfoos_1991_DOS5"/> (via <kbd>[[DOS (CONFIG.SYS directive)|DOS]]=HIGH</kbd>), parts of the operating system's [[DOS BIOS|BIOS]] and kernel could be loaded into the HMA as well,<ref name="Dryfoos_1991_DOS5"/><ref name="Schulman_1994_Undocumented-DOS"/> freeing up to 46 KB of [[conventional memory]].<ref name="Paul_2002_HMA"/> Other components, such as device drivers and [[terminate-and-stay-resident program]]s (TSRs), could at least be loaded into the [[upper memory area]] (UMA), but not into the HMA. Under DOS 5.0 and higher, with <kbd>DOS=HIGH</kbd>, the system additionally attempted to move the disk buffers into the HMA.<ref name="Schulman_1994_Undocumented-DOS"/> Under [[DR DOS 6.0]] (1991) and higher, the disk buffers (via <kbd>[[HIBUFFERS (CONFIG.SYS directive)|HIBUFFERS]]</kbd>, and later also <kbd>[[BUFFERSHIGH (CONFIG.SYS directive)|BUFFERSHIGH]]</kbd>), parts of the command processor [[COMMAND.COM]] as well as several special [[self-relocating]] drivers like [[KEYB (DOS command)|KEYB]], [[NLSFUNC (DOS command)|NLSFUNC]] and [[SHARE (DOS command)|SHARE]] could load into the HMA as well (using their <kbd>/MH</kbd><!-- KEYB/NLSFUNF/SHARE would attempt to load high by default, but the switch could be used to control the behaviour --> option), thereby freeing up even more conventional memory and upper memory for conventional DOS software to work with.<ref name="Paul_2002_HMA"/> [[TASKMAX]] seems to have relocated parts of itself into the HMA as well.<ref name="RBIL_2000_HMA"/><ref name="Paul_2002_MSDOS7"/> [[Novell]]'s [[Novell NLCACHE|NLCACHE]] from [[NetWare Lite]]<!-- at least in NetWare Lite 1.1 (1992), not sure about NWL 1.0 from 1991 --> and early<!-- beta versions from 1993 --> versions of [[Novell NWCACHE|NWCACHE]] from [[Personal NetWare]]<!-- pre-1.0 --> and [[Novell DOS 7]] could utilize the HMA as well.<ref name="Paul_1997_NWDOSTIP"/><ref name="Paul_2001_NWDOSTIP"/><ref name="Paul_2002_MSDOS7"/> Under MS-DOS/PC DOS, a ca. 2 KB shared portion of COMMAND.COM can be relocated into the HMA,<ref name="Chappell_1994_Internals"/> as well as [[DISPLAY.SYS]] bitmaps for prepared [[codepage]]s.<ref name="Chappell_1994_Internals"/><ref name="Paul_2002_DISPLAY"/> Under [[MS-DOS 6.2]]<!-- not 6.0 --> (1993) and higher, a ca. 5 KB portion of [[DBLSPACE.BIN]]/[[DRVSPACE.BIN]] can coexist with DOS in the HMA (unless [[DBLSPACE]]/[[DRVSPACE]] <kbd>/NOHMA</kbd> is invoked).<ref name="Schulman_1994_Undocumented-DOS"/><ref name="Cooper_2002_MS-DOS"/> Under [[PC DOS 7.0]] (1995) and [[PC DOS 2000|2000]], [[DOSKEY]] loads into the HMA (if available),<ref name="Brooks_2014_HMA"/> and SHARE can be loaded into the HMA as well (unless its <kbd>/NOHMA</kbd> option is given).<ref name="Brooks_2014_HMA"/> Under [[MS-DOS 7.0]] (1995) to [[MS-DOS 8.0|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.<ref name="Paul_2002_MSDOS7"/><ref name="Sweger_2002"/><ref name="Paul_2002_HMA7"/> == See also == * [[Low memory]] (the first 64 KB<!-- not 640 KB! --> of memory) * [[Extended memory]] (XMS) * [[Expanded memory]] (EMS) * [[Unreal mode]] * [[Rebasing]] * [[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)<ref name="Paul_1997_OD-A3"/> * [[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 == {{Reflist|group="nb"|refs= <ref group="nb" name="NB_Backdoor">A stub is not necessary for the resident system extensions [[SHARE (DOS command)|SHARE]] and [[NLSFUNC (DOS command)|NLSFUNC]] under [[DR DOS 6.0]] and higher, because they only hook the multiplex interrupt INT 2Fh and can therefore utilize a backdoor interface to hook into the interrupt chain in [[kernel space]] so that the kernel's gate [[A20 handler]] will provide the functionality of the stub.</ref> }} == References == {{Reflist|refs= <ref name="Paul_2002_HMA">{{cite newsgroup |title=Treiber dynamisch nachladen (Intra-Segment-Offset-Relokation zum Laden von TSRs in die HMA) |trans-title=Loading drivers dynamically (Intra-segment offset relocation to load TSRs into the HMA) |author-first=Matthias R. |author-last=Paul |date=2002-02-02 |newsgroup=de.comp.os.msdos |language=de |url=https://groups.google.com/d/msg/de.comp.os.msdos/tdvpBoMVN6A/a_zqDxGk22IJ |access-date=2017-07-02 |url-status=live |archive-url=https://archive.today/20170909085006/https://groups.google.com/forum/%23!msg/de.comp.os.msdos/tdvpBoMVN6A/a_zqDxGk22IJ |archive-date=2017-09-09}} (NB. Gives a comprehensive overview on the history and "nature" of the HMA and the non-obvious design constraints to be observed when developing resident system extensions to be loaded into the HMA. It also describes how to address these issues using [[DOS memory stub|stub]]s, backdoors, and intra-segment offset relocation, a method used by [[DR-DOS]] drivers capable of relocating into the HMA and similar to a (more sophisticated) method used as the basis for the [[dynamic dead code elimination]] in the author's FreeKEYB driver.)</ref> <ref name="Paul_2002_MSDOS7">{{cite web |title=[fd-dev] HMA access from TSR |author-first=Matthias R. |author-last=Paul |date=2002-04-10 |work=freedos-dev |url=https://marc.info/?l=freedos-dev&m=101846072627263&w=4 |access-date=2017-09-09 |url-status=live |archive-url=https://archive.today/20170909125117/https://marc.info/?l=freedos-dev&m=101846072627263&w=4 |archive-date=2017-09-09 |quote=[…] [[MS-DOS 7.0]]+ adds INT 21h/AX=4A03h and INT 21h/AX=4A04h. [[RBIL]]61 INT 21h/AH=52h has some info on the MS-DOS 7.0+ HMA MCB chain […] HMA relocation for TSRs makes much sense for [[DR-DOS]]: Although you can load large parts of the [[BIOS (DOS)|BIOS]] and [[BDOS (DOS)|BDOS]], the resident part of the shell, the [[BUFFERS (CONFIG.SYS directive)|BUFFERS]], and DR-DOS TSRs like [[SHARE (DOS command)|SHARE]], [[KEYB (DOS command)|KEYB]], and [[NLSFUNC (DOS command)|NLSFUNC]] (and in some issues parts of TASKMGR and [[NWCACHE]]) into the HMA, there is usually still free space available, typically around 10 Kb (up to ca. 20 Kb when you use a 3rd party shell). It also makes sense for [[MS-DOS 5.0]] - [[MS-DOS 6.22|6.22]] and [[PC DOS]] up to [[PC DOS 2000|2000]], which typically leave 4 - 7 Kb of the HMA memory unused (SHARE, KEYB, and NLSFUNC cannot load into the HMA, but [[DBLSPACE]] and [[HIMEM]] can to some extent). Available HMA space can be rather tight with [[MS-DOS 7.0]]+, since this issue introduced a new and for the most part undocumented RMD data structure usually located in the HMA. The kernel collects and records configuration and Real Mode Driver data during boot (type of driver, interrupts hooked by driver, [[CONFIG.SYS]] line of invocation, etc.) and stores this information in an […] complicated […] and […] growing data structure. Presumably this info is meant to be used by the Windows core to get a better picture of the loaded Real Mode drivers instead of treating DOS as a monolithic block, or even […] attempt to unhook or unload some of them, however, it is only used to a very limited extent (for example you can see some of the info reflected in the log files created on Windows 9x startup, and some parts of the Windows configuration manager also make use of it), leaving room for speculation much beyond the technical side - in particular because nothing of the interesting stuff is documented… […]}}</ref> <ref name="Paul_2002_HMA7">{{cite newsgroup |title=Suche freien Speicherbereich unterhalb von 1 MB, der nicht von OS überschrieben wird |author-first=Matthias R. |author-last=Paul |date=2002-08-13 |newsgroup=de.comp.lang.assembler.x86 |language=de |url=https://groups.google.com/d/msg/de.comp.lang.assembler.x86/boKnIpqPl-Q/ZLDFDX9E1e0J |access-date=2017-09-03 |url-status=live |archive-url=https://archive.today/20170904001428/https://groups.google.com/forum/%23!msg/de.comp.lang.assembler.x86/boKnIpqPl-Q/ZLDFDX9E1e0J |archive-date=2017-09-04}}</ref> <ref name="Dryfoos_1991_DOS5">{{cite web |title=MS-DOS 5.0 Development Post-Mortem Report |date=1991-09-18 |orig-date=1991-07-19 |editor-first=Mike |editor-last=Dryfoos |publisher=[[Microsoft]] |type=mail as court document |id=MS-PCA1179169 (MS-PCA1179159-MS-PCA1179191). MS7020988 (MS7020978-MS7021010). Depo. Ex. 1109. [[Comes v Microsoft]] Plaintiff's Exhibit 3473. C<!-- or O? -->A.No.2:96CV645B<!-- or E? --> Plaintiff's Exhibit 477. |page=10 |url=http://www.windowswiki.info/wp-content/uploads/codenames/PX03473.pdf |access-date=2019-07-22 |url-status=live |archive-url=https://web.archive.org/web/20190402223233/http://www.windowswiki.info/wp-content/uploads/codenames/PX03473.pdf |archive-date=2019-04-02 |quote=[…] One of the most important stimulanta for adding features was competitive pressure from [[DR DOS 5.0|DRDOS 5.0]], which we first learnt of in the spring of 1990. The DRDOS feature set led us to add [[upper memory block|UMB]] support, task swapping, and Undelete. […] Considerable amounts of the team's management attention was diverted to new features such as file transfer software, undelete and network installation […] Eventually this situation reached a crisis point at the end of July 1990, and, led by [[Brad Silverberg|BradS]], the team's management spent an arduous series of meetings nailing down a schedule and process for closing the project down […]}} (1+32 pages)</ref> <ref name="Schulman_1994_Undocumented-DOS">{{cite book |author-first1=Andrew |author-last1=Schulman |author-first2=Ralf D. |author-last2=Brown |author-link2=Ralf D. Brown |author-first3=David |author-last3=Maxey |author-first4=Raymond J. |author-last4=Michels |author-first5=Jim |author-last5=Kyle |title=Undocumented DOS: A programmer's guide to reserved MS-DOS functions and data structures - expanded to include MS-DOS 6, Novell DOS and Windows 3.1 |series=The Andrew Schulman Programming Series |publisher=[[Addison Wesley Publishing Company]] |editor-first=Andrew |editor-last=Williams |edition=1st printing, 2nd |date=1994 |orig-date=November 1993<!-- 1st printing --> |isbn=0-201-63287-X |id={{ISBN|978-0-201-63287-3}} |location=Reading, Massachusetts, USA |pages=42, 349–350, 437–438 |url=https://archive.org/details/undocumenteddosp00andr_0 |url-access=registration}} (xviii+856+vi pages, 3.5"-floppy [https://web.archive.org/web/20200223185605/https://gopher.tildeverse.org/gopher.viste.fr/9/programming/PC/DOS/Undocumented%20DOS/Undocumented%20DOS%202nd%20edition.zip]) Errata: [https://web.archive.org/web/20190417215556/http://www.cs.cmu.edu/afs/cs/user/ralf/pub/books/UndocumentedDOS/errata.ud2][https://web.archive.org/web/20190417212906/https://www.pcjs.org/pubs/pc/programming/Undocumented_DOS/#errata-2nd-edition]</ref> <ref name="Brooks_2014_HMA">{{cite web |title=This is a detailed list of the changes I made in PC DOS 7.0 |date=2014 |author-first=Vernon C. |author-last=Brooks |work=PC DOS Retro |url=https://sites.google.com/site/pcdosretro/dosmods |access-date=2020-02-18 |url-status=live |archive-url=https://web.archive.org/web/20200218150946/https://sites.google.com/site/pcdosretro/dosmods |archive-date=2020-02-18 |quote=[…] [[DOSKEY.COM]] […] Move code to HMA if available. […] [[SHARE.EXE]] […] Move code to HMA if available and added /NOHMA option force loading low. […]}}</ref> <ref name="RBIL_2000_HMA">{{cite web |title=Format of HMA Memory Block (DR DOS 6.0 kernel loaded in HMA) |work=[[RBIL]] |date=2000 |url=http://faydoc.tripod.com/structures/15/1588.htm |access-date=2020-02-18 |url-status=live |archive-url=https://web.archive.org/web/20200218224303/http://faydoc.tripod.com/structures/15/1588.htm |archive-date=2020-02-18}}</ref> <ref name="Cooper_2002_MS-DOS">{{cite book |title=Using MS-DOS 6.22 |author-first=Jim |author-last=Cooper |edition=special 3rd |publisher=[[Que Publishing]] |date=2002 |isbn=0-78972573-8 |id={{ISBN|978-0-78972573-8}} |page=669 |url=https://books.google.com/books?id=u7oN-5y7nGsC&pg=PA669 |access-date=2020-02-18 |url-status=live |archive-url=https://web.archive.org/web/20200218235235/https://books.google.de/books?id=u7oN-5y7nGsC&pg=PA669&lpg=PA669&dq=PC+DOS+/NOHMA&source=bl&ots=j6q5YKPvuZ&sig=ACfU3U3d7o_AIeo7d3lmFOKFOYKYfkGIiA&hl=de&sa=X&ved=2ahUKEwi0qa2Nn9vnAhVRLewKHf_lCqQQ6AEwAXoECAoQAQ#v=onepage&q=PC%20DOS%20%2FNOHMA&f=false |archive-date=2020-02-18}}</ref> <ref name="Chappell_1994_Internals">{{cite book |title=DOS Internals |author-first=Geoff |author-last=Chappell |editor-first1=Andrew |editor-last1=Schulman |editor-first2=Amorette |editor-last2=Pedersen |date=January 1994 |edition=1st printing, 1st |series=The Andrew Schulman Programming Series |publisher=[[Addison Wesley Publishing Company]] |isbn=978-0-201-60835-9 |id={{ISBN|0-201-60835-9}} |pages=4, 21, 100–106, 127–129}} (xxvi+738+iv pages, 3.5"-floppy [https://web.archive.org/web/20190421200111/https://gopher.tildeverse.org/gopher.viste.fr/9/programming/PC/DOS/DOS%2520Internals/DOS_Internals.zip][https://web.archive.org/web/20200222111608/https://www.pcjs.org/pubs/pc/programming/DOS_Internals/]) Errata: [https://web.archive.org/web/20200222111742/http://www.geoffchappell.com/notes/dos/internals/][https://web.archive.org/web/20200222111853/https://gopher.tildeverse.org/gopher.viste.fr/1/programming/PC/DOS/DOS%2520Internals/crtdrvr][https://web.archive.org/web/20200222111945/https://gopher.tildeverse.org/gopher.viste.fr/1/programming/PC/DOS/DOS%2520Internals/xmswatch]</ref> <ref name="Paul_1997_NWDOSTIP">{{cite book |title=NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |chapter=II.4. Undokumentierte Eigenschaften externer Kommandos |series=MPDOSTIP |author-first=Matthias R. |author-last=Paul |date=1997-07-30 |orig-date=1994-05-01 |edition=3 |language=de |url=http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |access-date=2012-01-11 |url-status=live |archive-url=https://web.archive.org/web/20161105172944/http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |archive-date=2016-11-05}} (NB. <code>NWDOSTIP.TXT</code> is a comprehensive work on [[Novell DOS 7]] and [[OpenDOS 7.01]], including the description of many undocumented features and internals. It is part of the author's yet larger <code>MPDOSTIP.ZIP</code><!-- still named TIPS_MP.ZIP between 1991 and 1996-11 --> collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the file.) [https://web.archive.org/web/20190601152204/https://www.sac.sk/download/text/mpdostip.zip<!-- A yet older version 155 from 1997-05-13 of the 1997-07-15 distribution archive. -->]</ref> <ref name="Paul_2001_NWDOSTIP">{{cite book |title=NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |chapter=II.4. Undokumentierte Eigenschaften externer Kommandos |series=MPDOSTIP |author-first=Matthias R. |author-last=Paul |date=2001-04-09 |edition=3 |language=de}}</ref> <ref name="Paul_1997_OD-A3">{{cite web |author-first=Matthias R. |author-last=Paul |title=Caldera OpenDOS 7.01/7.02 Update Alpha 3 IBMBIO.COM - README.TXT and BOOT.TXT - A short description of how OpenDOS is booted |url=http://www.uni-bonn.de/~uzs180/download/ibmbioa3.zip |date=1997-10-02 |orig-date=1997-09-29 |access-date=2009-03-29 |url-status=dead |archive-url=https://web.archive.org/web/20031004074600/http://www-student.informatik.uni-bonn.de/~frinke/ibmbioa3.zip |archive-date=2003-10-04}} [https://web.archive.org/web/20181225154705/http://mirror.macintosharchive.org/max1zzz.co.uk/+Windows%20&%20DOS/DOS/System/Novell/Support/Bins/Op702src.zip<!-- Op702src.zip is an unofficial renamed distribution of the ibmbioa3.zip file -->]</ref> <ref name="Paul_2002_DISPLAY">{{cite web |title=[fd-dev] DISPLAY CON? |author-first=Matthias R. |author-last=Paul |date=2002-12-04 |work=freedos-dev |url=https://marc.info/?l=freedos-dev&m=103902610816421&w=2 |access-date= |url-status=live |archive-url=https://web.archive.org/web/20211208192532/https://marc.info/?l=freedos-dev&m=103902610816421&w=2 |archive-date=2021-12-08 |quote=[…] some issues of DISPLAY.SYS (of [[PC DOS 7]]/[[PC DOS 2000|2000]], for example) store the currently unused fonts in [[XMS memory]]. Some earlier issues of MS-DOS/PC DOS [[DISPLAY.SYS]] seem to have had a facility to store them in the HMA […]}}</ref> <ref name="Sweger_2002">{{cite web |title=ANSIPLUS and Windows |author-first=Kristofer |author-last=Sweger |date=2007 |orig-date=2002-07-15 |url=http://www.sweger.com/ansiplus/TechNotesWindows.html |access-date=2021-11-28 |url-status=live |archive-url=https://web.archive.org/web/20211128093722/http://www.sweger.com/ansiplus/TechNotesWindows.html |archive-date=2021-11-28 |quote=[…] ANSIPLUS's code cannot be loaded to the HMA under [[MS-DOS 7]] (Windows 9x only) because there apparently is not enough unused HMA memory available. […]}}</ref> <ref name="Ingenoso_1998">{{cite book |title=Making Code Work Better - How to minimize the size of 80x86 code and sometimes make it faster |chapter=Chapter 13 - The A20 gate and the HMA |author-first=Tony |author-last=Ingenoso |date=1998-12-20 |type=e-book |url=http://www.bobeager.uk/tonyingenoso/chap13.htm |access-date=2019-11-18 |url-status=live |archive-url=https://web.archive.org/web/20191118001750/http://www.bobeager.uk/tonyingenoso/chap13.htm |archive-date=2019-11-18}}</ref> <ref name="Novell_1994_DR6">{{cite web |title=Third Party Memory Managers |author-first1=K. |author-last1=Banta |author-first2=D. |author-last2=Partridge |work=[[DR DOS 6.0]] |type=Technical information document |id=TID800074 (replaces FYI-M-1303) |version=Revision A |date=1994-08-18 |publisher=[[Novell]] |url=https://ftp.zx.net.nz/pub/archive/novell/drdos/6/DR6TID/800074.TXT |access-date=2021-12-15 |url-status=live |archive-url=https://web.archive.org/web/20211215193532/https://ftp.zx.net.nz/pub/archive/novell/drdos/6/DR6TID/800074.TXT |archive-date=2021-12-15}}</ref> }} ==Further reading== * {{cite web |title=Who needs the address wraparound, anyway? |date=2011-09-13 |author-first=Michal |author-last=Necasek |work=OS/2 Museum |url=http://www.os2museum.com/wp/who-needs-the-address-wraparound-anyway/ |access-date=2020-02-19 |url-status=live |archive-url=https://web.archive.org/web/20200219004644/http://www.os2museum.com/wp/who-needs-the-address-wraparound-anyway/ |archive-date=2020-02-19 |quote=[…] [[86-DOS]], and hence [[PC DOS]]/[[MS-DOS]], used a clever trick. The byte at offset 5 of the [[Program Segment Prefix|PSP]] contained a far call opcode (9Ah); the word at offset 6 of the PSP contained the appropriate value to indicate program segment size, and also the offset part of the far call. The word at offset 8, which served as the segment part of the far call, was crafted such that when combined with the offset, it would wrap around (a well understood feature of the [[8086]] CPU) and point to address 0:C0h, which contains interrupt vector 30h. […] the [[CALL 5 (DOS)|CALL 5]] interface works even in DOS emulation under Windows NT and OS/2, and those systems most certainly cannot run with the [[A20 line]] disabled. How does that work then? […] Rather than chopping off address bits, the system mirrors the five bytes at 0:C0h at 1000C0h. The same technique had been in fact used in DOS 5 and above running with <kbd>[[DOS (CONFIG.SYS directive)|DOS]]=HIGH</kbd>. In that case, DOS makes sure that linear address 1000C0h contains the appropriate far call. […]}} * {{cite web |title=High Memory Area (HMA) |work=The PC Guide |version=2.2.0 |date=2001-04-17 |orig-date=1997 |author-first=Charles M. |author-last=Kozierok |url=http://www.pcguide.com/ref/ram/logicHMA-c.html |url-status=dead |access-date=15 October 2006 |archive-url=https://web.archive.org/web/20061016143339/http://www.pcguide.com/ref/ram/logicHMA-c.html |archive-date=2006-10-16}} * {{cite web |title=Re: [fd-dev] ANNOUNCE: CuteMouse 2.0 alpha 1 |author-first=Matthias R. |author-last=Paul |work=freedos-dev |date=2002-04-11 |url=https://marc.info/?l=freedos-dev&m=101853130816682&w=2 |access-date=2020-02-21 |url-status=live |archive-url=https://web.archive.org/web/20200221130238/https://marc.info/?l=freedos-dev&m=101853130816682&w=2 |archive-date=2020-02-21 |quote=[…] in case of such [[fat pointer|mangled pointer]]s […] many years ago Axel<!-- Axel C. Frinke --> and I were thinking about a way how to use *one* entry point into a driver for multiple interrupt vectors (as this would save us a lot of space for the multiple entry points and the more or less identical startup/exit framing code in all of them), and then switch to the different interrupt handlers internally. For example: 1234h:0000h […] 1233h:0010h […] 1232h:0020h […] 1231h:0030h […] 1230h:0040h […] all point to exactly the same entry point. If you hook INT 21h onto 1234h:0000h and INT 2Fh onto 1233h:0010h, and so on, they would all go through the same "loophole", but you would still be able to distinguish between them and branch into the different handlers internally. Think of a "compressed" entry point into a [[A20 line|A20]] stub for HMA loading. This works as long as no program starts doing segment:offset magics. […] Contrast this with the opposite approach to have multiple entry points (maybe even supporting [[IBM]]'s [[IBM Interrupt Sharing Protocol|Interrupt Sharing Protocol]]), which consumes much more memory if you hook many interrupts. […] We came to the result that this would most probably not be save in practise because you never know if other drivers normalize or denormalize pointers, for what reasons ever. […]}} {{DEFAULTSORT:High Memory Area}} [[Category:X86 memory management]] [[Category:DOS memory management]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Distinguish
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Use list-defined references
(
edit
)