MS-DOS batch files cannot distinguish between compressed drives and
uncompressed drives. However, you can use the MS-DOS Debug utility to
create a program that sets an errorlevel depending on whether a drive
is compressed with DoubleSpace. An MS-DOS batch file can then test
this errorlevel to determine whether the drive is a DoubleSpace-
NOTE: Microsoft Product Support Services does not provide support for
writing the Debug script or batch file discussed in this article, or
troubleshoot problems related to compiling, running or using this
program or batch file.
This following is an example of how to use the MS-DOS Debug utility to
create a program file called ISDBL.COM. ISDBL.COM determines the
- Whether DoubleSpace is loaded in memory
- Whether a specified drive is a DoubleSpace-compressed drive
ISDBL.COM returns the following errorlevels:
DoubleSpace compressed drive 1
DBLSPACE.BIN is not loaded 0
Invalid drive 0
Other errors 0
NOTE: ISDBL.COM tests the current drive if no drive is specified on
the command line.
ISDBL.COM is created using a Debug script file, which contains all
the commands you would enter from within DEBUG to create ISDBL.COM.
To create ISDBL.COM, follow these steps exactly:
- Create a text file called C:\ISDBL.SRC using a text editor (such as
Windows Notepad or MS-DOS Editor). This is the Debug script file.
C:\ISDBL.SRC should contain the following lines exactly as they
NOTE: Press the ENTER key at the end of each line below.
NOTE: You MUST press the ENTER key twice after the last "INT 21" line
and once after the "Q" at the end of the Debug script.
- From the MS-DOS command prompt on drive C, enter the following
command to create the ISDBL.COM program:
Debug reads and follows the instructions in the ISDBL.SRC file. It is
recommended that you do not use this command from within Windows or
when other programs are running. If ISDBL.SRC contains an error, Debug
probably is not told when to quit; therefore, you will have to restart
your system. Debug may even be instructed to cause your system to stop
responding (hang). If this happens, restart your system and examine
ISDBL.SRC for accuracy.
If there are no errors in ISDBL.SCR, a few screens of information are
displayed, ending with
<nnnn>:012B INT 21
where <nnnn> is a combination of letters and numbers, the exact
combination of which varies. The remaining information should be
exactly as above if ISDBL.COM was compiled correctly.
Writing 000AE bytes
Debug places the ISDBL.COM file in the current directory, which in the
example above is C:\. It should be 174 bytes in size.
You can now run the ISDBL.COM program from within a batch file to get
information about a specific drive. Below is an example batch file:
REM This batch file uses ISDB.COM to test a drive to see if it
REM was compressed with DoubleSpace.
REM DBLTEST.BAT assumes that ISDBL.COM in in the current
REM directory or a directory on the MS-DOS Path.
REM The syntax for running this batch file is:
REM DBLTEST <drive>:
REM where <drive>: is the name of the drive to test, for example C:
REM If no drive is specified, the current drive is tested.
IF NOT ERRORLEVEL 1 GOTO FAILURE
ECHO The drive %1 is a DoubleSpace compressed drive.
ECHO The drive %1 is not a DoubleSpace compressed drive.
How ISDBL Works
In determining whether the drive is compressed, ISDBL assumes that
DoubleSpace is running.
ISDBL checks the specified drive by using Interrupt 2F, function 4A11.
This function is the DSGetDriveMapping application programming
interface (API) call for DoubleSpace. If the drive is compressed, then
Bit 7 of BL will be set. Otherwise, it is zero. This result is simply
returned at the end of ISDBL.