Contents of the UMAX.DOC file
Trademarked names are the property of the respective owners
(c) Copyright 1991 FM de Monasterio
Licensed Material - All rights reserved
| UMAx allows for the testing of a number of services of the extended memory
| manager, which implements the extended memory specification in 80286-based
| or higher machines. The testing includes upper-memory block services, and
| provides a list of the size and address of available upper-memory blocks.
1. GENERAL INFORMATION
Irrespective of the CPU, DOS runs in an 8086-compatible mode known as real
mode. In such a mode, where addressable memory is seen as consisting of a
series of 64-kb segments, memory addresses are made up of two portions: A
16-bit 'segment,' between 0 and 65,535 (or FFFF in hexadecimal), and a 16-
bit 'offset,' which is the distance in bytes (between 0 and FFFF) from the
address to the first byte of the segment. By modifying the segment:offset
values, up to 1 Mb of memory can be addressed.
In all 80x86 CPU-based DOS computers, the first megabyte (i.e. 1024 kb) of
memory comprises the initial 640 kb of address space, used by DOS, and the
remaining 384 kb of address space, used by hardware subsystems and by BIOS
routines. This addressable megabyte is referred to as conventional memory,
and its 384-kb subspace as the Upper Memory Area (UMA) or high-DOS memory.
Conventional RAM Extended
0 kb 640 kb 1024 kb
The extended memory specification (XMS) is a software interface for 80286-
based or higher computers, allowing real-mode programs to use the extended
memory as well as certain regions of conventional memory which are located
above the 640-kb DOS hardware barrier. The UMA is one such region.
The UMA is dedicated to video display and other hardware memory as well as
the ROM BIOS. Not all the HMA is normally used, so unused addresses can be
backfilled with a memory manager. Some XMS managers, such as the prototype
HIMEM.SYS, rely on other programs for the backfilling and simply arbitrate
UMB use. Other XMMs, such as XMS-compatible 386-specific memory managers,
can both backfill UMBs and arbitrate their use. (Examples of such managers
are QEMM386.SYS [Quarterdeck] and 386MAX.SYS [Qualitas]).
Current XMS versions provide two UMB services: (1) Function 10h, which can
be used to allocate a UMB of the requested size (if successful returns the
segment base of the allocated block and the actual UMB size; otherwise, it
returns the largest available block size), and (2) function 11h, which can
be used to free allocated UMBs.
By taking advantage of these services, some resident utilities can install
themselves in upper memory (to preserve the lower conventional memory used
by DOS). Further, unlike the UMB-loading programs currently available with
some memory managers, some of such resident utilities also allow selection
of a UMA memory boundary above which to install themselves (to avoid areas
with memory access, for example).
| The XMS also permits the use of another upper region, the High Memory Area
| (HMA) which is the first 64 kb of extended memory in 80286-based or higher
| machines; unlike other regions of extended memory, the HMA can be accessed
| while in real mode (if the A20 Line [the 21st memory address line of 80x86
| CPUs] is enabled).
DOS-MEDIATED UMB ALLOCATION (MS-DOS 5.0)
| Distributed MS-DOS and PC-DOS versions prior to MS-DOS 5.0 did not control
| UMB allocation. When the (DOS-5 distributed) XMM driver HIMEM.SYS and the
| UMB-provider EMM386.EXE are installed, and DOS 5.0 is reconfigured via the
| command 'DOS=UMB' in the CONFIG.SYS file, all available UMBs are allocated
| to DOS, which makes them available to requesting programs through standard
| interrupt-21h function calls (when the UMA is linked to DOS). Although it
| is a somewhat more complex process, some resident utilities can also self-
| install themselves in the UMA when DOS controls UMB allocation.
2. XMS SERVICES
| UMAx tests the UMB services of the XMS manager or DOS 5 (if UMB allocation
| is under DOS control). It allocates progressively smaller blocks until no
| more free memory is available in the UMA, lists all of the allocated UMBs,
| and then deallocates the blocks. It also provides a graphic display of the
| available UMBs.
In the default mode, UMAx tests UMB functions between the lower address of
640 kb (hexadecimal segment A000) and the upper address of 1,024 kb (hexa-
decimal segment FFFF). A higher lower address can be specified via switch
/H (see below).
| Optionally, UMAx can also test some basic XMS services: (1) allocation and
| release of the HMA, (2) global and local enabling and disabling of the A20
| Line, and (3) allocation, resizing, and release of a extended memory block
UMAX [/Hn /X] [;Comments]
where switch Hn defines use of a hexadecimal address to be used as a lower
boundary for the UMA, in which A000 (640 kb) 'n' FFFF (1,024 kb). If a
null ('n' missing) or invalid address is given (A000 > 'n' > FFFF) the UMA
lower boundary of A000 is used.
| Switch X tests basic, non-UMB services of the XMS.
Comments may be added at the end of the command line invoking the program,
after the desired switches. The comments, which may help clarifying batch
files, must be preceded by a semicolon (;) and are ignored by UMAx.
Do not use the redirection command or the pipe command character of DOS in
these comments because DOS will try to implement the implied command(s).
4. ERROR MESSAGES
4.1 "Code is corrupted (CRC failure) - Execution cancelled"
A cyclical redundancy check carried out every time the program is executed
returned a wrong value, indicating corruption or tampering of the code.
4.2 "Failed to detect presence of an XMS manager (XMM)"
An XMS manager complying with the specifications of XMS 2 or higher is not
4.3 "UMB services not implemented [XMS error code 80h]"
The installed XMS manager does support UMB services or cannot backfill the
unused addresses in the UMA.
4.4 "General driver error [XMS error code 8Eh]"
4.5 "Unrecoverable driver error [XMS error code 8Fh]"
4.6 "Undetermined XMM error [XMS error code ??h]"
The XMS manager experienced a fatal error and program execution cannot be
continued. The problem may be cleared by rebooting the CPU.
4.7 "XMM could not allocate UMB [XMS error code B1h]"
The XMS manager was unable to allocate a requested UMB; reboot the CPU to
reset the UMA allocation.
4.8 "XMM could not release UMB [XMS error code B2h]"
The XMS manager was unable to release an allocated UMB; reboot the CPU to
reset the UMA allocation.
4.9 "UMBs are not available above this segment..."
There are no available free UMBs between the hexadecimal segment specified
above and segment FFFF; if a lower boundary was specified via switch H for
the UMA, try using a smaller (lower) value. See section 4.1.
This documentation, programs, and other files distributed in this software
package (the "Software") are the copyrighted property of FM de Monasterio
(the "Author") who provides the Software and licenses its use. All rights
If you would like to use this Software for education or nonprofit purposes
at home, please make a donation for poor children in need of medical care,
sending to the address below a check marked "For Deposit Only" and payable
to "PATIENT CARE FUND, CHILDREN'S HOSPITAL, Washington DC." All donations
are sent to this hospital. (Please indicate the program for which you are
making the donation.)
For use by corporations, institutions or goverment agencies, or for-profit
purposes, contact the Author for licensing information.
U.S. GOVERNMENT INFORMATION
The use, duplication, or disclosure by the U.S. Government of the Software
is subject to the restricted rights applicable to commercial software that
are specified in the subdivision (b.3.ii) of the 'Rights in Technical Data
and Computer Software' clause, document DFARS 52.227-7013.
You may distribute this Software via magnetic and/or electronic means, but
you are specifically prohibited from:
- Charging fees or asking donations in exchange of or payment
for copies of this Software.
- Distributing this Software with commercial products without
the written, express permission in advance from the author.
- Distributing this Software via a for-profit organization or
group, either alone or with other software.
- Modifying any contents of this Software, including, but not
limited to, the copyright notice and this license.
The unauthorized copying, decompiling or disassembling of this Software is
prohibited. Any other use of this Software is also prohibited without the
express, written permision in advance from the author.
The Author cannot and does not warrant that any functions contained in the
Software will meet your requirements, or that its operations will be error
free. The entire risk as to the Software performance or quality, or both,
is solely with the user and not the Author. You assume responsibility for
the selection of the program to achieve your intended results, and for the
installation, use, and results obtained from the Software.
The Author makes no warranty, either implied or expressed, including with-
out limitation any warranty with respect to this Software documented here,
its quality, performance, or fitness for a particular purpose. In no event
shall the Author be liable to you for damages, whether direct or indirect,
incidental, special, or consequential arising out the use of or any defect
in the Software, even if the Author has been advised of the possibility of
such damages, or for any claim by any other party.
All other warranties of any kind, either express or implied, including but
not limited to the implied warranties of merchantability and fitness for a
particular purpose, are expressly excluded.
LIMITATION OF REMEDIES
The information contained in the documentation for the Software is subject
to change without notice.
The Author's entire liability, and your exclusive remedy shall be: (1) the
replacement of an original Software diskette not meeting the above Limited
Warranty and which is returned to the Author along with proof of purchase,
or (2), if the Author is unable to deliver a replacement diskette which is
free of defects, you may terminate the License Agreement by returning this
Software and the corresponding license fee will be returned.
By using the Software, you acknowledge (1) to have read and understood all
parts of this document and (2) to have agreed with and accepted all of its
provisions without any reservation.
FM de Monasterio
P.O. Box 219
Cabin John, MD 20818-0219