Examining Contents of UMBs (72013)

The information in this article applies to:
    Microsoft MS-DOS operating system 5.0

This article was previously published under Q72013


You can determine what programs and terminate-and-stay-resident programs (TSRs) are loaded into upper memory blocks (UMBs) by first using the EMM386 command to see where UMBs start, and then using the MEM/DEBUG (or MEM/Program) command to see how the UMBs are being used.

NOTE: This article applies to MS-DOS version 5.0; it does not apply to later versions of MS-DOS.


If you run EMM386.EXE from the command line, it displays something similar to the following:
    MICROSOFT Expanded Memory Manager 386  Version 4.20.06X
   (C) Copyright Microsoft Corporation 1986, 1990

   Expanded memory services unavailable.

   Total upper memory available  . . . . . .     0 KB
   Largest Upper Memory Block available  . .     0 KB
   Upper memory starting address . . . . . .   C800 H

   EMM386 Active.
The "Upper memory starting address" is the first segment in which UMBs are located.

Use MEM/DEBUG to show memory usage. It displays something similar to the following (note: you can make the output stop after each page by using MEM/DEBUG|MORE):
       Address     Name          Size       Type
        -------     --------     ------     ------

        000000                   000400     Interrupt Vector
        000400                   000100     ROM Communication Area
        000500                   000200     DOS Communication Area

        000700      IO           000A80     System Data
                        CON                   System Device Driver
                        AUX                   System Device Driver
                        PRN                   System Device Driver

       <.. removed lines here to shorten output ..>

        01A990      MSDOS        085650     -- Free --
        09FFF0      MSDOS        028010     System Program

        0C8010      MSDOS        000130     -- Free --
        0C8150      MSDOS        000AE0     -- Free --
        0C8C40      XNSBIOS      000120     Environment
        0C8D70      XNSBIOS      002610     Program
        0CB390      SESSION      000120     Environment
        0CB4C0      PRTSC        000120     Environment
        0CB5F0      PRTSC        000320     Program
        0CB920      DOSKEY       000FE0     Program
        0CC910      MIRROR       001990     Program
        0CE2B0      MOUSE        003830     Program
        0D1AF0      MSDOS        0064E0     -- Free --
        0D7FE0      MSDOS        008020     System Program

        0E0010      IO           001500     System Data
                      RAMDRIVE   0004A0      DEVICE=
                        D:                    Installed Device Driver
                      ANSI       001040      DEVICE=
                        CON                   Installed Device Driver
        0E1520      SESSION      000410     Program
        0E1940      REDIR        0093E0     Program
        0EAD30      MSDOS        0052C0     -- Free --

          656384 bytes total conventional memory
          655360 bytes available to MS-DOS
          625664 largest executable program size

         4194304 bytes total contiguous extended memory
               0 bytes available contiguous extended memory
         3124224 bytes available XMS memory
                 MS-DOS resident in High Memory Area
Given the upper memory starting segment of C800, reported by EMM386, you can examine the MEM/DEBUG output for any address greater than or equal to C8000. Anything with "-- Free --" in the type column is available UMB memory. Anything with a name other than MSDOS is a program or device driver that is running in a UMB. In the example above, XNSBIOS, XNSBIOS, SESSION, PRTSC, DOSKEY, MIRROR, MOUSE, RAMDRIVE, ANSI, SESSION, and REDIR are all running in UMBs.

The size is in Hexadecimal. In the example above, there are free UMBs at 0C8010 (size:130h) , 0C8150 (size:AE0h), 0D1AF0 (size:64E0h), and OEAD30 (size:52C0h). If you are unfamiliar with Hex numbers, you can get a rough approximation of the size of the block in K as follows:

(Multiply 10,000 digit by 16) + (Multiply 1,000 digit by 4) + (Divide 100 digit by 400) = K.

Thus, in the example above, the UMB at location OEAD30, size 52C0, is (5*4)+(2/4)=20.5K.


More information on this subject can be found in the version 5.0 "Microsoft MS-DOS User's Guide and Reference" and the version 5.0 "Microsoft MS-DOS Getting Started" manual.

Modification Type: Major Last Reviewed: 11/19/1999
Keywords: KB72013