Category : Utilities for DOS and Windows Machines
Archive   : LOAD120.ZIP
Filename : LOAD.DOC
³ Trademarked names are the property of the respective owners ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Copyright (c) 1991 F.M. de Monasterio
Licensed Material - All rights reserved
LOAD & UNLOAD version 1.20
--------------------------
1. GENERAL INFORMATION
The computer operating system communicates with the outside world through
peripheral devices. Device drivers are programs that provide an interface
between DOS and a physical (i.e., disk hardware) or virtual device (i.e.,
RAM disk software).
DOS distinguishes two main types of installable device drivers: block (or
disk-type) and character (or nondisk-type) devices. A block device driver
must be able to support one or more 'logical' (viz., physical or virtual)
disks, and thus be able to transfer data in groups of characters. Whereas
character device drivers typically transfer data one character at a time,
the primary feature of this class of driver is that the peripheral device
is not a 'logical' disk, as character devices can also support group-mode
data transference. Typical examples of such types are 2 programs provided
with MS-DOS: ANSI.SYS is a character device driver for the replacement of
the standard 'console' (keyboard and video display) driver that DOS loads
during its initialization; VDISK.SYS is a block device driver to create a
RAM disk in memory.
----------------
2. PROGRAM DESCRIPTION
Installable device drivers are normally loaded via CONFIG.SYS during the
initialization process of DOS after its bootstrapping. LOAD.EXE permits
the loading of these drivers directly from the DOS-command line, without
having to edit the CONFIG.SYS file and rebooting the system.
For character (but not block) device drivers, LOAD provides the option of
installing such device drivers in upper conventional memory, i.e. between
640 kb (the upper limit of DOS-controlled RAM for versions through DOS 4)
and 1,024 kb (the 1-MB upper limit of conventional memory); this is known
as the high-DOS or UMB range. UMB-loading preserves the amount of lower-
range conventional memory used by DOS, except for a small memory wedge of
slightly more than 1 kb.
Finally, a device driver loaded directly from the DOS command line can be
removed from memory with UNLOAD.EXE, a companion utility, or by selecting
switch /U of LOAD, so as to release for other use the memory allocated to
the driver.
More details on program operations are given in sections dealing with the
program switches and error messages (see below).
LOADING LIMITATIONS
Some device drivers cannot be loaded from the DOS command line with LOAD.
In some cases, this is because the driver needs to be installed within 64
kb from the BIOS data area (e.g., some drivers that increase the keyboard
buffer); in other cases, this is because the driver is in conflict with a
previously loaded resident; and in some other cases, this is because of a
conflict between the behavior expected by LOAD and that of the driver.
LOAD has a number of 'sanity-checks' and error-trapping routines to allow
a more or less graceful exit when a driver crashes, but in some cases you
may need to reboot the system. Read the error messages listed at the end
of this file to get an idea of the checks performed by LOAD.
Drivers distributed with DOS as well as many other commercial drivers can
be LOADed succesfully. Notice that all drivers that can be LOADed in the
normal (i.e., lower) range of conventional memory can also be LOADed high
in its upper range. Due to the complexity of the operation, however, you
will have to find by trial and error which installable device drivers can
be LOADed in your system from the DOS command line.
UNLOADING LOADED DRIVERS
Drivers installed from the DOS command line, either in the lower or upper
conventional memory, can be uninstalled with UNLOAD (or with LOAD /U). If
more than one driver has been LOADed, the reverse order of loading should
be used for their UNLOADing; to do otherwise may produce conflicts in the
operation of DOS or at least of some drivers.
When uninstalling a driver, UNLOAD restores the contents of the interrupt
table maintained by the BIOS to those copied prior to the installation of
the device driver. It then releases all (lower) memory allocated between
the resident driver (or, for a UMB-loaded driver, the driver gateway) and
UNLOAD; and then it releases the resident driver itself. This means that
resident programs installed in lower conventional memory after the driver
will be uninstalled as well, whereas resident programs installed in upper
conventional memory after the driver will be inactivated but shall remain
orphaned in the UMB (which is not released). Expanded or extended memory
allocated by such residents is not released and does not become available
to the EMS or XMS pool.
UNLOADING LIMITATIONS
During the initialization of a driver being installed, LOAD checks if the
device driver requests expanded (EMS 3.0+) or extended memory (XMS 2.0+);
the latter includes the allocation of extended memory blocks (EMB), upper
memory blocks (UMB), and the High Memory Area (HMA). UNLOAD attempts the
release of allocated EMS or XMS memory, or both. Neither LOAD nor UNLOAD
can determine whether the driver has released allocated EMS or XMS memory
prior to the unloading; were the release to occur, the system would crash
if the same EMS or XMS handle were assigned to a different process.
EMS- or XMS-based devices having resizable capabilities, such as some RAM
disks, create the distinct possibility of the above problem when resizing
involves first deallocation and then reallocation of memory that yields a
'handle' value different to the original one. (This is the reason why the
EMS-RAM disk XDISK utility, for example, now contains its own DOS-command
line loading and unloading service that keeps track of handle changes.)
UNDOCUMENTED DOS SERVICES
LOAD uses a few undocumented services that are supported in MS-DOS and in
IBM PC-DOS versions 2.x through 4.x, and probably DOS 5, as well as other
DOS-compatible OS versions. As described in a recent book ("Undocumented
DOS: A programmer's guide to reserved DOS functions and data structures"
A. Schulman, ed., Addison-Wesley, 1991, pp. 1-80), the careful use of DOS
undocumented services is not ill-behaved; in fact, many such services are
crucially necessary in a sizable number of commercial programs, including
DOS itself, whose installed base is estimated to be as high as 30 million
to 50 million machines (Schulman et al., 1991).
(This book also provides a program for the loading of device drivers from
the DOS comand line, DEVLOD.COM, along with a detailed explanation on how
to patch a driver into the DOS chain. Be aware, however, that the DEVLOD
of the first two printings of the book contains two bugs. One is a fatal
one when loading a block device driver with DOS version 3.0 [an incorrect
pointer to the current directory array is obtained], whereas the other is
a minor one when using DOS version 1.x [wrong error message is shown].)
The manner in which undocumented DOS data are obtained by LOAD depends on
the version of DOS in use and the support it provides. For instance, the
so-called List of Lists is obtained through a memory search in some buggy
versions of DOS 4.x, but through a DOS function service in other versions
(except when this service is found to be not supported, in which case the
[slower] search method is used).
3. PROGRAM REQUIREMENTS
LOAD requires MS DOS/PC DOS version 2 through 4; it should also work under
DOS 5. The program is incompatible with the DOS versions of the OS/2 box.
For loading device drivers in upper memory, LOAD requires that an extended
memory manager (XMM) complying with the Microsoft/Intel/Lotus/AST-Research
extended memory specification (XMS) version 2.0 or higher be installed and
able to support XMS functions 10h (Allocate UMB) and 11h (free UMB). Such
a manager is provided by the prototype HIMEM.SYS (Microsoft) as well as by
386-specific memory managers such as QEMM386.SYS (Quarterdeck) and 386MAX.
SYS (Qualitas). The same requirements apply to UNLOAD.
CPU VERSIONS
The 286 version of LOAD is faster than the 086 release by taking advantage
of 286-code in real mode; this version requires an 80286 or higher CPU (AT
type compatible microcomputer). Similarly, the 386 version is faster than
the other two LOAD versions, using 386-code in real mode to take advantage
of specific instructions and 32-bit operations; it demands an 80386 (DX or
SX) CPU or higher.
CYCLIC REDUNDANCY CHECK
A 32-bit CRC is calculated each time LOAD is invoked to verify the program
integrity. If the CRC fails, the program will abort to DOS; a CRC failure
indicates corruption of the code and, for your own protection, the program
should not be used. The same applies to UNLOAD.
----------------
3. USAGE
LOAD [/H[nnnn]]
and
UNLOAD
in which
driver file to be installed, whereas
device gateway in lower conventional memory which is provided by LOAD when
the driver is loaded.
The resident gateway name can also be determined at any time with a memory
map utility (such as MAPMEM.COM of TurboPower Software). The name consists
of 8 characters; for a block device, this string has the format 'DRIVE_d:'
(in which 'd' is the letter designator of the block device drive), whereas
for a character device, this string is the actual device name in which all
blank padding spaces (if any) have been changed to the underline character
(ASCII 95d). For example, the driver ANSI.SYS (which has the reserved name
'CON ') yields the gateway name 'CON_____' upon installation.
3.1 SWITCHES
The switches are not case sensitive. They must be preceded by a slash [/]
and they must precede the specification of the driver file to be loaded or
the driver gateway to be annulled.
--------
* Hn Instructs LOAD to install the (character) driver in upper memory between
640 kb and 1024 kb, i.e. below the 1 Mb boundary of conventional RAM but
above the memory region normally controlled by DOS. The switch requires
that an extended memory manager (XMM) supporting the services of the XMS
2.00 or higher is installed, and that a free upper memory block (UMB) of
the size required by the driver is available.
A lower high-memory limit for the UMB can optionally be specified by
(a hexadecimal number between A000 [640 kb] and FFFF [1024 kb]) so as to
avoid specific areas of memory having a slow access time; notice that if
0-9 nor A-F) the default minimum limit of n=A000 is used. Memory access
times are provided by some XMS-compatible memory managers, e.g., QEMM386
(Quarterdeck) and 386MAX (Qualitas). The program TIMEM.EXE, enclosed in
this software release measures memory access time in some detail (please
read TIMEM.DOC).
Example: LOAD /HCC00 ANSI.SYS
This requests that the driver ANSI.SYS, located in the default drive and
directory (no drive or path specified), be loaded in upper memory higher
than or at the (hexadecimal) address limit CC00.
The size required by the driver is either the directory size of the file
or the length of code to remain resident in memory after initialization,
whichever is larger.
NOTE -- Any compressed driver that expands upon initialization and whose
residence memory requirement is smaller than its expanded length
will fail the loading and probably crash the memory manager.
UMB-loading creates a small memory resident in lower conventional memory
of about 1 kb. The resident contains a gateway to the actual driver, and
driver and UMB data needed for unloading. Block device drivers cannot be
installed in upper memory with the current version of LOAD.
Default: Invalid /Hnnnn = /HA000.
--------
* U Uninstalls a previously loaded device driver, which is identified by the
associated
The same operation is provided by UNLOAD, and the following descriptions
apply to both LOAD /U and UNLOAD.
The nullification procedure unlinks the driver from the DOS driver chain
and, for a block device, the corresponding drive from a DOS drive table.
Before attempting to release the memory being used by the device driver,
UNLOAD changes both the name and attribute of the device to those of the
NUL device, the input/output bit bucket for DOS, as a protection in case
the unlinking of the driver (or the release of its memory) were to fail.
Since the true NUL device is always the last device in the driver chain,
any other NUL device is ignored. In addition, the gateway of an annulled
device is renamed 'unLOADed' to facilitate its detection in memory maps.
UNLOADing a device driver also uninstalls memory-resident utilities that
may have been installed after the driver was LOADed, and the contents of
a table of interrupt addresses maintained by the BIOS at absolute memory
segment 0 are changed to those values present immediately before loading
the driver. These are the same effects produced by a TSR-removal utility
(such as MARK.COM and RELEASE.COM of TurboPower Software).
When the same resident name is present in lower conventional memory more
than once, i.e. when the same driver has been LOADed more than once, the
first occurrence of the name is used and its associated driver annulled.
----------------
4. DOS ERRORLEVEL
LOAD passes to DOS execution a status value which can be tested in a batch
file via the ERRORLEVEL command; the following are values for version 1.20
or later:
Value Condition
----- --------------------------------------
255 32-bit CRC failed
255 CPU does not support code
224 DOS does not support fxn 21/52h
192 DOS does not support fxn 21/32h
160 Failed to found NUL driver
128 Invalid DOS version
112 Critical error
96 Removal error
80 XMS error or XMM missing
64 All drives assigned (maximum)
32 All drives assigned (inc no.)
16 Driver initialization error
8 0-unit on block device driver
4 0-byte driver break length
2 Overlay driver load failed
1 Driver name not given
0 Succesful execution
----------------
5. ERROR MESSAGES
5.00 "Program is corrupted (CRC failure)"
A failure of the 32-bit cyclical redundancy check was detected when the
program was executed.
--------
5.01 "This CPU cannot execute 286+ code"
286+ versions of the program cannot be executed in 8088, 8086, and (most)
80186 CPU machines.
--------
5.02 "This CPU cannot execute 386+ code"
386+ versions of the program cannot be executed in 8088, 8086, 80186, and
80286 CPU machines.
--------
5.03 "Unrecognized or invalid DOS version"
The program requires MS-DOS version 2.x through 4.x for proper execution.
--------
5.04 "Failed to find the NUL driver"
LOAD was unable to find the start of the DOS drivers chain. This should
not occur unless MS-DOS has been corrupted or an incompatible operating
system is being used. You should reboot immediately if you receive this
message.
--------
5.05 "Block device drivers cannot be installed"
"in high memory with this version of LOAD"
Switch /H was specified for a block device driver. (The current version
of LOAD con only load character device drivers in upper memory.)
--------
5.06 "Undocumented DOS function 32h is not supported"
5.07 "Undocumented DOS function 52h is not supported"
Either message indicates the the DOS version being used does not support
the undocumented function in question, and alternative methods to obtain
undocumented DOS data have failed or are not available.
--------
5.08 "A critical error ocurred accessing the file"
"Check drive hardware or SHARE access rights"
This message is displayed whenever a DOS critical error (interrupt 24h)
is triggered by an attempt to open the driver file. For diskette-based
operations, an empty diskette drive or opened drive bay can trigger the
error. For nonremovable disk-based systems, a file-sharing error (i.e.
SHARE.EXE is loaded and the file has already been opened with a sharing
mode incompatible with read access request) can also trigger the error.
--------
5.09 "Specified file has zero length"
5.10 "Specified file was not found"
5.11 "Specified path was not found"
5.12 "DOS denies access to the file"
5.13 "Insufficient memory to load driver"
5.14 "Specified file is too big to load"
These messages are displayed whenever a noncritical error is triggered
by an attempt of opening the driver file to measure its length.
--------
5.15 "Loading of driver failed [code ??h]"
This generic error message is displayed when an error is encountered in
loading the driver file as an overlay. The (hexadecimal) error code is
in the range between 01h and 58h, and is determined by DOS.
--------
5.16 "Driver initialization failed [code ??h]"
This generic error message is displayed when an error is encountered in
the initialization of the driver by LOAD. The (hexadecimal) error code
is one of the following:
Code Error Code Error
00 Write protect violation 08 Sector not found
01 Unknown unit 09 Out of paper
02 Device not ready 0A Write fault
03 Unknown command 0B Read fault
04 CRC error 0C General failure
05 Bad request structure length 0D Reserved
06 Seek error 0E Reserved
07 Unknown media 0F Invalid disk change
--------
5.17 "Device driver failed the installation"
"(Null unit request by a block driver)"
5.18 "Device driver failed the installation"
"(Null-size resident request by driver)"
These messages are displayed whenever the initialization service of the
device driver decides to fail the installation of the driver, either by
requesting a zero-length resident (DOS 3.3x or higher) or by specifying
a zero unit number (block devices only).
--------
5.19 "Driver triggered a divide overflow (interrupt 0)"
An interrupt zero is triggered by some device drivers that LOAD fails to
install properly. In most cases, the message should be interpreted as a
signal of improper loading, rather than driver software error.
--------
5.20 "Aborted - Driver initialization command time out"
LOAD waits up to 15 seconds for a driver to complete initialization after
it receives the command to begin initialization. A time-out error is then
generated and LOAD aborts the execution. In some, but not all, cases when
a driver installation fails and seems to enter an endless loop, this trap
may help to avoid a system reboot.
--------
5.21 "Last available drive [d:] is already assigned"
"and LASTDRIVE cannot be increased any further"
DOS assigns the first available drive letter to a disk within the default
range A: through E: or (for DOS 3.x or higher) the range A: through Z: if
the command 'LASTDRIVE=Z' has been given. The message indicates that the
maximum range has already attained and that the (block) device driver can
not be loaded. This also applies to Novell's NetWare drives.
--------
5.22 "Last available drive [d:] is already assigned"
"LASTDRIVE has been increased - Try LOAD again"
See above. LOAD has increased the LASTDRIVE value to LASTDRIVE+1, so that
if you repeat the execution, the (block) device driver will be loaded.
--------
5.23 "Failed to find a driver gateway named '????????'"
A request to unload a device specified an invalid resident gateway name.
Retype the request correctly or check the installed gateway names with a
memory map utility.
--------
5.24 "XMS manager (XMM) is not installed"
Failed to determine the presence of a driver compatible with the Extended
Memory Specification (XMS) version 2.0 and the load was aborted.
--------
5.25 "XMS error: Smaller UMB is available"
5.26 "XMS error: UMBs are not available"
The XMS manager did not allocate the requested upper memory block because
no UMB of that size was availble.
--------
5.27 "XMS manager error code ??h"
This message is displayed when other XMM errors are encountered in trying
to load a driver in upper memory. The (hexadecimal) error code is likely
to be one of the following:
80h - Function is not implemented.
8Eh - General driver error occurred.
8Fh - Unrecoverable driver error occurred.
B0h - Smaller UMB is available.
B1h - No UMBs are available.
B2h - UMB segment number is invalid.
--------
5.28 "Failed to release program environment [code ??h]"
The program was unable to release the DOS environment block of the driver
(lower memory loading) or its gateway (upper memory loading). The failure
is harmless to the operation of the program.
--------
5.29 "Failed to release lower memory block [code ??h]"
UNLOAD was unable to release the lower-memory block containing the driver
(lower memory loading) or its gateway (upper memory loading). The failure
is harmless to the unlinking of the driver from the DOS driver chain, but
the allocated memory is not available to the conventional memory pool for
further use.
--------
5.30 "Failed to release allocated EMS block [code ??h]"
UNLOAD was unable to release an expanded memory block that was allocated
by the the driver during its initialization. The failure is harmless to
the unlinking of the driver from the DOS driver chain, but the allocated
block is not available to the EMS memory pool for further use.
--------
5.31 "Failed to release upper memory block [code ??h]"
UNLOAD was unable to release the UMB containing the driver (upper memory
loading) or a UMB allocated by the driver during its initialization. The
failure is harmless to the unlinking of the driver from the driver chain
but the allocated block is not available to the XMS-UMB pool for further
use.
--------
5.32 "Failed to release allocated XMS block [code ??h]"
UNLOAD was unable to release an extended memory block that was allocated
by the the driver during its initialization. The failure is harmless to
the unlinking of the driver from the DOS driver chain, but the allocated
block is not available to the XMS memory pool for further use.
--------
5.33 "Failed to release the High Memory Area [code ??h]"
UNLOAD was unable to release the XMS High Memory Area that was allocated
by the driver during its initialization. The failure is harmless to the
unlinking of the driver from the driver chain, but the allocated HMA can
not be allocated to any other program.
--------
5.34 "Failed to release memory control block [code ??h]"
In rebuilding the chain of memory, UNLOAD was unable to release a memory
control block allocated by a resident program installed after the driver
was loaded. The failure is harmless to the unlinking of the driver from
the driver chain but the allocated memory is not available to the memory
pool for further use.
------------------------------------------------------------------------------
SINGLE USER (BBS-DISTRIBUTED) LICENSE AGREEMENT
REGISTRATION
These programs and the documentations (the "software") are the copyrighted
property of FM de Monasterio (the "author"), who provides the software and
licenses its use. Neither the title to nor ownership of this software are
transferred to you by such a license, and both are retained by the author.
All rights are reserved.
The software is user-supported; the enclosed release, although lacking the
options marked by asterisks, is a fully usable program. You may test this
release for (in)compatibilities with your system, but after the testing is
completed you are requested to order a registered release of this software
from the address below.
Alternatively, to continue use of this unregistered copy, send to the same
address a US$5.00 check marked "For Deposit Only," and payable to "PATIENT
CARE FUND, CHILDREN'S HOSPITAL" of Washington, DC. Unregistered users who
donate to this fund may legally keep such a copy under the injunctions and
limitations described below.
A form needed for the registration or upgrade of this software is provided
in the file LOAD.REG. Refer all inquiries about the software to:
FM de Monasterio
P.O. Box 219
Cabin John, MD 20818-0219
LICENSE
Upon registration you receive a non-exclusive, non-transferable license to
use the software. Two types of license are available:
Single User License:
Upon registration/upgrade you are granted a nontransferable license to use
the software in a single computer at a time. You may transfer the software
physically to another computer provided that the software is then not used
on more than one computer at any time.
Site/10-Computer License:
Upon registration/upgrade you are granted a nontransferable license to use
the software in a single site or a set of sites provided that the software
is not used in more than ten computers at any time and that such computers
are located exclusively within the registered site(s).
UPGRADES
Within the same major version: Registered software users can upgrade free
of charge within the same major version (e.g., 2.00 through 2.99).
Outside the same major version: Registered users can upgrade for half the
the license fee for a different version of the software.
To upgrade send a self-addressed stamped diskette mailer with the original
360 kb diskette to the address above, along with the upgrade form.
SUPPORT
Limited technical support is provided to registered users. If you discover
a problem, please try to replicate it under the same conditions and, then,
in the absence of other resident programs. (Changes in the order residents
are installed sometimes solve conflicts.) If the problem can be replicated
please write at the address above providing:
- Your name and address.
- Program version number (see the Syntax/Help panel).
- Computer model and configuration, and hardware used.
- A sufficiently detailed description of the problem.
- A list of resident and nonresident programs in use,
and their sequence of loading into memory.
Messages may be left c/o Sysop at: The DC Information Exchange BBS
~~~ 202-433-6639, Sysop: Bill Walsh
(2400+ baud).
INJUNCTIONS
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 the software.
- Distributing this software with commercial products without
the written permission from the author.
- Distributing this software via a for-profit organization or
group, either alone or with other software.
The unauthorized copying, decompiling or disassembling of this software is
prohibited; any other use of this software is prohibited without a written
permission in advance from the author.
LIMITED WARRANTY
The author-copyright owner warrants for a period of thirty (30) days from
the date of delivery that, under normal use and without any modification,
the programs substantially conform to the accompanying specifications and
that the documentation is substantially complete and contains information
the author deems necessary to use the programs. If, during the thirty-day
period, a demonstrable defect in the programs, magnetic medium upon which
they are distributed, or documentation should appear, you may return this
software for repair or replacement, at the author's option. If the defect
cannot be repaired, or the software replaced with functionally equivalent
software, within sixty (60) days of the author's receipt of the defective
software, then you shall be entitled to a full refund of the license fee,
but not of the mailing/handling costs described in the registration form.
All other warranties of any kind, either express or implied,including but
not limited to the implied warranties of merchantability and fitness for
for as a particular purpose, are expressly excluded.
The author cannot and does not warrant that any function contained in the
programs will meet your requirements, or that the operation will be error
free. The entire risk as to the software performance or quality, or both,
is solely with the user, and not with the author.
LIMITATION OF REMEDIES
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.
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.
GENERAL
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.
------------------------------------------------------------------------------
[END]
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/