Dec 082017
 
xDISK generates RAM disks in expanded memory and permits to vary the amount of memory allocated to the disk without rebooting the computer.

Full Description of File


Resizable EMS-RAM disk, LIM 3+, DOS-5 aware.
Options include: Resizing on-the-fly with or
without preservation of drive contents, 0-KB
disk collapse, UMB selfloading, DOS command-
line load/unload (DOS 3-4), password access,
and 086/286/386/486 code optimized releases.
--------------------------------------------
For release information, decompress the .ZIP
archive, type READ and press Enter.


File XDISK340.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
xDISK generates RAM disks in expanded memory and permits to vary the amount of memory allocated to the disk without rebooting the computer.
File Name File Size Zip Size Zip Type
DESC.SDI 406 271 deflated
FILE_ID.DIZ 406 271 deflated
INSTALL.EXE 6405 6188 deflated
READ.EXE 3786 3634 deflated
XDISK.DDT 3611 1639 deflated
XDISK.DOC 57117 18642 deflated
XDISK.EXE 25497 24627 deflated
XDISK.MSG 24916 6797 deflated
XDISK.NEW 9445 3812 deflated
XDISK.REG 3196 1146 deflated
XDISK.SYS 5689 3680 deflated
XDISK.UPG 3873 1400 deflated

Download File XDISK340.ZIP Here

Contents of the XDISK.DOC file








xDISK
Revision 3.40.1

Copyright (c) 1989-1992, FM de Monasterio
Licensed Material - All rights reserved


CONTENTS
1. SUMMARY
2. REGISTRATION
3. GENERAL INFORMATION
4. INSTALLATION & USAGE
a. Installing the driver via CONFIG.SYS
b. Installing from the DOS command line
c. Modifying the driver after installation
Command-line switches
Command-line comments
d. Status/Usage/Help panels

5. BASIC TECHNICAL INFORMATION
a. DOS Errorlevels
b. Disk internals
c. RAM-Disk identification & DOS version
d. Self-installation in upper memory
e. xDISK communication interface

6. COPYRIGHT & LICENSE
U.S. Government information
Upgrades
Limitations
Technical support



1. SUMMARY
-----------

xDISK generates RAM-disks in expanded memory conforming to the Lotus/Intel/
Microsoft specification (LIM EMS), and permits to vary the amount of memory
allocated to the disk without having to reboot the machine. The disk can be
collapsed to free all of its EMS for other uses, and can be expanded to use
all of the available EMS. or any intermediate size multiple of 16 kilobytes
(KB). The sector size, cluster size, and root directory size can be changed
as well. The drive can provide visual and audio clues of its activity.

Two kinds of on-the-fly, resizable disks can be created: "Inelastic," which
maximize the disk space but whose data are not preserved upon resizing; and
"elastic," which allow data-preserving and nonpreserving resizing.

Security features include: RAM-disk write protecting and format protecting,
locking/unlocking DOS access to the disk, and the enforcing of user-defined
password checks before the implementation of any command to the disk.

Loading features include installation of the xDISK device driver program in
the upper memory area, with or without MS-DOS or PC-DOS 5.0, if an extended
memory manager is present, and the capability of loading this driver simply
from the DOS command line (DOS versions 3 through 4 only).

The minimum xDISK requirements are MS-compatible DOS version 3.0 or higher,
expanded memory conforming to the LIM EMS 3.0 or higher, and 1,500 bytes of
conventional or upper memory per drive to be installed. xDISK is available
in 086, 286, 386, and 486 microprocessor-type optimized versions.



2. REGISTRATION
________________

This software is user-supported; the present 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 copy of the full release
of the software from the address at the end of this documentation.

See the final part of this documentation for information on the Licensing,
Distribution, Warranty, and Limitation of Remedies of the software.

--------------------------------------------------------------------
XDISK.REG contains a form needed to register or upgrade the software
--------------------------------------------------------------------

If you would rather use this unregistered copy, consider making a donation
to the Children's Hospital of Washington DC, for indigent children in need
of medical care. Every year in the USA, infant mortality claims the lives
of tens of thousands of children before their first year of life, and most
of them come from families below poverty level... Please send to the same
address a check payable to the "PATIENT CARE FUND, CHILDREN'S HOSPITAL" on
the obverse, and marked "For Deposit Only" on the reverse. Donations will
be sent to Children's Hospital. Please identify the program for which you
are making the donation.



3. GENERAL INFORMATION
-----------------------

xDISK is a virtual-device driver system to generate (and modify) RAM-disks in
expanded memory conforming to LIM specification version 3 or higher. The disk
parameters can be modified without having to reboot the machine.

Under EMS 3, the disk contents are lost if the resizing requires reformatting
of the disk. Under EMS 4, however, a data-safe resizing can be obtained with
some command switches. Data-safe resizing is available if the drive has been
installed as an "elastic" unit (the default condition). The disk can also be
installed an an "inelastic" unit which can be resized on-the-fly as well, but
whose resizing always destroys disk contents. "Inelastic" disks maximize the
usage of EMS disk space.

This system consists of two programs: (1) XDISK.SYS, a block device driver to
be installed via CONFIG.SYS, after an EMS manager has been installed, and (2)
XDISK.EXE, a utility providing an interface with the driver via DOS to permit
changing of one or more parameters of the specified RAM-disk.

Warning -----------------------------------------------------------------
Due to an error in the LH (LOADHIGH) command of MS-DOS and PC-DOS
5 (revision A and B), XDISK.EXE does not select the correct drive
if loaded via this command in either upper or lower memory. (The
LH command is not needed for the execution of the drive interface
utility.)
-----------------------------------------------------------------


The XDISK.SYS and XDISK.EXE files of a given version are matched and will not
work with those of other xDISK versions. The minimum requirements are an EMS
manager supporting LIM EMS version 3 or higher, and MS-compatible DOS version
3.0 or higher. Some xDISK options require a higher version of DOS or EMS, or
both (see below).

xDISK RAM-disks are compatible with the CHKDSK utility of DOS as well as with
other programs that sometimes encounter difficulties with other resizable RAM
disks. Starting with xDISK version 3.32, the boot sector of the disk complies
fully with the MS-DOS 5.x format.


CPU Versions

The program is written in assembly language; each version consists of four
processor-type releases (086, 268, 386 and 486) in which the code has been
optimized for the CPU types of the Intel iAPX processor family (x86). This
is needed because such processors differ markedly in instruction execution
time. Incorporation of a memory cache in some x86 processors also affects
this time by influencing the speed of both instruction fetching and memory
access.

In addition to standard (086) assembly language instructions, the 286, 386
and 486 releases of the program also use 286-, 386- or 486-specific opcode
instructions in 'real' mode (which is the native mode for 086 processors).
The type and degree of code optimization vary with the CPU type, and yield
usually small variations of the size of the resident code. These releases
can be used in machines having the corresponding or higher CPU type.




4. INSTALLATION & USAGE
------------------------

The utility INSTALL.EXE, enclosed with the program files, may be used to copy
these files to a user-defined drive and directory, and--if so desired--to add
a command to the file CONFIG.SYS which will install the driver XDISK.SYS upon
rebooting, and to add the user-defined directory to the PATH statement in the
AUTOEXEC.BAT file.

The following sections describe the manual installation of the xDISK driver.



A. Installing via CONFIG.SYS

XDISK.SYS may be installed via the CONFIG.SYS file on the boot disk after the
LIM-3+ EMS manager has been installed. The filename of the EMS driver varies
varies with the manufacturer, but its code must include the string 'EMMXXXX0'
whose presence can be verified with any file-browsing utility. The following
command must be included in a single line of the CONFIG.SYS file:

DEVICE=[path]XDISK.SYS [?n] [/DB/DR/DS/KB/LH/PK/VD/VM] [;comment]

where , if given, is the path specification (including drive) for XDISK
.SYS; if is not specified, the driver file is assumed to be located in
the root directory of the booting drive.

If using the DEVICEHIGH (MS-/PC-DOS 5.0) or the HIDEVICE (DR-DOS 6.0) command
to install the driver in upper memory (rather than switch /LH), the parameter
'SIZE' does not need to be specified for the XDISK.SYS installation.

Comments preceded by a semicolon in the DEVICE= line specification, which may
be useful in annotating CONFIG.SYS commands, are ignored during installation.
A description of the switches (/DB, /DR, etc) is provided below. The default
value for switch /DB, /DR, or /DS is used if the switch (or its corresponding
parameter) is not specified.


Installation avoidance

In registered copies of xDISK, driver installation can be avoided by pressing
the key before the installation banner is displayed. Pressing this key
interrupts the installation, and the user is prompted as to whether the drive
is to be installed:

xDISK -- Continue RAM-drive x: installation? [Yn]

Press or to continue or to cancel. Avoiding the installation
produces no memory penalty under DOS version 3.30 or higher but uses some 256
bytes of conventional memory in earlier DOS versions.




B. Installing from the DOS command line

Alternatively, starting with version 3.10, the driver may also be loaded from
the command line at the DOS prompt (i.e., after the operating system has been
booted and configured via CONFIG.SYS) by means of the utility XDISK.EXE, when
executed under MS-/PC-DOS versions 3 through 4. The DOS command-line loading
is not yet implemented under COMPAQ DOS version 4, MS-DOS or PC-DOS version 5
and DR-DOS versions 5 and 6.

Assuming XDISK.EXE is in the DOS path, the following command must be used for
the command-line loading of the driver:

XDISK /LX [path]XDISK.SYS [/switches]

where , if given, is the path specification (including drive) for XDISK
.SYS; if is not specified, the driver file is assumed to be located in
the current subdirectory. (See below for a description of the switches.) The
maximum number of drives allowed by DOS is 26 (A: through Z:).

An xDISK drive installed from the DOS command line can be removed from memory
via switch /UX (see below).




C. Modifying the xDISK driver

After the xDISK driver has been installed, XDISK.EXE can be used to interface
with the driver. This utility allows for the modification of disk parameters
from the DOS command line:

XDISK [?] [d: [/switches]] [;comments]


? If xDISK is executed with as the only argument (notice the absence of
a preceding backslash), the program searches all block device drivers for
the xDISK driver signature, and displays a list of the installed drivers.

d This is the drive designator letter, followed by <:>, that identifies the
xDISK drive. The specification of a non-xDISK drive or of a non-existing
drive generates separate error messages. Defaults: Null drive, no colon,
or x= = Current drive unit letter.

The two other components of the command line are discussed below:


SWITCHES
--------

Switches are optional commands, passed to the driver to modify its operation,
which are added to the command line invoking the xDISK driver (at the time of
installation) or its XDISK.EXE interface utility.

The switches are not case sensitive, but must be preceded by a backslash [/].
If xDISK is invoked without any switch (or when the switches are not preceded
by slashes, and thus are ignored), the status of the xDISK drive is displayed
at the DOS command line.

The contents of the RAM-disk are destroyed by the switches /DB, /DR, /DS, /DC
and /DE, which reformat the disk. The contents are preserved by the switches
/DX+ and /DX-, which resize the disk without reformatting.

Only the following switches are recognized when loading the driver:

/DB, /DR, /DS, /DU, /KB, /LH, /PK, /VD, and /VM

All switches are recognized after installation of the driver, except for /DU,
/KB, /LH, /PK, and /VM.

------------------------------------------------------------------------
(*) Asterisks mark options available in the registered program copy only
------------------------------------------------------------------------


SWITCH ?

1. XDISK.SYS:

If immediately follows the blank space terminating the driver name
in the DEVICE= line specification, the user is prompted as to whether the
corresponding RAM-disk is to be installed. If is missing or is not a
digit between 1 and 9, such prompt defaults to a YES answer in 5 seconds.
The prompt time-out value is provided by if between the range 1 to 9;
the driver is forced to wait for an answer if n=0.


2. XDISK.EXE:

This switch displays the Status/Usage/Help panels, which are described in
more detail in the section below. If a VGA or EGA is the active adapter,
the program saves the contents of the palette registers prior to changing
the video attributes for its various displays.

Preceded by a valid xDISK drive unit letter, ? or /? show the disk status
at the DOS prompt [/?] or at the xDISK Usage/Help panel [?].

In the absence of a disk designator, ? displays the list of the installed
xDISK RAM-disks, while /? displays either the status of the default drive
(if an xDISK one) or the list of installed disks (if the default drive is
not an xDISK drive).

See section Status/Usage/Help Panels below.


* SWITCH CS[n]

Selects cluster size, i.e., DOS allocation units, where can be 1, 2,
4, 8, 16, or 32 sectors/cluster; the final size may be adjusted by xDISK
to a higher value, especially when installing a large disk. Use a small
cluster size with small disks, and a larger size with large disks.

Defaults: /CS = /CS2.


* SWITCH DA[]

Selects whether changes in the disk parameters are implemented via calls
to DOS (/DA+) or directly to the driver (/DA-). If an on-the-fly, data-
compression utility is being used to increase disk capacity, which would
normally take over DOS calls to xDISK, do not resize the disk via direct
calls to the driver (/DA-) since this will damage such a utility.

Defaults: /DA = /DA+.


SWITCH DB[n][!]

Disk size in kilobytes, where is between 16 and 8196 (EMS 3) or 32768
(EMS 4) in steps of 16 KB; if is not a multiple of 16 KB, the size is
increased to the nearest larger multiple available. The largest disk size
which is supported is either 8 MB (the EMS 3 maximum) or 32 MB (the EMS 4
maximum). Unless switch /ND or /NQ is also selected, the resizing change
requires confirmation by the user because the disk is reformatted and its
contents are thus destroyed.

Switch /DB[n] installs an "elastic" disk that, under many conditions, can
expand or shrink via switch /DX (see below) preserving the contents. In
contrast, switch /DB[n]! installs an "inelastic" disk that allows maximal
utilization of the EMS but disables data-safe expansion or shrinkage; use
/DB[n]! if loading a RAM-disk that will not need resizing.

Defaults: In CONFIG.SYS, null switch or null = /DB64. In the command
line of DOS, /DB = /DB64; null switch is ignored.


* SWITCH DC

Switch /DC collapses the RAM-disk to a size of 0 KB and releases all the
EMS pages previosuly allocated to the disk. Unless switch /ND or /NQ is
also selected, disk collapse requires user confirmation. Switch /DC does
not change the existing /DR and /DS values.

If disk collapse has occurred for, say, disk M, DOS-mediated commands to
the drive will trigger the folowing error message from MS-DOS 5.0 (e.g.,
'CHKDSK M:' or 'DIR M:')

Invalid disk change reading drive M
Please insert volume , serial 0000-0000
Abort, Retry, Fail?

Respond to the "Abort, Retry, Fail?" question by pressing the key to
return to the DOS prompt. The message is a remainder that the disk does
exist, but is collapsed. 0-KB collapsed disks can only be restored with
switch /DB or /DE only since reformatting is needed; the data-preserving
switch /DX+ is not accepted.

Do not change drive to a collapsed RAM-disk as DOS will repeat the above
prompt until is pressed. RAM-disks failed by DOS generate different
error messages to CHKDSK. A valid drive status is restored once the RAM
disk is expanded via switch /DB or /DE. See switch /TL for invalidating
and revalidating disk access.

No defaults.


* SWITCH DE[!]

Expands disk size to the maximum available EMS. The maximum number root
entries is changed to 512, unless switch /DR[n] is specified afterwards.
Unless switch /ND or /NQ is also specified, this expansion requires user
confirmation.

Switch /DE loads an "elastic" disk which can expand or shrink via switch
/DX (see below), while preserving its contents during such resizing. In
contrast, switch /DE! loads an "inelastic" disk whose contents cannot be
preserved during resizing, but allows maximal EMS utilization. Use /DE!
if creating a RAM-disk that will not need resizing.

No defaults.


SWITCH DR[n]

Number of root directory entries (files and subdirectories) where is
between 4 and 512. (The final number of root entries may be adjusted by
xDISK to a higher or lower value, especially when loading a small disk.)
Unless switch /ND or /NQ is also selected, this resizing change requires
confirmation by the user.

Each root directory entry uses 32 bytes from the allocated disk size.

Warning -----------------------------------------------------------
If there is not a sufficient number of entries, commands to
write to the disk trigger a critical error message of 'File
Creation Error.' To decrease such a possibility, expanding
the disk to the maximum EMS size via switch /DE changes the
root directory entries to 512. If less entries are needed,
follow switch /DE with /DRn, where n < 512.
-----------------------------------------------------------

Defaults: In CONFIG.SYS, null switch or null = /DR64. In the command
line of DOS, /DR = /DR64; null switch is ignored.


SWITCH DS[n]

Sector size, where is 128, 256 or 512 bytes. The standard DOS sector
is 512 bytes; use a smaller size when storing small files. Unless switch
/ND or /NQ is also selected, the resizing change requires confirmation by
the user.

Defaults: In CONFIG.SYS, null switch or null = /DS512. In the command
line of DOS, /DS = /DS512; null switch is ignored.


* SWITCH DX[][n]

Permits the limited shrinkage [-] and expansion [+] of the RAM-disk while
preserving the integrity of its contents. Resizing is NOT implemented if
the resulting drive parameters would threaten the disk contents (see Disk
Internals below).

Switch /DX- shrinks the free space of the disk to zero or to less than 16
KB. Alternatively, /DX-n shrinks the disk by KB or the nearest 16-KB
multiple. Shrinkage is not implemented if free space is less than 16 KB,
as this would not free an EMS page (16 KB each). The data-safe shrinkage
is available only if EMS 4 and MS-compatible DOS 3.10 or higher are used.
Shrinking an empty disk yields a minimum size of 16 KB or more (depending
on the other drive parameters), i.e., /DX- does not collapse the disk.

Warning --------------------------------------------------------------
Switch /DX- uses an undocumented function supported in version
3.1 to 5.0 (revisions A and B) of MS-DOS; the function is also
supported in other operating systems, such as PC-DOS, and some
versions of DR-DOS. There is no assurance, however, that this
function is available in systems other than MS-DOS, or that it
will remain available in future MS-DOS versions or revisions.
--------------------------------------------------------------

The amount of shrinkage is computed from the value, maintained by MS-DOS,
of the first cluster from which it starts the search for free space prior
disk write operations (such a value is displayed on the Status panel, see
Status/Usage/Help Panels below). DOS normally uses all of the previously
unused free space before reusing freed space. Contents must be compacted
(i.e. there should be no free gaps between used clusters) for proper disk
shrinkage. Switch /DX- compares the calculated kilobytes needed to resize
the disk with the amount occupied by the data. If the former are smaller
than the latter, free gaps are assumed (i.e. the free-space cluster value
does not indicate the last cluster in use) and shrinkage is cancelled.

Note -------------------------------------------------------------------
To compact an "elastic" disk use only defragmenting utilities which
(1) do not leave free clusters interspersed among used clusters and
(2) do not place a hidden data file in the last disk cluster(s). If
a hidden file is created, disk shrinkage may still be possible, but
the same utility may refuse to be used again to pack the disk data.
-------------------------------------------------------------------


Switch /DX+ expands total disk size to twice its formatted size, provided
that the resulting drive parameters do not threaten the integrity of disk
contents. Alternatively, switch /DX+n expands the disk by KB, or the
nearest higher 16-KB multiple. Data-safe expansion requires EMS 4.

A disk shrunk via /DX- can be restored to its original (or a larger) size
via switch /DX+ or /DX+n, and vice versa. A RAM-disk created with switch
/DE! or /DB[n]! ("inelastic" disk) cannot be resized with switch /DX.

Defaults: /DX = /DX+.


SWITCH DUd

Assigns a tentative drive unit code to the disk to be installed, in which
the unit code can be a letter between "A" and "Z." Normally, DOS 3+,
which is required to install xDISK, assigns such an unit code to the disk
at the time of installation, overwritting any user-assigned code. Switch
/DU is available for troubleshooting purposes and is ignored after driver
installation.

No defaults.


* SWITCH KB

Skips displaying the installation banner when loading the driver; switch
/KB is ignored after installation.

No defaults.


* SWITCH LH[n][X][D]

Instructs the program to load its resident in high memory between 640 KB
and 1024 KB, i.e. below the 1-MB limit of real-mode memory but above the
640-KB DOS hardware barrier. High memory self-loading requires that an
extended memory manager (XMM) supporting the services of the XMS 2.00 is
installed and that a free upper memory block (UMB) of a little less than
2 KB is available. The XMM must support functions 10h (Allocate UMB) and
11h (Free UMB). UMB allocation is implemented via calls to DOS, if this
allocation is controlled by MS-DOS or PC-DOS 5 (i.e., command DOS=UMB in
the CONFIG.SYS file and the drivers HIMEM.SYS and 386EMM.EXE loaded), or
via direct calls to the XMM, if DOS does not control the UMB allocation.

Whereas in most cases switch /LH[n] determines automatically the type of
UMB allocation, the user can force this determination via /LH[n]D, which
forces the driver to assume the UMB allocation is controlled by DOS, and
/LH[n]X, which forces the driver to assume this allocation is controlled
by the XMM. If the wrong assumption is used, self-loading in high memory
will fail. (The user has then the option of aborting the installation or
loading the driver in conventional memory.)

A low high-memory limit for the UMB can optionally be specified via ,
a hexadecimal number between A000 (640 KB) and FFFF (1,024 KB), so as to
select or avoid specific regions of upper memory.

The self-loading into upper memory consumes 64 bytes of the conventional
memory for each installed xDISK driver. A few additional bytes are used
by the XMM or MS-DOS 5 when allocating the UMB. Unlike the upper-memory
loading mediated by some memory managers, the self-loading only requires
a free UMB of the size of the resident driver code (and not of the whole
code of XDISK.SYS).

Defaults: Lower-memory installation, if a XMS/DOS error is found during
the UMB loading; high-memory installation below requested lower limit if
UMBs are not available above this limit.


* SWITCH LX

Loads XDISK.SYS from the DOS command line (i.e. after the system has been
booted, and the drivers installed via the CONFIG.SYS file). The full-path
specification for XDISK.SYS must be given after switch /LX along with any
switches to configure the driver, as listed above in Usage item 2.0. The
DOS command-line loading of xDISK works successfully in MS-DOS and PC-DOS
version 3-4, but not yet with COMPAQ DOS version 4, MS-/PC-DOS version 5,
or DR-DOS version 5 and 6.

Switch /LX does not require a drive specification.

Any previously installed xDISK drive cannot be collapsed for the command-
line loading to work, since such loading process rebuilds the DOS kernel.
The command-line loading of the driver increases the resident size by 256
bytes (the XDISK.EXE program segment prefix).

Warning --------------------------------------------------------------
The system will crash if the memory allocated to the driver is
released by means of a resident-removal utility. Command-line
loaded drivers can be identified in memory maps via the string
'xDISK_,' where is the drive letter for the disk.
--------------------------------------------------------------

xDISK drives loaded from the command-line either in lower (LMB) or upper
memory (UMB) can be unloaded from memory via switch /UX (see below).

No defaults.


* SWITCH ND

Nulls the displaying of disk status, user confirmation request, and error
messages; errors can still be detected within a batch file with the ERROR
LEVEL command. Because the disk status display is generated by the driver
via BIOS calls, the message cannot be redirected by DOS; use of switch ND
produces the same result as a redirection to the NUL device. The RAM-disk
configuration parameters are preserved.

No defaults.


SWITCH NQ

Quiet resizing. Avoids prompting for the user confirmation prior to disk
resize operations that destroy all data on the RAM-disk.

No defaults.


* SWITCH PDx

Defines passssword to be checked before implementing any disk change,
where consists of 1-15 lower-case alphanumeric characters [0-9, a-z],
which must be followed by a blank space.

The password is useful in situations when more than one user has acces to
the RAM-disk (e.g., a server) and, after copying the common-access files,
the disk is made write- and format-protected.

No defaults.


* SWITCH PK

Pauses driver installation after its banner has been displayed until any
key is pressed; switch /PK is ignored after installation.

No defaults.


* SWITCH TL[]

Unlink (/TL-) or relink (/TL+) the drive to the chain of DOS drivers. The
unlinking turns the driver off, invalidating its use by DOS. This may be
useful for collapsed disks that cannot be unloaded from memory. Unlinked
RAM-disk can be turned on by relinking them to the DOS chain.

Defaults: /TL = /TL+.


* SWITCH TP[]

Disables (/TP-) or enables (/TP+) password verfication before any changes
to the RAM-disk are implemented; the password consists of 1-15 lower-case
pure alphanumeric characters followed by .

Pressing or during password testing returns the user to the
DOS command line. The typing of an incorrect character during the testing
vitiates prior accepted (correct) characters, and the entire password has
to be retyped. Note that warmbooting via is not suppressed
during password testing (rebooting destroys the RAM-disk data).

Defaults: /TP = /TP+.


* SWITCH TPA[]

Provides control of the audio feedback during the password checking (see
switch TP below) prior to the implementation of any change in the drive;
/TPA+ enables a 55-ms beep each time an invalid character is entered and
/TPA- disables this feedback.

Defaults: /TPA = /TPA+.


* SWITCH TPV[]

Provides control of the video feedback during the password checking (see
switch TP below) prior to the implementation of any change in the drive;
/TPV+ displays a '' if a correct character is typed, and /TPV- disables
this feedback.

Defaults: /TPV = /TPV+.


* SWITCH TR[]

Protect (/TR+) or unprotect (/TR-) the drive from resizing to prevent the
inadvertent reformatting the disk. The protection status is indicated by
the upper or lower case of the write-protection status (see switch TW) in
the xDISK configuration message: RW/RO = resize protected, rw/ro = resize
unprotected.

Defaults: /TR = /TR+.


* SWITCH TS[]

Provides control of audio feedback during DOS access to the specified RAM
disk: Use /TS+ to enable a brief click whenever the driver receives a DOS
request to read from or write to the disk, and /TS- to disable this audio
feedback. The ON status is indicated by the icon [] in the configuration
status messages.

Defaults: /TS = /TS+.


* SWITCH TV[]

Provides control of video feedback during DOS access to the specified RAM
disk: Use /TV+ to flash the icon "" on the top-left corner of the screen
each time the driver receives a request from DOS to read from or write to
the disk, and /TV- to disable this video feedback. The ON and OFF status
is signalled repectively by the icons [] and [] in the status messages.

Switch /VD allows for the selection of the character and the attribute to
be flashed by /TV+.

Defaults: /TV = /TV+.


* SWITCH TW[]

Use /W+ or /W- to write protect (Read-Only) or unprotect (Read-Write) the
drive contents as in a floppy disk. Write-protect status does not permit
RAM-disk resizing. The status is indicated by the icons [RO] and [RW] in
the xDISK configuration status messages.

Defaults: /TW = /TW+.


* SWITCH UX

Uninstalls from memory the specified xDISK disk (only command-line loaded
drives can be uninstalled). The operating system will crash if this drive
is not the last drive in the DOS chain or if the resident code is removed
with a TSR-removal utility.

No defaults.


* SWITCH VD[c][a]

Selects the ASCII character [c] and color attribute [a] of the read/write
disk activity flash mediated by switch /TV+. Any ASCII character, except
for those with code 10 (line feed), 13 ( return), or 26 (end-of-file) can
be used for parameter . The background/foreground video attribute

must be specified as a hexadecimal (base 16) digit pair between 00 and FF
where the following values are recognized:

0 - black8 - gray
1 - dim blue9 - intense blue
2 - dim greenA - intense green
3 - dim blue-green (cyan)B - intense blue-green
4 - dim redC - intense red
5 - dim blue-red (magenta)D - intense blue-red
6 - dim green-red (brown)E - intense green-red (yellow)
7 - dim whiteF - intense white

No defaults.


SWITCH VM

Use if installing XDISK.SYS in a virtual machine of a multitasking system
to prevent EMS losses if the virtual machine is ended.

No defaults.



COMMENTS
--------

Comments may be added in the command line after the switches. The comments,
which may be useful in annotating batch-file or CONFIG.SYS commands, must be
preceded by a semicolon, and are ignored by xDISK.

Do not use the DOS redirection and pipe characters in comments for XDISK.EXE
commands since DOS will attempt to implement the implied redirection or pipe
request.




D. Status/Usage/Help panels

Executing the program with switch /? selected allows access to the Status/
Usage and Help panels. (If a Mouse pointing device driver, compatible with
the Microsoft Mouse driver version 6.0 or higher is loaded and active, all
of the services provided by these panels can also be activated by pointing
the mouse to specific areas of the screen and clicking either button. The
mouse driver state is saved prior to the display, to be restored later, if
sufficient memory is available.

The STATUS/USAGE panel, which is shown first, describes status information
for the resident driver and its drive if an xDISK RAM-drive designator was
specified, or a list of the installed xDISK RAM-drives if any. If a valid
drive designator was specified, the STATUS subpanel also displays used and
free kilobytes, and the value of the cluster from which DOS starts a free-
space search when writing to the disk (see SWITCH DX above).

The USAGE subpanel shows a menu for the command switches: To cycle between
the main and the auxiliary menu, press key or , or click the mouse
upon the screen button labelled . If the resident is installed, the
status of some 'on/off' command switches is displayed by '+' or '-' before
a given menu entry.

The DATA subpanel shows the current drive parameters for the specified (or
default) drive. Press key or , or click the mouse upon the screen
button labelled to display the panel; press the key, or click
the mouse upon the button labelled , to return to the main panel. The
following example was obtained from a 50%-full RAM-disk formatted with the
switches /DB64 /DR128 /DS512 /TS+:



Drive M, serial no. 00130340, label
Esc
Bytes/sector: 512 Medium ID type: F8h
Sectors/cluster: 2 DOS-CDS linked: Yes
No. of FAT copies: 1 EMS pages used: 4
Sectors/FAT copy: 2 Disk compacted: Yes (1)
FAT entry length: 12-bit Safe expansion: +64 KB (2)
Root dir entries: 128 Safe shrinkage: -31 KB (3)
First root sector: 3 Write protect: No
First user sector: 11 Resize protect: No
Reserved sectors: 1 Drive feedback: Yes (4)
Free space cluster 31 (5) Password check: No


Used
0 Percent of Disk Space 100 Free


NOTES:
(1) Indicates whether empty gaps of disk space are present.
(2) Number of additional KB that may be added to the disk size.
(3) Number of KB that may be removed from the current disk size.
(4) Indicates whether there is audio () and video () feedback
during DOS read and write access to the disk.
(5) Cluster at which DOS will start searching for free space if
writing to the disk.



The HELP panel provides a summary description of the program and commands,
and is displayed if key or is pressed from the Status/Usage panel
(or if the mouse is clicked upon the screen button labelled ). Press
the keypad cursor keys (Home/End, PgUp/PgDn, arrows) to scroll the display
down or up. Pressing the key once skips the brief program summary and
positions the text on the "Usage" section directly; pressing a second
time positions the text on the "Switches" section directly. Press or
key to return to the Status/Usage panel.

Press key or click the mouse upon the screen button labelled to
return to the DOS-prompt command line from either panel.

If the program is waiting for keyboard (or mouse input) during the display
of the Status/Usage panel, it calls repeatedly the IDLE interrupts of DOS:
INT 28h and, if MS-DOS 5 is installed, function 1608h of INT 2Fh. INT 28h
allows a potential background activation of (some) other residents whereas
INT 2Fh/1608h allows DOS 5 to suspend the program temporarily and transfer
control to another program.

NOTE: (EGA users only) The default IBM palette attributes are restored if
the EGA BIOS fails to store properly the original data.




5. BASIC TECHNICAL INFORMATION
-------------------------------

A. DOS Errorlevels

XDISK.EXE passes execution status data to DOS. These can be tested in batch
files via the ERRORLEVEL command. The following are values for version 3.31
or later:

Value Condition
----- --------------------------------------
255 Cyclical Redundancy Check failure
254 286(386) version executed in non-286(386)+ machine

240 Error during driver unloading
238 Criticsal error opening driver
237 All drives are assigned (reached maximum)
236 All drives are assigned (increased limit)
235 Driver initialization error (command-line load)
234 Driver failed installation (command-line load)
233 Overlay of driver failed (command-line load)
232 Operating system does not support DOS function 32h
231 Failed to find NUL driver (command-line load)
230 Error during XDISK.SYS load (command-line load)

128 Unknown video card/video contents not preserved
65 Invalid EMS version
64 Invalid DOS version (1-2, 5; OS/2 DOS 10+)

36 Data loss on resize
35 Data-safe resize error
34 Format-protect resize error
33 Write-protect resize error
32 Resize request generic error
19 Evaluation period has expired
18 Open files left in disk
17 Temporary file acess error
16 Root directory full
8 Driver access eror
4 Invalid command/switch
2 Invalid character is password string
1 Bad/Invalid unit request
0 Succesful execution



B. Disk Internals

DOS can support several types of disk. Each disk contains information on its
capabilities, which is stored on a specific area of the disk. In addition to
this information, the disk must contain information necessary to the managing
of the files and disk space, which is also stored in a reserved disk area.

A DOS-compatible disk consists of 3 reserved areas and a user file area. The
reserved areas are the Boot Sector, which contains a table of disk parameters
used by DOS to manage disk space, and a bootstrap code to start the operating
system; the File Allocation Table (FAT), containing data on file-space usage;
and the Root Directory, containing size, location, date, and time information
about the files on the disk.

The surface of a (physical) disk is laid out as a series of concentric rings,
called tracks, which are divided radially into sectors. When storing a file,
a cluster is the basic unit of disk allocation used by DOS, and consists of a
group of sectors, whose number varies with the disk type; the file is divided
among as many sectors as are required to hold it. Whether just one or all of
the sectors of a cluster are used, the cluster is marked as in use.

In the FAT there is an entry for each cluster on the disk, containing a value
that indicates the status of the cluster: reserved for DOS, free, in-use, bad
and end of cluster chain. DOS stores cluster information as a cluster chain,
in which each cluster points to the next cluster in use. Because the first 2
entries of the FAT are reserved, the first cluster of available disk space in
the user file area is cluster number 2.

The length of a FAT entry is either 12 or 16 bits, and it depends on the size
of the disk in sectors and the cluster size; a 12-bit FAT entry is used until
cluster values cannot be stored as a 12-bit quantity, which is when there are
more than 4,079 clusters. The minimum disk size requiring 16-bit FAT entries
can be calculated from:

(4079 clusters x [sectors/cluster] x [bytes/sector]) = Disk size

Improper FAT length entry due to modification of the above variables produces
input/output disk errors; switch /DX monitors the variables to verify whether
disk contents can be preserved or not.




C. RAM-Disk Identification & DOS Version

DOS assigns the first available drive letter to a RAM-disk within the default
range A to E or, for DOS version 3 or higher, the range A to Z if the command
is included in CONFIG.SYS. Such a letter is shown by XDISK.SYS
when using DOS 3 or higher, but not when using MS-DOS 2 (unless switch /DU is
selected--see above).

xDISK drives can be identified by the volume label and the OEM identification
in the boot sector, which are determined by the program version. If installed
in a machine using an 80286 or a higher CPU, the disk date of creation is the
current date in the CMOS chip; for an 8088/8086 CPU, such date is that of the
assembly of XDISK.SYS. Similarly, the time of creation is the version number
of the program when the driver is installed (e.g., 3:40 for version 3.40) for
a machine using an 8088/8086 CPU, or the current time in the CMOS chip for an
80286 CPU. Afterward, the current time and date maintained by DOS are always
used for the time/date creation stamp whenever the disk is reformatted.




D. Self-Installation in Upper Memory

The driver can install itself in the upper memory area (UMA), that is, at
RAM addresses between 640 KB and 1024 KB of memory, via switch /H (or its
subfunctions /Hn, /H[n]X, and /H[n]D). Program releases prior to version
3.10 lack this feature.

The allocation of UMA blocks (UMBs) is arbitrated by an XMS manager (XMM)
version 2.0 or higher; the XMM must be installed prior to the UMB-loading
of the resident. Allocation also requires the remapping of UMA addresses
by a UMB provider, when such a task is not implemented by the XMM itself.
XMMs require MS-compatible DOS version 3.0 or later.

HIMEM.SYS is the XMM distributed with MS-DOS 5; installing this XMM along
with an UMB provider (e.g., a 386-specific memory manager such as EMM386.
EXE, also distributed with DOS 5), and enabling DOS access to the UMA via
the 'DOS=UMB' command, allows DOS 5 to control UMB allocation. Other 386-
specific managers, e.g., QEMM386 (Quarterdeck) or 386MAX (Qualitas), are
able to provide both UMB remapping and XMS support.

Switch /Hn, where A000 n FFFF (hexadecimal), allows the specification
of a minimum upper-memory limit for the UMB to avoid UMA regions having a
very slow access time (or to preserve regions with a fast access time for
other utilities that require faster times, such as a disk cache or screen
accelerator), or to avoid fragmentation of the UMA when UMB allocation is
not controlled by DOS 5, but by the XMM itself. Such a fragmentation may
occur when the XMM allocates blocks on a first-fit basis, i.e., the first
available UMB having the lowest UMA address is allocated, irrespective of
whether or not a (smaller) block matching the requested size is available
at a higher UMA address. Unless the size of the available UMBs increases
with increasing memory address, first-fit allocation of a small UMB could
lead to the breaking of a large UMB into two smaller ones, thus hampering
the installation of larger residents in the UMA.

When DOS controls the UMB allocation, the program enforces the allocation
of the resident block on a best-fit basis when is not specified, that
is, all available blocks are searched (by DOS), and the one matching most
closely the size requested is allocated.

When DOS controls UMB allocation and is specified, UMBs are allocated
on a first-fit basis. While this may contribute to UMA fragmentation, it
allows for the checking of a minimum memory limit in those cases in which
the selection or avoidance of a specific UMA region is more important.

Thus, compared to the UMB loading provided by the command 'DEVICEHIGH' of
MS-/PC-DOS 5.0, the command 'HIDEVICE' of DR-DOS 6.0, or similar services
provided by some 386 memory managers, program self-loading into a UMB has
several advantages, including: (1) it requires only an initial free block
of upper memory of the size of the resident code only (as opposed to that
of the entire program), (2) it permits more user control of the selection
of the upper-memory block, and (3) it can help reduce UMA fragmentation.


Of course, the resident can also be installed in the UMA via a 386-memory
manager or via (UMB-linked) DOS 5.0, provided that there is enough memory
for the actual size of the entire program, and any additional memory that
may be needed by the loading utility.

The driver XDISK.SYS is an uncompressed file, while the interface utility
XDISK.EXE is a compressed file (that selfexpands by a factor of 2+ during
execution).


Note -------------------------------------------------------------------
The address and size of available UMBs can be obtained via MEM.EXE,
when DOS controls UMB allocation, or via the memory manager itself,
when this allocation is controlled by 386-specific memory managers.
In either case, such data can also be obtained with UMAX.EXE, a UMA
mapping utility that is distributed by the author. If memory access
time is a critical element in the selection of the UMBs, a detailed
timing access map is provided by TIMEM.EXE, a utility which is also
distributed by the author.
-------------------------------------------------------------------




E. xDISK Communication Interface

Starting with version 3.32, xDISK implements an interface via interrupt 2Fh,
which allows communication with the driver. A description of this interface
is provided below in case you want your programs to detect whether the xDISK
driver is loaded in memory or if a given unit is an xDISK drive:

Registers at call:

AH=0DDhInterrupt 2Fh subfunction used by xDISK
AL=0/1-26Drive unit (1-26) or installation check (0)
BX=7844h ("xD")Interface signature BX:CX:DX
CX=7844h ("IS")
DX=7844h ("K?")

ES:DI ->Pointer to 25-byte minimum length data buffer


Return registers if successful:

CF = ?Undetermined
AX = 0DDFFh
BX = 87BBhOne's complement of signature (NOT "xD")
CX = ?Register not preserved
DX = B4C0hOne's complement of signature (NOT "K?")

ES:[DI+0] = offset of driver signature for unit in [AL]
ES:[DI+2] = segment of (paragraph-aligned) driver address
ES:[DI+4] = start of 19-byte data list


To verify if a given drive is an xDISK unit, place the unit code (1=A, 2=B,
3=C, etc) in AL; to verify if any xDISK driver is installed, place 0 in AL.
At installation time, xDISK checks whether the INT-2F vector is a null one;
if so, it replaces this vector for one that points to an IRET instruction.

If the xDISK driver is installed, the INT-2F call returns with the contents
of AL = FFh, and the one's complement of the interface signature components
in BX and DX. The contents of CX are not preserved. The paragraph-aligned
(base) segment of the driver is returned in the word starting at ES:[DI+2].
If further verification is required, the far address returned in the double
word starting at ES:[DI] points to the offset of the following string:

DB"xDISK unit: " ; 12-byte ID string
DB? ; drive unit letter (A-Z)
DB0 ; end of ASCIIz string


The status of the following static driver flags is returned starting at ES:
[DI+4] through [DI+23]:

Offset 04h1=DOS linked, 0=DOS unlinked disk
Offset 05h1=write protected, 0=not protected
Offset 06h1=root directory full, 0=not full
Offset 07h1=uncompacted free space, 0=compacted
Offset 08h1=resized, 80h=resizable, 0=not resizable
Offset 09h1=inelastic resizable disk, 0=elastic disk
Offset 0Ah? (reserved)
Offset 0Bh? (reserved)
Offset 0Ch1=collapsed disk, 0=not collapsed
Offset 0Dh1=using all EMS, 0=using some EMS
Offset 0Eh1=password enabled, 0=password disabled
Offset 0Fh1=password audio feedback, 0=no feedback
Offset 10h1=password video feedback, 0=no feedback
Offset 11h1=confirm changes first, 0=no confirm
Offset 12h1=silent display, 0=verbose display
Offset 13h1=click speaker on disk access, 0=no click
Offset 14h1=flash icon on disk access, 0=no flash
Offset 15h0=12 bit, FFh=16 bit: length of FAT entries
Offset 16h? (count of open files in RAM-disk)




6. COPYRIGHT & LICENSE
-----------------------

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
are reserved.

The file XDISK.REG contains a form needed to register this Software.

SINGLE USER LICENSE. Upon registration, you are granted a nontransferable
license to use this Software in a single computer at a time. The Software
may also be transferred to another computer, provided that the Software is
used only in one (1) computer at any time; under the license, the Software
may NOT be installed on a network server.

SITE/15-PCs LICENSE. Upon registration, you are granted a nontransferable
license to use this Software in a single site, or a set of sites, provided
this Software is not used in more than fifteen (15) computers at any time,
and that such computers are located exclusively within the site. Licenses
for more machines are available at discounted prices.

SOFTWARE BUNDLING LICENSE. Please write to the Author.

REFUNDS POLICY. If a problem notified within ninety (90) days of shipping
of the registered copy cannot be solved, the registration fee (but not the
shipping costs) will be refunded upon receiving a written request with the
original diskette(s) enclosed.

UPGRADE POLICY. Program upgrades are limited to licensed users. Upgrades
within the same major version (e.g. release 4.00 through 4.99) are free of
charge when a self-addressed, stamped, 5.25" diskette mailer with a 360-KB
diskette is included with the request. Other upgrades are charged half the
(single-user/site) registration fee. See enclosed file XDISK.UPG.

TECHNICAL SUPPORT. A phone number for technical support is made available
to site licenses for 100 machines or more; other licensed users must write
to the Author who will contact them.



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. The contractor/
manufacturer is FM de Monasterio, P.O. Box 219, Cabin John, MD 20818-0219.

---------

DISTRIBUTION

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 permission in advance from the author.

Latest program releases may be found at the Information Exchange BBS, 703-
836-0748, as a compressed archive file.

---------

WARRANTY DISCLAIMER

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.

---------

Refer all inquiries to:
FM de Monasterio
P.O. Box 219
Cabin John, MD 20818-0219
USA


Trademarked names are the property of the respective owners

[END]


Leave a Reply