Category : File Managers
Archive   : FREE183.ZIP
Filename : FREE.DOC

Output of file : FREE.DOC contained in archive : FREE183.ZIP

FREE - Free Disk Space utility
Version 1.83
Howard Kapustein
February 3, 1990

Howard Kapustein
2 Waterview Road - Apt N-1
West Chester, PA 19380
(215) 692-8412

Program, Source, Documentation and attendant materials
(c) Copyright 1988, 1989, 1990 All rights reserved

Table of Contents



This program and accompanying materials are Copyrighted (C) 1988,
1989, 1990 by Howard Kapustein, All Rights Reserved.

Use of this program and accompanying materials acknowledges this
disclaimer of warranty: "This program and accompanying materials is
supplied as-is. The author disclaims all warranties, expressed or
implied, including, without limitation, the warranties of
merchantability and of fitness of this product for any purpose. The
author assumes no liability for damages direct or consequential,
which may result from the use of this product."


DESQview is a registered trademark of Quarterdeck Office Systems.
GEnie is a trademark of GE Information Services.
IBM is a registered trademark of International Business Machines.
Super PC-Kwik is a trademark of Multisoft Corporation.
Turbo Assembler and Turbo C are registered trademarks of Borland


FREE is NOT, nor has it ever been, public domain software. FREE is
being distributed under the User Supported software concept. You
may evaluate FREE for a trial period, in order to determine if it
suits your needs. FREE may be used for personal, non-commercial
reasons without registration. Any use of FREE by a business,
organization, or any kind of institution requires registration.

All users requiring registration are granted a limited license to
make an evaluation copy for trial use, for the express purpose of
determining whether FREE is suitable for their needs. After this
trial period, they must either register or discontinue using FREE.
Registration has several benefits, including notification of
updates, as well as helps the author to continue to provide
professional-quality software at very reasonable prices.

All users are granted a limited license to copy FREE only for the
trial use of others and subject to the above limitations. This
license does NOT include distribution or copying of this software

1 - In connection with any other product or service.
2 - For general use within a company or institution.
3 - For any consideration or 'disk fee'.
4 - In modified form, i.e. the file containing this license
information MUST be included, along with the full
documentation, executable and any other files distributed
with FREE.

Operators of electronic bulletin board systems (Sysops) are
encouraged to post FREE for downloading by their users, as long as
the above considerations are met.

If you are a distributor of a public domain or user-supported
software library, you may be eligible to distribute copies of
FREE. You must meet all of the above conditions and acquire
written permission from me, the author (Howard Kapustein) before
doing so. Such permission is usually granted. Please call or write
for details.

Distribution of a program incorporating FREE, in part or whole,
without the author's written permission, is a violation of the law.


Non-commercial use of FREE, as outlined above, does not require
registration. If you enjoy FREE and find it useful, send me a
picture postcard or a donation in the amount you wish to give.
Shareware has few material rewards, but feedback is always
appreciated. All comments, questions, suggestions and/or donations
will be gladly accepted.

Users may become REGISTERED owners for $7. Registering has the
following benefits:

Registered owners may use FREE in a commercial environment.

Registered owners will receive the latest version of FREE,
including full source code (this includes the assembly source
code not distributed via shareware).

Registered owners can update their registration to the newest
version of FREE for a nominal fee to cover diskette(s), shipping
and handling.

All materials are shipped on 5.25-inch floppy diskettes. Upon
request, materials can be shipped on 3.5-inch floppy diskettes for
an additional $5.00 to cover additional material, shipping and
handling costs.

An evaluation disk with the current copy of FREE on it is available
for $5. This is to be used to try out FREE , and does not include
registration. The fee covers the cost of postage, diskette(s), and

Non-U.S. orders need to include $5.00 extra to cover additional
shipping and handling charges. Checks and money orders must be
drawn on a U.S. bank. Please send all payments payable in U.S.

When registering, please use the form in the accompanying file


Quantity discounts are available starting at the 6th copy, as

0- 5 copies: no discount
6-10 copies: 10% discount
11-20 copies: 15% discount
21+ copies: 20% discount

LAN licensing is available for $10 plus $4 per user.

Discounts are not cumulative; they apply to single orders of like
products only.


I know this is a pretty simple program. There are plenty of
versions of free disk space programs in the public domain, but none
suited my needs. FREE sports many features besides displaying the
disk space available:

1) Small and Fast
2) Check more than 1 drive per run
3) Optionally check all drives
4) Optionally wait for a keypress after execution for use
with DESQview (tm)
5) When checking an unready drive (e.g. a floppy drive with no disk),
avoid the dreaded "Abort, Retry or Ignore?" message
6) Network compatibility
7) Determine the drive type (Hard disk, 1.44M floppy, etc.)
8) Optionally skip specific drives
9) Quick free space or tabular display
10) Use standard output (so output can be redirected)
11) Support for large partitions (>32MB)

For a quick start try FREE -?


To invoke FREE, use the form:

FREE [options] [drive] [drive] [drive] ...

options = command line options
drive = drive letter

Options must be preceded by a slash (/) or dash (-). If a command
line parameter does not begin with a slash or dash, it is
considered to be a drive letter. Any characters after the first
character of a drive letter parameter are ignored (e.g. FREE A will
have the same effect as FREE A: or FREE APPLES).

If run without any parameters, FREE will display the message "Drive
X: has N bytes free (P %)", where X is the current drive, N is the
number of bytes of available on the disk, and P is the percentage
of the disk available.

EXAMPLE: FREE run from drive C:

RESULT: Drive C: has 90,112 bytes free (0.42 %)

FREE can check multiple drives. Merely list the drive letters on
the command line. In addition, FREE will interpet the character *
as the current drive.


RESULT: Drive A: has 272,384 bytes free (75.14 %)
Drive C: has 90,112 bytes free (0.42 %)
Drive D: has 225,280 bytes free (1.06 %)

EXAMPLE: FREE A C D * run from drive C:

RESULT: Drive A: has 272,384 bytes free (75.14 %)
Drive C: has 90,112 bytes free (0.42 %)
Drive D: has 225,280 bytes free (1.06 %)
Drive C: has 90,112 bytes free (0.42 %)

The command FREE * is equivalent to running FREE without any


The following parameters are recognized by FREE:

-? Help
Displays the help screen.

-A Auto-Detect Network Drives
Auto-detection of networks drives allows FREE to
intelligently determine when to perform absolute disk reads
to check a drives's readiness. If FREE determines that a
drive's type is "Network", it will not perform an absolute
disk read. This option is on by default.
See -N - Force Network Compatibility for more details.

-E Display All Error Messages
Forces FREE to display all error messages. Normally, FREE
will suppress certain error messages that are usually
unimportant. For example, when scanning multiple drives
(FREE -X or FREE -H) the LASTDRIVE= parameter from
CONFIG.SYS is used to determine how many drives are possible
on the system. If LASTDRIVE=E but the PC only has drives A:,
C: and D:, when FREE tries to check drive E: it will receive
an error, but ignore it. This prevents a cluttered display
of unimportant information. Using the -E option will force
FREE to display these error messages normally ignored.

-F Search All Floppy Drives
Causes FREE to search all physical floppy drives. PCs can
have 'logical' floppy drives that are not 'physical' drives
(e.g. a machine with only one floppy drive (A:) can access
it as either A: or B:). When searching multiple drives with
this option, FREE will only check those drives that actually
are present. Thus, a machine with one floppy drive will only
have drive A: checked. This avoids the "Insert diskette for
drive B: and press any key to continue" message.
See also -H and -X.

-H Search All Hard Drives
Causes FREE to search all non-floppy drives. This option
complements the -F option.
See also -F and -X.

-I[d] Ignore Drive
If the Ignore parameter is followed by a drive letter, FREE
will ignore that drive. For example, FREE -IC A C D will
only search drives A: and D:.
The Ignore parameter without a following drive letter
will reset the list of drives to ignore. For example, FREE
-IC -I A C D will search drives A:, C: and D: (useful in
conjunction with batch files and the DOS environment
variable FREEOPT. See DOS Environment Variables below for
more details).

-N Force Network Compatibility
To prevent that annoying "Retry, Abort or Ignore?" message
when checking floppy drives, FREE will always check to see
if the drive can be accessed via an absolute disk read. If
this absolute read fails, the drive is considered not ready
and skipped by FREE.
The problem with networks is the absolute read call only
works on local drives. Networked (remote) drives cause the
absolute read to fail, fooling FREE into thinking the drive
is not ready. Using the -N option will prevent FREE from
performing an absolute read before checking the disk's free
space. If FREE is to check a network drive, and the -A
parameter is not in use, the -N parameter must be used. Note
that with the -N parameter enabled, DOS will ask to "Retry,
Abort or Ignore?" when FREE checks an open floppy drive.
See -A Auto-Detect Network Drives for more details.

-S Summary Totals
Displays a summary of drives searched after the drives have
been checked.

-T Table Form Output
Displays a more informative message about the drives
searched in a tablular format. In addition to the free space
in bytes and a percentage of the entire disk, this option
also displays the total and used sizes, as well as the type
of drive.
See Drive Type Identification for more details.

-W[0][n] Wait For Keypress When Done
Originally designed for use under DESQview, the wait option
causes FREE to run as it normally would, displaying
information, but wait for a key to be pressed before
quitting. For example, FREE -W will cause FREE to display
information about the current drive and then wait for any
key to be pressed.
If a number follows the W, FREE will wait for that
specific key to be pressed instead of any key, where n is a
key code calculated from the formula:

scancode * 256 + asciicode

where scancode is 0 if the high byte of the scan code
returned by the key is 0 or 1 if the high byte is non-zero,
and asciicode is the low byte. This results in a number from
1-511. Most common keys (ESC, Enter, letters, etc.) have a 0
for a scancode, while most non-ASCII keys (e.g. function
keys, arrow keys, Alt-key combinations, etc.) have a
non-zero value. Refer to one of Norton's books or some other
reference guide for a list of IBM extended scan codes.
This number must be in decimal (base 10). If this number
does not begin with a zero, FREE will display the message
"Press key #n to end...". If this number begins with a 0,
no message is displayed.
If the number is 0, no message is displayed but FREE
will wait for ANY key.

-X Search All Drives
Causes FREE to search all drives. This option is equivalent
to searching all floppy (-F) and hard (-H) (FREE -X is the
same as FREE -F -H).
See also -F and -H.


FREE recognizes the DOS environment variable FREEOPT and will parse
it before any command line parameters. This is useful if you have
certain options you wish to use on a regular basis. For example, if
you want FREE to always run with Network Compatibility (-N), merely
SET FREEOPT=N at the DOS command line. Note that the FREEOPT
parameters do not begin with a slash or dash.

Any spaces in the FREEOPT variable are ignored. For example SET
FREEOPT=NI W27 is equivalent to the command line FREE -N -I -W27.


When FREE displays information in a tabular format (the -T option),
FREE will attempt to identify the drive type. This function only
works under DOS 3.0 and later. Earlier versions will simply display
Error as the drive type.
FREE can optimally recognize the following types of drives:
Floppy, 360K floppy, 1.2M floppy, 720K floppy, 1.44M floppy, Hard
disk, Network drive, SUBST'ed drive, JOIN'ed drive, Bernoulli Box,
and Tape drive. Other type messages can be Error if an error
occurred, Other and ?.

If you don't want the technical details, you can skip the rest of
this section. For the rest of you, here goes:

FREE uses the following steps to determine the hardware type:

1) If DOS version earlier than 3.1, TYPE = Error

2) Search the DOS List of Lists for the array of drive info

3) Search the drive info array for the drive we want

4) If the drive isn't found (e.g. Z: when LASTDRIVE=E),
TYPE = Error

5) Check the drive's bit flags to determine if TYPE = Subst,
Join, Network, Local (physical) or IFS (Installable File
System). If Local, check the specific drive type (see 7),
otherwise done.

6) If the drive is none of the above, TYPE = Error.

7) If the drive is physical (local), and the device attribute
word says the drive supports Generic IOCTL, check the
Media Type (Step 9).

8) The drive is physical and Generic IOCTL is not supported by
the drive, we cannot check the Media Type, so we must rely on
the Media Descriptor. A Hard Disk, 360K floppy, and 1.44MB
floppy all have unique MDs. Unforunately a 1.2MB floppy and
720K have the same MD, so FREE simply calls both a Floppy.
Also, certain older disk formats (320K, etc.) are also
considered Floppy, but can be easily differentiated by
looking at the Total disk size.

If TYPE = Hard Disk, check for Bernoulli Box (Step 10)

9) Using IOCTL - Generic IOCTL for Devices (INT 21, Function
0x440D) the Device Type is checked. If the type value is 0-8,
TYPE = 360K, 1.2M, 720K or 1.44M floppy, 8" Single or Double
Density floppy, Hard Disk, Tape Drive, or Other. Otherwise,
TYPE = ? (Unknown). Done.

If TYPE = Hard Disk, check for Bernoulli Box (Step 10)

10) Using IOCTL - Is block device changeable (INT 21, Function
0x4408), if the hard disk is removeable, TYPE = Bernoulli.
Otherwise, TYPE = Hard Disk.


FREE will not process a drive over a network unless the Auto-Detect
Network Drives option is used (-A) and FREE determines that the
drive's type is "Network", or the Force Network Compatibility
option is used (-N). See -A (Auto-Detect Netowkr Drives) and -N
(Force Network Compatibility) in Section VII. OPTIONS for more

The drive type of the RAM disk supplied with the Super PC-Kwik
(tm) Power Pak by Multisoft Corporation is not identified (TYPE
= Error). I believe this is a problem with Multisoft's
implementation of the RAM disk. The device attribute word for the
drive says it supports the Generic IOCTL for Devices function (INT
21, Function 0x440D), but the Generic IOCTL for Devices function
only generates an error when used on this drive. I am using version
3.30 of SuperPCK.Com and version 1.03 of PCKRamD.SYS.

The drive type of a VDISK drive is not identified (TYPE = Error). I
think the problem is the same as with Suprt-PC-Kwik's RAM Disk.
VDISK's device attribute word says it supports Generic IOCTL for
Devices, but the IOCTL function always returns an error.

When running FREE in the OS/2 (In)Compatibility Box, all drive type
identifications should fail (Error). The function to find the DOS
List of Lists is not supported in the DOS Box. I have not confirmed
this yet as I do not have access to OS/2, nor do I think many OS/2
users will be using FREE in the DOS Box, but you never know.

Due to a bug in ASSIGN, the total number of clusters a drive has
can not be detected after ASSIGN has been installed. If FREE is run
while ASSIGN is installed, unpredictable results may occur (usually
the total size will be a negative number, with any calculations
derived from the total size also being negative).

For you programmers in the audience:

The Usenet INTerrupt list, version 90.1, notes that for INT
21h, AH=36h (Get Disk Space), the Notes section says
"according to Dave Williams' MSDOS reference, the value in DX
[total clusters] is incorrect for non-default drives after
ASSIGN is run". First hand testing proves this out.

GetDiskType() now checks if the drive is mapped to a different
drive via ASSIGN. ASSIGN maps drive letters between INT 21 and
the List of Lists. If ASSIGN is installed and a drive is
ASSIGNED somewhere else, looking at the List of Lists without
checking where the drive is ASSIGN'd will give inaccurate

According the the Usenet INTerrupt list version 90.1, ASSIGN
can be detected by AX=0600h, INT 2Fh, and AH contains the
answer, where "AH <> 0 if installed". However, first hand
testing shows that AL, not AH, contains the answer (like other
identifications via the Multiplex interrupt, e.g. DRIVER.SYS,
etc.). FREE checks AL, not AH, and seems to perform properly.
If someone could pass this information on to Ralf Brown,
author/collator of the Usenet Interrupt list, I would
appreciate it.


I am a recent graduate of Rensselaer Polytechnic Institute (May
'89) with a B.S. in Computer Science and a minor in Accounting.
I also do consulting/programming work as a sideline (hint hint.)
Currently, I'm working full time at Shared Medical Systems (SMS)
in Malvern, PA. Aside from C, I'm also fluent in Clipper,
Assembler, Pascal, and several other less common languages.


FREE was compiled with Turbo C (tm) 2.0 on an IBM PC with the
Tiny memory model optimized on Speed and all optimizations
turned on (Register and Jump optimization, and Merge Duplicate
Strings). The object files distributed with FREE were created
with Turbo Assembler (tm) 1.0.

Release notes: 2-2-88 Version 1.0 - Initial release

2-22-88 Version 1.1
- checks for drive ready before checking
free space
- skips drive B: only 1 drive present
(B: is a logical drive, not a physical
- optional wait after execution can now
wait for a specific key (specify its
decimal scan code, only valid for keys
1-255 (no extended keys i.e. Alt-C, etc.)
- fixed a bug with the strtocomma() function.
If a 4-digit number (i.e. 9216) was passed
to it it would not insert any commas
- I no longer make FREE.COM, for some reason
under DESQview FREE.COM 1.0 still needed
approx 70K, so until I can figure out how
to get FREE to use appropriate only the 11K
or so it needs, I'm not going to bother
playing with COM files

2-29-88 Version 1.2
- recompiled under Turbo C 1.5 (it only took
them 6 weeks instead of the 2-3 it should
have...) I turned on ALL optimizations
(speed, use regs, optimize regs and jumps.)
Previous versions were only compiled with
speed and use registers.
- modified the parsing for more coherent
program flow
- made waitforkey() after having extensive
difficulties getting the -w option to work.
This seems to have fixed the runtime bugs
I was getting after recompiling with TC 1.5
- changed the HEAP and STACK size so it will
run with less memory
- removed some needless comments left over
from old coding
- include a DESQview .DVP file for use with

3-19-88 Version 1.3
- fixed the bug with multiple drives
specified on the command line. It seems
that TC 1.5 DOES NOT let you use the
generic argc and argv as in
main(int argc, char *argv[]) Now Borland
wants you to use their global variables
(extern int argc, etc.). Nice of them not
to mention the fact that the old method
no longer works.

3-23-88 Version 1.31 - Internal release only
- if you try to do a FREE - with no
parms free would check the default drive.
This has been fixed to display the help
(technically, doing FREE - is wrong)
- version 1.2 allowed -w[n] option to check
for extended key codes, but I forgot to
document it. Use this formula to get the
value for the wait option:

extended * 256 + scancode

where extended is 0 if False and 1 if True
and scancode is the scan code returned by
the key (refer to one of Norton's books
or some other reference guide for a list
of IBM extended scan codes.)

4-10-88 Version 1.32 - Internal release only
- I removed a printf() left over from
- included info about contacting me during
the school year

5-6-88 Version 1.33 - Internal release only
- included % free

5-11-88 Version 1.34 - Internal release only
- fixed -w option, was skipping past
1st digit of keycode ([n])
- also, discovered the problem with the
-w option. Compiled w/full optimization,
the waitkey value was stored in a
register which was destroyed during the
absread(). This is a problem of the
TC library itself. I don't remember
who it was who discovered this flaw, but
if you drop me a line I'll update these
docs. He has notified Borland, so
hopefully the next TC will have this bug
fixed (if not sooner, but I'm not
holding my breath.) Thank you for the
debugging, it gave me many a restless
hour. DO NOT compile FREE with register
variables on, or unknown results may
(and probably will) occur

11-9-88 Version 1.4
- recompiled under TC 2.0 in Small model,
Merge duplicate strings On, Standard
stack frame Off, and all Debug info
left out. Couldn't compile under Tiny
(Cannot generate COM file: segment-
relocatable items present) probably because
of the FP emulator - see below
- added optional message if wait for key
- added -f and -n (search only floppies,
non-floppies). The -x option is equivalent
to -fn
- added -e option (full error display, useful
if you want to see any errors during a -f,
-n, or -x run). This setting is turned on
automatically for single mode (if -f, -n
and -x are not specified)
- minor code tinkering for aesthetics
- DESQview 2.2 .DVP file
- for some reason, FREE running under
DV 2.2 now requires 65K. According to my
estimates, it needs anywhere from 44K to
66K. I think this is related to the Tiny
problem (inability to make .COM file). If
anyone can figure out why, please let me
know. Without the FP emulator, I can't
display a % free, but requiring 65K to get
a free disk space count is ridiculous

2-7-89 Version 1.5
- new option -N, Network compatibility,
skips the absolute disk read before
checking free space. If a free space
request is attempted on drive A: with
no floppy in the drive, DOS bombs out to
the Abort,Ignore,Retry message. Turning on
this option should allow execution on
drives not physically available (networks,
those accessed via device drivers, etc.)
- changed option letter -N to -H to allow
network compatibility. The -H option
will scan non-floppy drives (generally
fixed disks, C: and up.)
- no longer compiled with the FP emulation,
the % free real number is now achieved via
integers. Without the FP emulation FREE can
be compiled with the Tiny memory model.
- added check for DOS environment variable
FREEOPT for options
- changed the Heap size to 4K and the stack
to 1K
- changed the command line parsing to a
separate function, and no longer copy each
*_argv before processing it. The pointer
char *temp replace the older char temp[30]
for several reasons: instead of a strcpy()
we can just do a temp = *_argv, and if an
argument string was longer than 29
characters, we would have problems copying
to temp[30]. Pointers make life simpler
- you can now check multiple drives via
command line switch, and specific drives
via drive letter, in the same run (i.e.
FREE /F B: checks all floppy drives and
drive B:)
- IMPORTANT! FREE is now distributed as a
.COM file! If you are using an earlier
verison with a .EXE extension, make sure
you delete it otherwise DOS may not find
the proper file to run. See above regarding
FP emulation as to why we're back to a
.COM file.
Note: I've enclosed the substitute division
function within a conditional #if...#endif
set so you can recompile easily with the
emulation or 8087 library and not have
unnecessary code. If MATH_FP87 or MATH_EMU
is #defined, the rdiv() function will not
be compiled. Otherwise, no math library
will be linked in, and the final .COM
will only need ~15K to run.

2-8-89 Version 1.51
- if no command line arguments given, only
the current drive would be checked, even
if FREEOPT=X. Fixed

2-17-89 Version 1.6
- new option -t gives disk total size, used
disk space, etc. a list of all disk space
info. To do this, the functions rsub_t(),
rnormalize() and lpow() were created (real
subtraction w/o a math library), as well
as their attendant global variables.
WARNING: these substitute floating point math
functions have minimal error checking.
Given the scope of this program, they
are adequate, but for a more complete
implementation of these (and other)
functions, try my Turbo C library TCHK
(currently distributed as TCHK20.ARC).
NOTE: as per the rdiv() function, these
substitute fp functions/variables are
enclosed within #if...#endif to avoid
compilation if a fp library is used.
FURTHER: the compiler may generate 2 warnings
(structure passed by value) if your
warning settings are just right. Don't
worry about it, those are the structures
passed to rsub(). It's valid C (or at
least ANSI C) but potentially erroneous
to pass structures instead of pointers to
structures, so Turbo C warns you.
- changed the code to check only as many
drives as DOS recognizes. Under DOS 1.x,
2.x and 3.x, there can be as many as 16,
63 or 26 drives available, respectively.
Previously I just checked drives 1-26
(A:-Z:), which was an erroneous assumption
on my part. Thanks to John Craven for
mentioning Int 21h Function 0Eh (setdisk()
in Turbo C) as the proper method for
detecting the number of logical drives.
- changed the code to skip B: if it does
not physically exist. This should clear
up the problem Michael Thompson has been
having with the scan drives (/x or /f)

3-18-89 Version 1.61
- fixed bug, FREE would not recognize a B:
drive. The biosequip() & 0xB0 ... line was
faulty, should be 0xC0 (wrong bit). This
produced random (and usually wrong) results.
Thanks to Scott Mason for informing me of
the error and his and Michael Thompson's
efforts in finding the solution
- removed #define isBlogical() (not used in
FREE 1.6 but never removed)

6-24-89 Version 1.70
- changed numbers in table output (-t) to be
comma separated for easier reading. I left
the old printf() command commented out in
case you prefer the raw numeric output. If
you uncomment the old code, don't forget
there are 2 places to do it (because of
the #ifdef...MATH...#else...#endif
simulated math)
- Renamed flag.disktotal variable to
- new option -s to give summary of free
space (totals, synopsis, etc.). Added
variables total_... to options structure
to support this
- changed exit code numbering, now sets
errorlevel to 0, 1, 2 or 3 (previously used
3, 9, 11, and 67, not necessarily in that
- during parsing of command line for drive
letters, the character '*' is now
interpreted as the current drive (i.e.
FREE A * will search drive A: and the
current drive)
- now distributed with files FREE.MSG,
are a brief overview of Free, a file
description for use by GEnie, and file
descriptions for use by ProDoor and ZDoor

1-14-90 Version 1.80

- New: Supports >32M partitions. DOS 3.31 w/partitions > 32M
and 4.0+ make a slightly different call to do an absolute
read than previous versions of DOS (TC's absread() is for
pre-4.0 disks with partitions < 32M). I've written my own
absolute disk read functions that can work on any drive
(irrelevant of partition size) in Assembler, as well as the

drive identification functions. Since not everyone has an
assembler, but want to be able to compile FREE (whether for
personal customization or simply educational benefit, I've
provided conditional compiling of the C functions.

Note: I've enclosed the assembler substitute functions
within a conditional #if... #endif set so you can
recompile easily if you don't have an assembler. If
ASSEMBLY_REQUIRED is #defined, FREE can be recompiled
with just Turbo C. The distributed .COM file has been
created with the assembly code linked in, providing
full functionality.

- New: Detects the drive type. See Drive Type Identification for
more details. Seems ot have a problem with the Multisoft's
RAM disk (part of their Super PC-Kwik Power Pack). See
Known Incompatibilities for more details.

- New: added -I[d] parameter to ignore drives. New structure
element flag.ignoredrives is a bit field, where bits 0-25
represent drives A: - Z:. If a bit is on, the drive is
ignored. Just -I, no drive letter, resets the ignore list.

- New: added exit code 4 when a bad drive letter is specified
for the -I[d] parameter

- NewCode: added structure element flag.nothingchecked, so if
all drives to be searched are ignored, the message "No
drives checked" is displayed

- Fixed: skips whitespace in FREEOPT (e.g. "SET FREEOPT=T X"
works now, equivalent to FREE /t /x)

- ChangedCode: changed the definition of boolean from a
#define to a typedef

- Changed: My new phone number is listed

- Changed: revamped documentation

- Changed: FREE is now compiled with a make file instead of
batch files. Distribution includes the make file as well
the TURBOC.CFG and FREE.RSP files used to create FREE

- New: FREE now requires registration by commercial
institutions. The registration is nominal, and the
advantage is source code to the Assembly modules. This
allows me to distribute full source code and still honor
legal and ethical obligations.

1-20-90 Version 1.81 - Internal release only

- Fixed: Network drives were identified as Error instead of
Network, due to a flaw in the GetDriveType() function.
GetDriveType() now returns different values, and the C return
type is now an int instead of a char. Due to necessary
changes, GetDriveType() requires DOS 3.1+. If used under
earlier versions of DOS, an error is returned.

BUG NOTE 1: identifying LANtastic nodes as IFS, not Network.
Auto-detect network drives wasn't working, but I think it's
related. Will be corrected before public release.

BUG NOTE 2: Fixed(?): IFS drives are only recognized under DOS
4.x+. If the List of Lists says the device is IFS but not DOS
4.x (3.x or earlier), it's assumed to be a network drive. For
some reason, under 3Com's 3+ network, bits 14 and 15 were on
for networked drives (14=local, 15=network, both=IFS,
neither=error) under DOS 3.3. I assume this was the same
problem under LANtastic. This is the real fix. See notes for
version 1.82 for more details.

- New: added -a option, Auto-Detect Network. If FREE determines
a drive is a network drive, it will NOT perform an absolute
disk read to check if the drive is ready. This options is on
by default. To disable auto-detection, include -A- on the
command line.

- Changed: -n renamed from "network compatibility" to "force
network compatiblity". Renamed network variable in struct
options to forcenetworkcompat.

- Changed: some of the code has been prettied up. Function names
are now mixed case, etc.

- Fixed: forgot to update Help screen information between
completion of code changes and completion of documentation.

- Fixed(?): Rick Nakroshis notified me of a problem with Disk
Manager and large partitions. I have changed the assembler
code that determines whether to use the new absolute disk read
(for large, >32M, partitions) or the old call. Previously if
DOS was 3.3 or earlier, the old call was always used, without
bothering to check the device attribute word. However, DOS 3.3
and earlier can have large partitions via third party software
(e.g. Disk Manager). Now the DAW is always checked, and the
answer determines which call to use.

NOTE: I do not have access to a large partition drive, DOS 3.31,
4.x or any partitioning software. If you have access to
any of the above equipment, please test this program
and let me know if there are any problems.

1-25-90 Version 1.82

- Fixed: Network drives were not being properly detected, due to
a flaw in the code. After some changes were made, network
drives were always identified as IFS (tested under LANtastic
and 3COM's 3+). Performing further testing (thank you Turbo
Debugger) showed that network drives under DOS 3.3 were
identified as IFS drives. This has been fixed, I hope, to
distinguish between network drives and IFS drives.

Why? Try this one on for size: In the List of Lists, a word
signifies what 'category' the drive falls under, SUBST, JOIN,
Network, Local or IFS. Bit 15 is the Network bit and bit 14 is
the local bit. If neither bit is on, it is an error. If one
bit is on, it is that type. According to old information, if
both bits are on, it is an error. Poring through new
information (the Unsenet INTerrupt list version 90.1) shows
that if both bits are on, the drive is IFS. IFS drives were
added to DOS 4.0, and are not available in earlier versions.
Yet, for some reason, networks under DOS 3.3 set both bits on.
Since IFS drives require DOS 4.0+, if a drive is identified
as IFS and the DOS version is earlier than 4.0, it is
considered a network drive. Testing under networks shows FREE
to work fine, and since I do not know of any IFS' under DOS
4.x, I have not had a chance to test FREE's detection of IFS
drives. If you experience problems with incorrectly identified
network or IFS drives, please let me know and I will look into
it, though I doubt there will be any problems.

- New: added note to Incompatiblities section in documentation
regarding VDISK (VDISK drives are not identified, Error),
running FREE in the OS/2 (In)Compatibility Box (all drive type
identifications should fail, Error), and running FREE when
ASSIGN is installed.

- New: added new assembly module ASSIGN.ASM to detect ASSIGN'd
drives. ASSIGN.OBJ distributed with shareware release for

2-03-90 Version 1.83

- Fixed: my absolute disk read function for large partitions
(>32M) had a bug, resulting in unpredictable results (i.e.
YASC - Yet Another System Crash, as we all know and love under
DOS) when performing absolute disk reads on large partitions.

FYI, the new INT 25h (absolute disk read for large
partitions), has the same "bug" as the old INT 25h, leaving
the flags on the stack upon return.

Thanks to Charles Kleis, Tadas Osmolskis, John Redford, Rick
Nakroshis, Robert Blacher and several others on Computer
Connections for informing me about problems using FREE with
large partitions, and to Dirk Lesko for pointing out the INT
25h "bug" (and Ray Duncan for his excellent reference Advanced
MS-DOS, 2nd Edition).


I'd like to add identification of RAM disks. Aside from that, I
think I've hit the peak of FREE's development. Then again,
that's what I thought back at version 1.7. If you have any
suggestions, let me know.


I am also the author of the following products:

COOKIE 1.3 - Fortune cookie, gives you a random fortune from a
cookie file. Lots of options and distributed with
3200 cookies of mixed content (rated G - X)

DCOUNT 1.2 - Document/Text file info, find out all kinds of
information like # words, lines, pages, control
characters, etc. A small program, but it suited a
small need. Several options.

SF 3.32 - Subtree Find, a powerful directory searcher. SF's
main claim to fame is being able to search a branch
of a disk directory, from a single directory to an
entire disk, 5%-250% faster than the leading file
finders! (Compared with Norton's and Graham's
programs). Other features include displaying more
information than DIR (attributes, disk space used,
etc.), delete files, touch date and/or time, modify
attributes, color output, pause during display,
permanently configure options, search inside .ARC
and .ZIP files, network compatible, and much much
more. Written in Turbo C 2.0 and linked with TCHK
Coming soon, Subtree Find 3.4! New enhancements
include support for PKZIP 1.x files (including
file and archive comments), faster ZIP searching,
multiple output formats, and more.

TCHK 2.10 - Turbo C library Version 2.1 by Howard Kapustein,
sporting over 350 functions, featuring date, time and
string manipulations, keyboard and video routines,
litebar and popup menus, mouse control and information,
math and financial functions, DOS, printer and ANSI
routines, multitasking support, hardware and software
identification, joystick and file functions and much
more. Distributed with many examples and a Norton Guide
database. Look for TCHK21.ZIP, TCHK21EX.ZIP and
TCHK21NG.ZIP in a download area near you.
Coming soon, TCHK 2.2! New enhancements include
full dBASE data (.DBF) and index (.NDX) file access
functions, XMS support, and more.


Thanks to the graciousness of the sysops at The BOSS, Computer
Connections, The Invention Factory and The Tool Shop, I have
easier access to their BBSes. The latest versions of my software
can be found there. I can quite often be found on Computer
Connections, but only infrequently at the others.

If there are some features you would like to see implemented, or
you have any questions or comments, please contact me. I can be
reached at the following:

Howard S. Kapustein
2 Waterview Road - Apt N-1
West Chester, PA 19380
Phone: (215) 692-8412

I am usually available weekdays after 6 P.M. EST and weekends after
12 Noon. If I am not available, please leave your name, number and a
brief message on my answering machine and I will return your call as
soon as possible. Just one favor: please do not call before noon on
the weekends. I'm a night person, not a morning person, and look
forward to sleeping late a couple of days a week.

*** If I have to call you I'll have to call collect ***

or at the following electronic services/bulletin boards:

The Boss dBBS (201) 568-7293 *** Support BBS ***
The Invention Factory (212) 431-1254 Distribution BBS
Computer Connection (202) 547-2008 *** Support BBS ***
The Tool Shop (602) 279-2673 Distribution BBS
GEnie H. Kapustein
Also: IBM RT, SET 4, TOPIC # 25
Borland RT, SET 2, TOPIC # 55

These are the places I can be reached by modem. FREE (and all
other software I release) is supported through The BOSS and
Computer Connections.

- End of Documentation -

  3 Responses to “Category : File Managers
Archive   : FREE183.ZIP
Filename : FREE.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: