home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / MISC / W95-11D.ZIP / REGIONS.TXT < prev    next >
Encoding:
Text File  |  2000-09-26  |  25.4 KB  |  545 lines

  1.                AXCEL216's MAX Speeed
  2.         MS-DOS MEMORY TYPES, ARCHITECTURE, REGIONS + MAPPING
  3.  
  4.  
  5.  
  6.  
  7. NOTES:    * For memory management guide + optimization tips *READ* MEMORY.TXT
  8.     (included).
  9.     * For DOS + Windows extended + expanded memory managers technical
  10.     details see EMM386.TXT (included).
  11.     * For abbreviations + terms explanations see GLOSSARY.TXT (included).
  12.     * For Microsoft EMM386.EXE + HIMEM.SYS undocumented parameters see
  13.     related topics in SECRETS.TXT (included).
  14.  
  15. Memory mapping resources on the Internet:
  16. - PC Guide - Logical Memory Layout:
  17. http://www.pcguide.com/ref/ram/logic.htm
  18. - Microsoft XMS 3.0 Specification [XMS30.TXT, 163 KB, free]:
  19. ftp://ftp.microsoft.com/softlib/mslfiles/XMS.EXE
  20. - PC Memory Tutorial:
  21. http://cma.zdnet.com/book/upgraderepair/ch07/ch07.htm
  22.  
  23.  
  24. REGIONS.TXT Contents:
  25.  
  26.  
  27. I.   MS-DOS MEMORY TYPES + ARCHITECTURE:
  28.     1. Conventional Memory [below the 1st MegaByte]
  29.     2. Extended and Expanded Memory: [above the 1st MegaByte]
  30.         A. Extended Memory ["longer"]
  31.         B. Expanded Memory ["fatter"]
  32. II.  MS-DOS UPPER MEMORY REGIONS + MAPPING
  33. III. MY ADDENDUM ON UPPER MEMORY REGIONS MANAGEMENT
  34. ______________________________________________________________________________
  35.  
  36.  
  37.  
  38.           I. MS-DOS MEMORY TYPES + ARCHITECTURE
  39.  
  40.  
  41.  
  42. I compiled this topic based mostly on Raymond Dunn's public domain USENET
  43. article [EXT-RAM.TXT, 5 KB]:
  44. http://www.simtel.net/pub/simtelnet/msdos/info/ext_ram.zip
  45. and included current PC memory specifications and technology updates.
  46. My most sincere *THANKS* go to Raymond for his valuable contribution to these
  47. files!
  48.  
  49.  
  50. 1. Conventional Memory [below the 1st MegaByte]
  51.  
  52.  
  53. Memory is measured in Bytes. Each Byte contains 8 bits. The bit (binary digit)
  54. is the basic unit of (digital) information, and can be either 0 or 1.
  55. Computer data (i.e. memory or disk capacity) is measured using the hexadecimal
  56. system (base of 16). Multiples for Byte:
  57. - 1 KiloByte = 1,024 Bytes.
  58. - 1 MegaByte = 1,024 KB = 1,048,576 B.
  59. - 1 GigaByte = 1,024 MB = 1,048,576 KB = 1,073,741,824 B.
  60. - 1 TeraByte = 1,024 GB = 1,048,576 MB = 1,073,741,824 KB = etc...
  61. Memory addresses and ranges use the hexadecimal (hex) notation: numbers 0 to 9
  62. and letters A to F, allowing 16 possible values for each hex digit.
  63.  
  64. MS-DOS (MicroSoft Disk Operating System) was designed around the original 8088
  65. Intel CPU which was [and still is :(] able to address only up to 1 MegaByte
  66. (MB) of memory (RAM), called "Conventional memory", and located between 0K and
  67. 1M [1 MB = 64 pages]. This space is divided into two major blocks:
  68. - 0K - 640K [640 KB = 40 pages] = "Low (DOS) RAM", used by software: MS-DOS
  69. core/system, I/O, programs, drivers, TSRs etc.
  70. - 640K - 1M [384 KB = 24 pages] = "High RAM", used by hardware: ROM, BIOS,
  71. Video, HDC etc.
  72. Conventional memory can be divided into 64 pages of 16K each, refered to as
  73. page 0, page 1, page 2, and so on, or by their hexadecimal segment addresses:
  74. page 0 at segment 0, page 1 at segment 0400, page 2 at segment 0800 etc.
  75. Examples of page numbers with corresponding segment and linear addresses:
  76.  
  77. Page      Segment Address    Linear Address
  78. ----------------------------------------------
  79. 0      0000            0K
  80. 1      0400            16K
  81. 2      0800            32K
  82. 4      1000            64K
  83. 8      2000            128K
  84. 12      3000            196K
  85. 40      A000            640K
  86. 63      FC00            1008K
  87.  
  88. 1st MegaByte memory map [0000 - FFFF = 1M] usage on a typical X86 PC:
  89.  
  90. Address Range    Used by            Size
  91. ----------------------------------------------
  92. 0000 - 0FFF    Low DOS RAM        640 KB
  93. A000 - AFFF    VGA graphics        64 KB
  94. B000 - B7FF    Monochrome video    32 KB
  95. B800 - BFFF    VGA text        32 KB
  96. C000 - C7FF    Video and HDC ROM    32 KB
  97. C800 - CFFF    Available to DOS    32 KB
  98. D000 - DFFF    EMS page frame        64 KB
  99. E000 - EFFF    Available to DOS    64 KB
  100. F000 - FFFF    BIOS and FDC ROM    64 KB
  101.  
  102. To see a graphical map of all modules/programs/drivers using the memory below
  103. the 1st MegaByte, their sizes, the free memory status with specific hex
  104. address locations and the available memory blocks, run:
  105. MSD
  106. and press M.
  107. To see a detailed list of all modules/drivers using the memory below the 1st
  108. MegaByte, their sizes and the free memory status with specific hex address
  109. locations, run:
  110. MEM /A /D /P
  111. To see a classified list of all programs/drivers using the memory below the
  112. 1st MegaByte, their sizes, the free memory summary and the available memory
  113. blocks, run:
  114. MEM /A /C /P
  115. These commands can be executed either from the native/real MS-DOS mode or in a
  116. DOS box/session within MS Windows GUI.
  117. The undocumented "MEM /A" command line parameter is explained in "MEM.EXE
  118. HIDDEN PARAMETERS" in SECRETS.TXT (included).
  119. For more details take a look at:
  120. * These MSD (MicroSoft Diagnostics utility) reports in:
  121. - MSD95.TXT (part of W95-11D.ZIP) = Win9x/DOS7 users.
  122. - MSD62.TXT (part of W31-11D.ZIP) = Win31/DOS6 users.
  123. * These "MEM /A /C /P" stats in:
  124. - DOS95MEM.TXT and WIN95MEM.TXT (both part of W95-11D.ZIP) = Win9x/DOS7 users.
  125. - MEM62.TXT and MEM31.TXT (both part of W31-11D.ZIP) = Win31/DOS6 users.
  126.  
  127. To comply with the "industry standard" IBM PC/AT architecture, this memory is
  128. organized as follows:
  129.  
  130.      1M +---------------+ 0xFFFF    \        \
  131.     | System BIOS    |        |        |
  132.     | ROM and    |        |        |
  133.     | FDC ROM    |        |        |
  134.    960K +---------------+ 0xF000    |        |
  135.     | Option ROM,    |        |        |
  136.     | PnP BIOS ROM    |        |        |
  137.     | & Option RAM    |        |        |
  138.    816K +---------------+ 0xCC00    | High RAM    |
  139.     | HDC BIOS RAM    |        | 384 KB    |
  140.    800K +---------------+ 0xC800    | [640K - 1M]    |
  141.     | Video BIOS    |        | A000 - FFFF    |
  142.     | ROM, Option    |        |        | Conventional RAM
  143.     | ROM and RAM    |        |        | 1 MB
  144.    768K +---------------+ 0xC000    |        | [0K - 1M]
  145.     | Video RAM:    |        |        | 0000 - FFFF
  146.     | VGA color    |        |        |
  147.     | and        |        |        |
  148.     | monochrome    |        /        |
  149.    640K +---------------+ 0xA000 \            |
  150.     |        |     |            |
  151.     | Base        |     |            |
  152.     | System    |     | Low (DOS) RAM    |
  153.     | RAM        |     | 640 KB        |
  154.     |        |     | [0K - 640K]        |
  155.      1K +---------------+ 0x0100 | 0000 - 0FFF        |
  156.     | IV and BDA    |     |            |
  157.      0K +---------------+ 0x0000 /            /
  158.  
  159. The MS-DOS Conventional memory map from 0 KiloBytes up to 1 MegaByte [1 MB]:
  160.  
  161. Module Name and Usage                        Range        Size
  162. --------------------------------------------------------------------------------------
  163. * Low (DOS) RAM:                        0K - 640K    640 KB
  164. - Interrupt Vectors (IV) and BIOS Data Area (BDA)        0K - 1K        1 KB
  165. - Base System RAM                        1K - 640K    639 KB
  166. * High RAM:                            640K - 1M    384 KB
  167. - Video RAM (VGA color and monochrome)                640K - 768K    128 KB
  168. - Video BIOS ROM, Option ROM and Option RAM            768K - 800K    32 KB
  169. - Hard Drive Controller (HDC) BIOS RAM                800K - 816K    16 KB
  170. - Option ROM, Plug-and-Play (PnP) BIOS ROM and Option RAM    816K - 960K    144 KB
  171. - System BIOS ROM and Floppy Drive Controller (FDC) ROM        960K - 1M    64 KB
  172. * TOTAL Conventional RAM                    0K - 1M        1 MB
  173.  
  174. The physical RAM below 640K is used by MS-DOS as its resource (mapped as shown
  175. above).
  176. Some of the memory above 640K is used for Video RAM, because various video
  177. types (CGA, EGA, MGA, PGA, 8514, VGA) have different requirements and starting
  178. locations, depending also on video controller bus types (ISA, VLB, PCI, AGP)
  179. and chipset brand/model (Tseng Labs, Cirrus, Trident, 3Dlabs, Number Nine, S3,
  180. Matrox, ATI, NVidia, 3dfx etc).
  181. But MS-DOS can map the unused "chunks" of remaining RAM immediately above the
  182. 640K barrier (the 384 KB "High RAM" area), if the BIOS "tells" it to at boot
  183. time. That's why this region is also called the Upper Memory Area (UMA), and
  184. it can be used to load programs, drivers, TSRs (Terminate and Stay Resident
  185. programs), and even parts of DOS itself "high", thus freeing more conventional
  186. RAM. This is possible by mapping the Upper Memory Blocks (UMBs) into usable
  187. RAM, by upper/extended/expanded memory managers, like the MS HIMEM.SYS and MS
  188. EMM386.EXE "combo", bundled with all Microsoft OSes/Environments, that load
  189. from the CONFIG.SYS file at bootup.
  190.  
  191.  
  192. 2. Extended and Expanded Memory [above the 1st MegaByte]
  193.  
  194.  
  195. A. Extended Memory ["longer"]
  196.  
  197. Extended memory is an intrinsic part of the Intel CPU (X86) architecture. It
  198. is addressed directly in the CPU memory address space, above the 1st MegaByte
  199. on all IBM PC compatibles.
  200. MS-DOS (still) assumes that it runs on a 8088 CPU, and can thus only address
  201. the first 1 MegaByte [1024 KiloBytes] of memory space. :(
  202. Newer CPUs starting with the 80286 are capable of addressing the memory above
  203. the 1st Meg. But normally this memory canNOT be accessed by processors in
  204. "Real Mode" (designed for compatibility with the old 8088), using a
  205. single-tasking "Real Mode" Operating System, like Microsoft MS-DOS.
  206. Thus newer DOS based programs and games are designed to use a "Protected Mode"
  207. run-time environment ("DOS extender" using the DPMI interface) to access up to
  208. 32 MegaBytes of extended memory for intensive graphics rendering (SVGA modes),
  209. 3D textures and video/animation playback. Examples: Eidos Tomb Raider I, Lucas
  210. Arts Rebel Assault I and II, 3D Realms DukeNukem 3D.
  211. Other programs like RAM disks (MS RAMDRIVE.SYS), print spoolers, disk caches
  212. (MS SMARTDRV.EXE), use a ROM BIOS feature (on newer PCs that support it) that
  213. allows them to copy data between conventional and extended memory. Although
  214. these programs cannot execute in extended memory, they can use it as storage
  215. space.
  216. To access the entire physical extended memory on X86 compatible PCs, software
  217. programs need to perform in "Protected Mode" (also called "386 Enhanced Mode")
  218. by loading special (virtual I/O) drivers, thus allowing multi-tasking and
  219. faster (32-bit) I/O access, like Microsoft Windows in all its newer
  220. incarnations.
  221. Another processor mode is the "Virtual Real Mode", which allows "Real Mode"
  222. DOS programs to execute from within a "Protected Mode" environment in a
  223. confined (isolated) DOS session/box, by emulating a "Virtual Machine" (VM),
  224. and used by "Protected Mode" OSes/Environments, like Microsoft Windows.
  225.  
  226. The first 64 KB of contiguous memory space located above the 1st Meg [between
  227. 10000 - 10FFF] is referred to as the High Memory Area (HMA), and is
  228. addressable within by MS-DOS as a result of the segmented memory scheme used
  229. to allow X86 CPUs to address more than 64 KB of RAM. Begining with MS-DOS 5.00
  230. a large portion of the MS-DOS resident module (i.e. DOS BUFFERS) and/or some
  231. DOS Mouse drivers are stored in the HMA. MS-DOS canNOT load in the HMA if it
  232. is already occupied by another resident program at bootup.
  233.  
  234. Extended memory can be used according to the XMS (eXtended Memory
  235. Specification) 3.0 standard, defined jointly by Microsoft, Intel, Lotus and
  236. AST, if mapped by an XMS device driver like HIMEM.SYS, provided with all
  237. Microsoft OSes/Environments.
  238. The XMS 3.0 standard allows the extended memory to be used by software
  239. designed to take advantage of it:
  240. - Terminate and Stay Resident (TSR) programs like DOS MOUSE Drivers;
  241. - Extended Memory Specification (XMS) applications like MS Windows;
  242. - XMS DOS games like 3D Realms DukeNukem 3D;
  243. - Static or dynamic RAM disks like MS RAMDRIVE.SYS;
  244. - Disk caching software like MS SMARTDRV.EXE;
  245. - Expanded Memory Specification (EMS) implementation like MS EMM386.EXE
  246. enhanced upper/extended/expanded memory manager, which uses page mapping (on
  247. 80386 and newer CPUs) to convert extended RAM into expanded, thus freeing
  248. additional conventional memory for use by MS-DOS and DOS programs.
  249.  
  250. B. Expanded Memory ["fatter"]
  251.  
  252. Expanded memory is defined within the architecture of the IBM PC/AT standard.
  253. It is refered to as "Paged Memory", can be addressed through a Page Frame
  254. within the first 1 MegaByte [1024 KiloBytes], and is thus accessible on all
  255. compatible 80X86 CPUs begining with the 8088 and including 80286, 80386,
  256. 80486, Pentium, Pentium Pro, Pentium II, Pentium III etc.
  257.  
  258. The Lotus-Intel-Microsoft (LIM) 4.0 agreement is currently recognized as the
  259. common Expanded Memory Specification (EMS) industry standard.
  260. LIM 4.0 describes the following memory architecture:
  261.  
  262.     PC (X86) MAIN MEMORY        LIM EXPANDED MEMORY
  263.  
  264.  16M/4T +---------------+
  265.     | Extended    |
  266.     | Memory (XMS)    |
  267.     . up to 16 MB    .        +---------------+ 32M
  268.     . on a 80286,    .           /|        |
  269.     . 4 GB on a    .         // |        |
  270.     . 80386/80486,    .       / /    |        |
  271.     . 4 TB on a    .     /  /    |        |
  272.     | 80586/80686    |      /   /    |        |
  273.     | etc...    |    /    /    |        |
  274.      1M +---------------+  /     /    |        |
  275.     | High RAM    |/      /    |        |
  276.    960K +---------------+      /     |        |
  277.     | High Page    |     /        |        |
  278.     | Frame: 12    |    /        |        |
  279.     | 16K Physical    |   /        |        |
  280.     | Pages        |  /        . Expanded    .
  281.    768K +---------------+ /        . Memory (EMS)    .
  282.     | High RAM    |/        . divided into    .
  283.    640K +---------------+\        . 16K Logical    .
  284.     | Low Page    | \        . Pages        .
  285.     | Frame: 24    |  \        |        |
  286.     | 16K Physical    |   \        |        |
  287.     | Pages        |    \        |        |
  288.     |        |     \     |        |
  289.    256K +---------------+      \    |        |
  290.     |        |\      \    |        |
  291.     | Low RAM    |  \     \    |        |
  292.     |        |    \    \    |        |
  293.       0 +---------------+      \   \    |        |
  294.                  \  \    |        |
  295.                    \ \    |        |
  296.                      \\ |        |
  297.                        \|        |
  298.                     +---------------+ 0
  299.  
  300. The Expanded Memory Standard (EMS) allows up to 32 MegaBytes of memory to be
  301. mapped into a total of 36 16K pages (as shown above) by swapping ("bank
  302. switching") small blocks ("pages") of extra memory into the 1M address space,
  303. so that only a few pages are addressable at a time, if using an expanded
  304. memory manager like Microsoft's EMM386.EXE. Third party enhanced memory
  305. managers like Quarterdeck's QEMM386.SYS (begining with version 7.0) can map
  306. and use up to 64 MegaBytes as expanded memory.
  307. The Page Frame below the 640K mark loads in a 64K contiguous low (DOS) RAM
  308. region, and allows the existing RAM to be shadowed, usually reserved for use
  309. by Operating Systems/Environments, like MS Windows.
  310. The Page Frame above the 640K barrier occupies a 64K contiguous high RAM
  311. region in the Video RAM and ROM areas, and is designed for DOS apps/games
  312. usage. Program code can be run or data can be stored interchangeably in any of
  313. these frames.
  314. Software using LIM 4.0 standard can thus have a large amount of physical
  315. memory available, but must access it by manually switching pages as required.
  316. LIM 4.0 can be implemented as a software emulation by a device driver, using
  317. the eXtended Memory Standard (XMS) in "Virtual X86 Mode" on any 80X86 CPU, so
  318. that the memory is mapped into any of the physical LIM pages.
  319. MS-DOS and MS Windows recognize LIM 4.0's presence and allow MS MSCDEX, MS
  320. SMARTDRV and other devices/drivers/TSRs to be allocated ("loaded") into LIM
  321. pages.
  322. LIM is not integrated into the Operating System though. To be able to map EMS,
  323. MS-DOS and MS Windows emulate LIM 4.0 using the computer's physical extended
  324. memory (XMS).
  325. This is achieved by a software control program called EMS device driver, which
  326. loads from the CONFIG.SYS file upon bootup on all X86 compatible PCs, like MS
  327. EMM386.EXE provided with all Microsoft OSes/Environments.
  328. DOS programs:
  329. - RAM disks like MS RAMDRIVE.SYS;
  330. - Disk caching routines like MS SMARTDRV.EXE;
  331. - CD-ROM driver extensions like MS MSCDEX.EXE;
  332. - EMS programs/games like Lucas Arts X-Wing etc,
  333. can be configured to use extended and/or expanded memory under the LIM 4.0
  334. standards, as needed.
  335. See "BASIC *ESSENTIAL* MEMORY TIPS" in MEMORY.TXT (included) for a list of DOS
  336. applications, utilities and games that use EMS.
  337.  
  338.  
  339.  
  340.         II.  MS-DOS UPPER MEMORY REGIONS + MAPPING
  341.  
  342.  
  343.  
  344. Dale F. Ogden, computer programmer, was very kind to send me this detailed
  345. answer to my questions about MS-DOS upper memory regions mapping.
  346. My most sincere *THANKS* go to Dale for his valuable contribution to these
  347. files!
  348.  
  349. "Greetings:
  350.  
  351. Beyond the first 640K of conventional memory (0000h to 9FFFh), in the Upper
  352. Memory Areas, there are various types of information stored in ROM BIOS that
  353. depend upon the type of installed hardware. There are also areas reserved by
  354. the system for specific purposes (all memory addresses are in hexadecimal
  355. notation):
  356. - A000 to AFFF: VGA graphics.
  357. - B000 to B7FF: monochrome text (this region is usually available for loading
  358. TSRs and drivers "high" into UMBs).
  359. - B800 to BFFF: VGA Text.
  360. - C000 to C7FF: accelerated video cards.
  361. - C800 to EFFF: much of this region is available to create the page frame for
  362. EMS memory or to load TSR programs and drivers. Somewhere in that region
  363. there is ROM for the hard drives and likely for other hardware, too.
  364. - F000 to FFFF: usually cluttered with ROM (the floppies use this area) and
  365. most is not available for loading stuff; however, some of this area may be
  366. available.
  367. - 10000 to 10FFF: the first 64K beyond 1MB is referred to as the High Memory
  368. Area (HMA) that is addressable within by DOS as a result of the segmented
  369. memory scheme used to allow a 16-bit processor to address more than 64
  370. kilobytes of memory (2^16=64K). Starting with MS-DOS 5.0, a large portion of
  371. the MS-DOS resident module is stored in the HMA, including, in some cases,
  372. Microsoft mouse drivers.
  373. - Beyond that is extended memory which, since the '386, can be "mapped" to
  374. whatever you want it to be.
  375. Memory managers, like EMM386, QEMM386, RM386, use command line parameters to
  376. load TSRs and drivers into specific regions of upper memory. These regions
  377. are defined not by specific addresses, but by available contiguous regions.
  378. The region B000 to B7FF (32K) is the first available region or UMB (Upper
  379. Memory Block) on my system. From CB00 to DBFF (68K) is the second available
  380. region and the EMS page frame is stored from DC00 to EBFF (64K). Each system
  381. is likely to be somewhat different.
  382. HiMem.Sys is the most conservative of all the memory managers in that it uses
  383. only areas not needed by anything else. Third party memory managers usually
  384. are more aggressive (but almost infinitely configurable) and recover memory
  385. used by ROMs that might only be needed at BOOT. In addition, certain
  386. technologies developed by the vendors of 3rd party memory managers (QEMM's
  387. "Stealth" and NetRoom's "Cloaking"), allow the Upper Memory Area (UMA) to be
  388. used for multiple purposes, but of course, not at the same time. The memory
  389. manager controls which function has access to the memory at any particular
  390. time and swaps the other information to extended (XMS) or expanded (EMS)
  391. memory (if available).
  392. The regions are not defined by any particular addresses. When DOS loads
  393. something in upper memory, it looks for available UMBs. Without a switch
  394. (/L:n, where usually n=1-4), it would load it into the first available UMB.
  395. The /L:n switch causes it to load in the designated available UMB.
  396. The purpose of this is to efficiently use the memory. TSRs and Drivers usually
  397. must be loaded into contiguous blocks of memory, so you want to load larger
  398. TSRs into larger UMBs and smaller TSRs into smaller UMBs.
  399. The actual addresses of those upper memory regions depend upon your system.
  400. The utilities that come with QEMM (Manifest) and other 3rd party utilities are
  401. more useful than MSD and make it easier to analyze what is happening with
  402. memory.
  403. The documentation that comes with QEMM is as good as any textbook in
  404. describing what is going on with conventional and extended memory, UMBs, HMA,
  405. EMS, XMS, VCPI and DPMI. There are also articles about optimizing memory usage
  406. in the MicroSoft Knowledge Base (MSKB):
  407. http://support.microsoft.com/support/
  408. If your goal is to maximize conventional memory (you now have 623K which
  409. seems adequate for almost any purpose, I've never seen anything to need more
  410. than 619K to run, and 634K is the maximum possible with a VGA video card),
  411. invest in QEMM, but that seems a high price to pay for potentially only 11K
  412. of RAM.
  413.  
  414. Hope I've been helpful.
  415.  
  416. Dale F. Ogden"
  417.  
  418.  
  419.  
  420.        III. MY ADDENDUM ON UPPER MEMORY REGIONS MANAGEMENT
  421.  
  422.  
  423.  
  424. To exemplify the Upper Memory Regions (UMRs) on a PC/AT IBM (X86) compatible
  425. computer, I have pasted below my system's MSD (the DOS based MicroSoft
  426. Diagnostics tool) Upper Memory Area (UMA) chart:
  427.  
  428. ------------------------------- Memory -----------------------------
  429. Legend: Available "  "  RAM "##"  ROM "RR"  Possibly Available ".."
  430.     EMS Page Frame "PP"  Used UMBs "UU"  Free UMBs "FF"
  431.  
  432. 1024K FC00 RRRRRRRRRRRRRRRR FFFF  Conventional Memory
  433.       F800 RRRRRRRRRRRRRRRR FBFF         Total: 640K
  434.       F400 RRRRRRRRRRRRRRRR F7FF         Available: 625K
  435.  960K F000 RRRRRRRRRRRRRRRR F3FF            640864 bytes
  436.       EC00 FFFFFFFFFFFFFFFF EFFF
  437.       E800 UUUUUUUUUUUUUUFF EBFF  Extended Memory
  438.       E400 UUUUUUUUUUUUUUUU E7FF         Total: 64512K
  439.  896K E000 UUUUUUUUUUUUUUUU E3FF
  440.       DC00 UUUUUUUUUUUUUUUU DFFF  MS-DOS Upper Memory Blocks
  441.       D800 UUUUUUUUUUUUUUUU DBFF        Total UMBs: 122K
  442.       D400 PPPPPPPPPPPPPPPP D7FF       Total Free UMBs: 17K
  443.  832K D000 PPPPPPPPPPPPPPPP D3FF    Largest Free Block: 17K
  444.       CC00 PPPPPPPPPPPPPPPP CFFF
  445.       C800 PPPPPPPPPPPPPPPP CBFF  Expanded Memory (EMS)
  446.       C400 RRRRRRRRRRRRRRRR C7FF       LIM Version: 4.00
  447.  768K C000 RRRRRRRRRRRRRRRR C3FF    Page Frame Address: C800H
  448.       BC00 ################ BFFF         Total: 33152K
  449.       B800 ################ BBFF         Available: 32720K
  450.       B400 UUUUUUUUUUUUUUUF B7FF
  451.  704K B000 UUUUUUUUUUUUUUUU B3FF  XMS Information
  452.       AC00            AFFF       XMS Version: 3.00
  453.       A800            ABFF    Driver Version: 3.5f
  454.       A400            A7FF      A20 Address Line: Enabled
  455.  640K A000            A3FF      High Memory Area: In use
  456.                          Available: 65535K
  457.                     Largest Free Block: 65535K
  458.                     Available SXMS: 214976K
  459.                      Largest Free SXMS: 214976K
  460.  
  461.                   VCPI Information
  462.                      VCPI Detected: Yes
  463.                            Version: 1.00
  464.                       Available Memory: 32720K
  465.  
  466. To display this chart on your system, run:
  467. MSD
  468. from a DOS prompt, and then press M.
  469. See MSD95.TXT (part of W95-11D.ZIP) or MSD62.TXT (part of W31-11D.ZIP) for MSD
  470. details.
  471.  
  472. The UMA is contained between memory addresses A000 - FFFF on all X86 Intel
  473. compatible PCs (see chart above).
  474. As you can see in this particular layout, the entire UMA is mapped into two
  475. regions of available Upper Memory Blocks (UMBs):
  476. - region 1: located between addresses B000 - B7FF, enabled by the I=B000-B7FF
  477. EMM386.EXE switch (see further below), and
  478. - region 2: located between addresses C800 - EFFF, enabled by the I=C800-EFFF
  479. EMM386.EXE switch (see further below).
  480. These two UMRs are available for loading devices, drivers and/or TSR
  481. (Terminate and Stay Resident) programs "high", using the CONFIG.SYS DEVICEHIGH
  482. and INSTALLHIGH, and the AUTOEXEC.BAT LOADHIGH (abbreviated as LH) commands.
  483. Such an UMA layout can be obtained ONLY by using an Upper/Extended/Expanded
  484. memory manager in CONFIG.SYS, like Microsoft's HIMEM.SYS + EMM386.EXE "combo",
  485. or a similar 3rd party enhanced memory manager, such as Quarterdeck's
  486. QEMM386.SYS, Helix's NetRoom RM386.EXE, Qualitas' 386MAX.SYS, Caldera's DR-DOS
  487. EMM386.EXE, Uwe Sieber's UMBPCI.SYS etc, to map the UMA, and to provide UMBs
  488. that allow drivers/devices/TSRs to load "high" and programs to use it.
  489. Example:
  490.  
  491. DEVICE=drive:\path\HIMEM.SYS /TESTMEM:OFF
  492. DEVICE=drive:\path\EMM386.EXE RAM I=C800-EFFF I=B000-B7FF M3 AUTO
  493.  
  494. The above UMA layout corresponds to these EMM386.EXE two I=xxxx-yyyy switches.
  495. The Legend explains the meaning of the symbols. The areas marked with ## and
  496. RR canNOT be mapped by memory managers, because they are used by Extended,
  497. Hard Disk, Option and/or Video BIOS ROM and RAM. The 64K contiguous area
  498. marked with PP (between C800 - D7FF in this case) is occupied by EMM386.EXE's
  499. Page Frame, in expanded memory "mode", enabled by the RAM or HIGHSCAN
  500. EMM386.EXE parameters.
  501. The areas marked with UU (in region 1 and 2) are taken by devices, drivers
  502. and/or TSRs, ONLY if loaded with DEVICEHIGH in CONFIG.SYS, or LOADHIGH (LH for
  503. short) in AUTOEXEC.BAT. The FF areas represent free UMBs, and can be used by
  504. programs specifically written to make use of the UMA, like MS Windows.
  505.  
  506. NOTE:    The EMM386.EXE line MUST FOLLOW the HIMEM.SYS line in CONFIG.SYS!
  507.     ALL OTHER DEVICE/DEVICEHIGH commands MUST FOLLOW the HIMEM.SYS and
  508.     EMM386.EXE lines in CONFIG.SYS!
  509.  
  510. The "n" variable (used by the "/L:n" switch) can have any integer value
  511. begining with 1 and up to the maximum number of UMRs available on your
  512. machine, as mapped by an Upper/Extended/Expanded memory manager (EMM386.EXE,
  513. QEMM386.SYS, RM386.EXE, 386MAX.SYS, UMBPCI.SYS etc) loaded from CONFIG.SYS.
  514. You can fiddle with the "/L:1", "/L:2"... "/L:n" etc switches to determine
  515. your best UMA setup.
  516. Example of CONFIG.SYS DEVICEHIGH line that uses a specific /L:n switch to load
  517. a particular device/driver/TSR into a targeted UMR: [CONFIG.SYS lines are
  518. processed before AUTOEXEC.BAT lines when your machine boots]
  519.  
  520. DEVICEHIGH /L:1=C:\path\IFSHLP.SYS
  521.  
  522. This line loads IFSHLP.SYS, the mandatory Windows/WfWG 3.xx/9x 32-bit disk
  523. access compatibility (legacy) DOS driver in the UMA region 1, located in this
  524. example between addresses B000 - B7FF.
  525. The B000 - B7FF UMR is not used by the standard PC/AT computer BIOS or
  526. Microsoft based OSes if you don't use two video adapters in the same PC, or an
  527. older black and white (monochrome) video controller.
  528. Therefore you can gain an extra 32 KB of contiguous upper memory available to
  529. programs/TSRs, ONLY IF you add the I=B000-B7FF switch to your memory manager
  530. line in CONFIG.SYS (see the EMM386.EXE line above).
  531.  
  532. Same /L:n switches can also be used with the LOADHIGH (abbreviated as LH)
  533. command in AUTOEXEC.BAT, to load MS-DOS mode TSRs/drivers at bootup.
  534. An example is loading the DOS Mouse driver in UMA region 1: [AUTOEXEC.BAT
  535. lines are processed after CONFIG.SYS lines when your machine boots]
  536.  
  537. LOADHIGH /L:1=C:\path\MOUSE <YOUR_MOUSE_DRIVER_PARAMETERS>
  538.  
  539. The order of loading devices/drivers/TSRs in Upper Memory is of UTMOST
  540. importance: larger FIRST, smaller LAST.
  541. You need to experiment with multiple configurations until you reach your
  542. optimum  memory setup, eventually loading ALL your devices/drivers/TSRs in
  543. UMA, thus freeing maximum possible low DOS memory, which is better used by DOS
  544. based programs/games.
  545. Have fun!