home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
filutl
/
qcrc21.arc
/
QCRC.DOC
next >
Wrap
Text File
|
1987-11-16
|
19KB
|
483 lines
QCRC.DOC
========
Quick CRC Calculator
Release 2.00
by
W. G. Madison
W.G. Madison and Associates, Ltd.
Consultants / Information Systems
P. O. Box 898
Greenbelt, MD 20770
(301)552-7234
(CompuServe 73240,342)
The Author is a member,
Association of Shareware Professionals
========================================================
| Shareware |
| |
| We encourage you to freely copy and share unmodified |
| copies of this product with other people. If you |
| decide to use the product, support the Shareware |
| marketing concept by becoming a registered user. |
========================================================
DISCLAIMER
----------
This program is released for use AS IS. Neither the Author
nor W.G. Madison and Associates, Ltd. will be liable for any
actual or consequential damages resulting from its use, even if
they have received prior notification of the possibility of such
damage.
PURPOSE
-------
How often have you received a disk containing some of your
best friend's favorite software, spent two or more hours attempt-
ing to install it on your system, and then discovered that a
critical file was flawed? If this has never occurred, or if you
never give or receive (and never expect to give or receive) soft-
ware in this way, stop right here, and go back to whatever you
were doing before you began looking at this file. QCRC is pro-
bably not for you.
If, on the other hand, you have been in the above described
situation, you will appreciate the advantage of having a quick
way of checking whether or not the disk(s) contain(s) errors.
1
QCRC provides such an opportunity.
QCRC is a utility for calculating a Cyclic Redundancy Check
(CRC) for one or more files. The output, an alphabetized table of
file names with their associated CRC values, is by default dis-
played on the screen. Optionally, it may be directed to a file.
Thus, using QCRC, your friend would have been able to in-
clude a file containing the CRC value for each file on the disk
sent to you. Using QCRC's Verify option, you would then have been
able to re-calculate the CRCs upon receipt of the disk, and check
that the values were identical. There is a probability that two
files could have the same size and yield the same CRC value, but
not be identical. This probability is *extremely* small, however.
SYSTEM REQUIREMENTS
-------------------
Hardware: PC/XT/AT or close compatible.
50k bytes available after DOS and any desired |
TSR's have been loaded. This is sufficient for processing
and sorting information for somewhat over 250 files. If a
greater capacity is needed, please contact the author at the
address at the top of this document.
Software: DOS 2.x and higher. (Note: QCRC has been tested
only on DOS 3.x. There is no reason, however, to expect that
it will not run on 2.x systems.)
USAGE
-----
{Note: Change bars (|) in the right margin indicate substantive
changes from the previous version 1.11}
QCRC [[Dev:][Path]]FileSpec[/Switch=value[/Switch=value...]]
where
[Dev:] is an optional disk drive designator
[Path] is an optional path specifier
FileSpec is a (possibly ambiguous) file specification
Switch is a switch designator, and
If Switch is F then value is the file name to which
the output will be written.
Default is the screen.
If Switch is C then value is the number of columns
the output will be formatted.
Default is /C=1
If Switch is V then value is the name of the file
whose contents will be used
for verification.
If Switch is A then all files matching the selec- |
tion mask will be verified. |
The default action is to ver- |
2
ify only those files which |
are selected AND appear in the |
verification file. |
EXAMPLES:
QCRC *.ARC will write the CRC for each .ARC file
in the current directory of the current
device.
QCRC A:*.* will write the CRC for all files in the
current directory of device A:
QCRC B:\FOO\*.* will write the CRC for all files in
directory \FOO of device B:
QCRC BAZ.*/F=MOO will write the CRC for files BAZ.* with
output written to file MOO.
QCRC BAZ.*/F=LST:/C=2 will do exactly in the prior example,
but formatted in two columns on the
printer.
QCRC BAZ.*/F=MOO/V=XYZ will again calculate the CRC for all
files BAZ.*, but will additionally
check the newly calculated CRC against
the value stored in file XYZ. The re=
sults of the comparison will be written
to file MOO. Only those BAZ.* files
which appear in file XYZ will be
verified.
QCRC BAZ.*/V=XYZ/A exactly as in the prior example, but |
all BAZ.* files will be verified. |
Notes:
1. If the C option (/C=) is omitted, /C=1 is assumed.
If an invalid parameter value is supplied, /C=1 will
be used. Valid parameter values are the integers 1,
2, or 3.
2. If the /V= switch is included, any C option will be
ignored, and single column output will be provided.
3. If an output file (/F=) is intended for later use as
a verification file (/V=), then it *MUST* be written
in single column format.
4. If the output file (/F=) is intended to be used
later for validation/verification, this file may be
edited to include additional descriptive information
provided certain conditions are met. Specifically,
a. In using a file for verification, QCRC assumes
that any text line containing a '.' in column 11
*AND* a valid 4-digit hexadecimal number (i.e.,
containing only the characters '0'..'9' and/or
'A'..'F') in columns 17 - 20) contains file informa-
tion in columns 3 - 20 only.
b. Any information outside this range of columns is
3
ignored.
c. Any lines not meeting the criteria set forth in
(a) are ignored.
Thus, the following file (e.g.,) would be perfectly
usable for validation/verification purposes.
Columns
0000000001111111111222222222233333333334444444444555555
1234567890123456789012345678901234567890123456789012345
-------------------------------------------------------
ARCM131 .ARC E690 Version 1.31 of ARCMASTR. Minor
bug fixes. Fast exit.
FFMT .ARC 4BDF Fast disk format. A, B w/o pause,
or A alone. TURBO/PASCAL source incl.
LIST62A .ARC 62D1 Version 6.2A of Vern Buerg's LIST.
See .DOC file for changes.
QCRC .ARC 5F3A Quick file-CRC calculator.
5. Timing tests on QCRC have shown the following:
a. Normal file size mix: 250 files, 2.54mb total
Run time: 5m23s without verification
5m35s with verification
b. Large file mix: 7 files, 2.43mb total
Run time: 3m28s without verification
3m30s with verification
These timings should, of course, be regarded only as
"figures of merit". The absolute figures will change
as QCRC is run on systems with different hardware,
or differently configured than that on which the
tests were conducted.
HISTORY AND BACKGROUND
----------------------
For those unfamiliar with CRCs, suffice to say that they are
very powerful generalizations of the more familiar 'parity check'
schemes, such as those which have been used at least since the
early days of digital magnetic tape recording.
As such, calculating the CRC of a block of data prior to its
transmission and again following transmission, and then comparing
the results of the two calculations, provides an excellent indi-
cation of whether the transmission process introduced any errors
into the data.
It is important to realize that different file allocation
schemes can lead to different CRCs on identical files. For exam-
4
ple, the file allocation scheme used by DOS will lead to a differ-
ent CRC than the scheme used by CPM. Thus, in order to use QCRC
effectively, you must be aware of both the originating and the
destination environment. In most cases, this will not be a prob-
lem, but the potential exists and must be recognized.
The CCITT (for those who enjoy living life the hard way,
CCITT is the designation for the International Consultative Com-
mittee for Telephone and Telegraph, a branch of the United
Nations) has recommended the use of a specific generator polynom-
ial for use in calculating the CRC for data blocks in asynchron-
ous communications. This polynomial is (X^16 + X^12 + X^5 + 1).
While its recommended use primarily deals with block trans-
mission of data (as in the X/Y/ZMODEM protocols), it has come
into widespread use also as a generator polynomial for file-level
CRC. This is therefore the generator polynomial which has been
used for QCRC.
Those sufficiently interested and/or masochistic as to want
to find additional information regarding the theory of CRC are
referred to:
1. SOBOLEWSKI, J.S., "Cyclic Redundancy Check", in Ralston,
A. (ed.), Encyclopedia of Computer Science and Engineering (2nd
Ed.), Van Nostrand Reinhold Co., 1983, p.434ff
2. PLESS, V., "Introduction to the Theory of Error-
Correcting Codes", John Wiley and Sons, 1982, p. 59ff
Both of these references include bibliography for additional
study.
AND FINALLY
-----------
QCRC copyrighted (C) 1987 by W.G. MADISON AND ASSOCIATES,
Ltd.. All rights reserved.
Distribution
QCRC is specifically authorized for distribution, under the
SHAREWARE principle, via public electronic bulletin boards or by
individual copying. Any distribution thus made must be in the
form of this entire .ARC file, UNALTERED, including both the
program executable file and this documentation file. NO OTHER
FORM OF DISTRIBUTION, INCLUDING DISTRIBUTION AS PART OF A LARGER
PACKAGE, NOR DISTRIBUTION FOR A FEE (other than a nominal copying
charge), IS AUTHORIZED WITHOUT SPECIFIC WRITTEN PERMISSION OF THE
COPYRIGHT HOLDER.
If you find the program useful, and continue to use it past
a reasonable trial period, you are required to send a check or
money order in the amount of $10.00 (U.S. funds only, please) to
the copyright holder at the address shown at the top of this
5
file.
Clubs operating on a non-profit or not-for-profit basis may
provide QCRC to their membership without payment of the normal
registration fee, as a mechanism for validating disks received
from the club library, provided that the other conditions of this
section are met. Please send in the registration form, indicating
the club name as the registered user.
Support
Registered users are provided with free updates, telephone
support. A recorder is provided on the telephone number listed
above, if noone is in the office, and a call-back is guaranteed
no later than the next business day. Bug fixes or work-arounds
will be mailed to the complainent, if a registered user, and will
also be uploaded to CIS (IBMSW) and to major BBS's in the metro-
politan DC area.
Contact
Telephone contact may normally be made between the hours of
7:00AM and 9:00PM (Eastern time), but see above. Non-registered
users are welcome to call, and will be accommodated on a "time
available" basis. Contact may, of course, always be made through
CIS EMAIL on the PPN given above.
Other Shareware Products
You may wish to try these other products of Madison and
Associates:
STORM - A comprehensive hard disk management aid. Provides:
1. Directory listing of all files on the disk,
sorted by NAME.EXT, Directory, or Size
(Decreasing).
2. Directory listing of all potentially duplicate
files on the disk.
3. Global deletion of all files matching a user-
supplied mask.
4. WHEREIS-type function to locate all files match-
ing a user-supplied mask.
5. Summary of disk usage by subdirectory.
6. Visual presentation of the directory structure of
the disk.
BPRINT - A utility to print files with banner pages. Prints
the name and extension in large block letters, fol-
lowed by a date/time stamp of when printed and the
home directory of the file.
POTPOURI - A collection of (trivial and sophisticated) subpro-
grams for users of TURBO/PASCAL. Includes:
1. Procedures for displaying and reading data from
menus;
2. Trancendental functions for TURBO/BCD;
3. Procedures for manipulating dates, without re-
striction (provided only that the dates being
manipulated are *after* October 15, 1582 AD, and
are *before* January 1, 7496237 AD);
6
4. Procedures for examining and manipulating direct-
ory trees and files; and
5. Some out-of-the-ordinary string manipulation
procedures.
7
Product Registration & Comment Form
-----------------------------------
Name:___________________________________________________________
Company:________________________________________________________
Address:________________________________________________________
City:__________________________ State:_____ ZIP _______________
Telephone:(_____) _____-_______
Product name: QCRC Version:_____._____
Comments:
Payment:
Please register my copy of QCRC. ($10.00) ____.__
(MD residents only) MD 5% Sales Tax ____.__
TOTAL ____.__
Mail To:
W.G. Madison and Associates, Ltd.
Consultants / Information Systems
P. O. Box 898
Greenbelt, MD 20770