home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol10n20.zip
/
UMBFILES.ZIP
/
UMBFIL.DOC
next >
Wrap
Text File
|
1991-10-28
|
4KB
|
87 lines
UMBFILES.COM
Jeff Prosise November 26, 1991 (Utilities)
Purpose: UMBFILES is one of our first programs to make use of
upper memory blocks. In doing so, it can free up as much as 15K
of RAM.
Syntax: UMBFILES[=]nn
This is where nn is the number of files you want to allocate space for
in upper memory. Valid values range from 1 to 247. An additional
restriction is that the sum of UMBFILES and files already
allocated may not exceed 255, because DOS doesn't support more
than 255 files open in the system at any one time. For example,
if you boot with the statement FILES=20 in CONFIG.SYS and then
run UMBFILES, the maximum value UMBFILES will accept for nn is
235. If you allocate space for 20 more files with the statement
UMBFILES=20 and then run UMBFILES again, the most it will accept
is 215.
You can run UMBFILES as many times as you like. Each time,
the SFT is extended by the number of entries indicated. You can
determine the number of SFT entries the system currently contains
(and thus how many files can be open in the system at once) using
the NUMFILES utility published in the November 12, 1991, Tutor
column. NUMFILES (along with its source code) is available on
PC MagNet.
The most efficient way to use UMBFILES is to place the
statement FILES=8 in CONFIG.SYS and place a UMBFILES command
allocating additional space for files in AUTOEXEC.BAT. For example,
if you currently boot with the statement FILES=60, change it to
FILES=8 and add the command
UMBFILES=52
to AUTOEXEC.BAT. Doing so will save you 3,072 bytes (3K) of memory.
The 8 SFT entries created by the FILES command will be located in
conventional memory; the 52 set up by UMBFILES will be in upper
memory. Why not place all 60 in upper memory? The minimum value DOS
will accept for FILES is 8, so the first 8 SFT entries must always
be in conventional memory. Any entries beyond that may be placed
in upper memory with UMBFILES.
To use UMBFILES, you must be running DOS 5.0 and have a
386 or 486 configured for loading programs and device drivers in
upper memory. At a minimum, this means that:
- You must load HIMEM.SYS in CONFIG.SYS;
- You must also load EMM386.EXE with a RAM or NOEMS parameter;
- CONFIG.SYS must contain the statement DOS=UMB (or DOS=HIGH,UMB);
- Your PC must contain at least 384K of extended memory.
If UMBFILES reports that the upper memory area is not
available, then it was unable to allocate a block of upper memory
probably because your system isn't set up properly for UMBs. If
this happens, check your CONFIG.SYS file to make sure it contains
the required statements and that EMM386.EXE is indeed being loaded
with a RAM or NOEMS parameter. Without one of these two parameters,
EMM386.EXE will not create the upper memory blocks that UMBFILES
needs.
If UMBFILES reports ``Insufficient memory,'' it means that
the upper memory area is available but there isn't a UMB large
enough to hold the number of SFT entries you requested. To determine
the size of the largest free UMB, just type MEM /C. If there is some
unallocated upper memory remaining, you may be able to use it by
decreasing the requested number of SFT entries. You should note that
each entry requires approximately 59 bytes of upper memory.
Other error messages from UMBFILES include ``Sum of FILES
and UMBFILES cannot exceed 255,'' indicating that the number of
additional SFT entries that you requested would push the total to
more than 255, and ``Invalid parameter (cannot be 0),'' which you
get if you type UMBFILES=0. UMBFILES will also respond with an
error message if the number you enter for nn is invalid (for
example, if the entry contains any nonnumeric characters), if you
attempt to run it with any version of DOS other than 5.x, or if
there is a syntax error. If UMBFILES succeeds in extending the
SFT, it will display the message ``System File Table extended,''
indicating that the entries you requested were added to the SFT.
A final note concerning the use of UMBFILES relates to its
on-line help feature. You can get help with any DOS 5.0 command by
running it with a /? switch. Similarly, you can get help with
UMBFILES by typing:
UMBFILES /?
In response, UMBFILES displays a one-line description of itself
followed by a description of its syntax and other helpful
information.