home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
DARTUTIL.ZIP
/
UTIL.DOC
< prev
next >
Wrap
Text File
|
1989-04-02
|
12KB
|
202 lines
MSDOS UTILITIES BY JON DART - Version 3.3 of 30-Mar-89
This disk contains a collection of utility programs, including
several which mimic the operation of unix (tm) commands.
All of these programs require MSDOS or PCDOS version 2 or above. To
run SHOW and MODEM, your computer must be IBM-compatible at the BIOS
level (SHOW can be reassembled to produce a "generic MSDOS" version).
LS is supplied in both generic and PC-dependent versions. The other
programs are not at all machine-specific and should run on any MSDOS
system.
LS displays a sorted directory with file sizes. There are several
such programs in the public domain, but all of the ones I have seen
have deficiencies--they are too big, too slow, don't show the disk
free space, can't display system files, and/or use tricks that render
them unusable on my computer, which is NOT a perfect IBM clone. LS is
designed to be easily adaptable to any "generic MSDOS" system, with at
most minor modifications. There are two executable files on the disk:
LS.EXE and LS-PC.EXE. LS.EXE is "generic" and will run on most MSDOS
computers, while LS-PC will run on IBM PCs, ATs and close clones only.
LS is used like the DIR command. To see the contents of your
current directory, just type LS. If you follow LS with one or more
file names, it will show only files matching those names (the names
can contain wildcards). You can also insert one or more of the
following options on the command line:
-A displays system and hidden files
-D displays information on a directory, not its contents
-L displays a "long" listing with file sizes in bytes, times and
dates
-N produces a non-sorted output (with files in the same order they
are in the directory)
-R reverses order of sort
-S displays file sizes in kilobytes
-T sort by time rather than name of file
-1 forces single-column output with no paging (like DIR)
HEAD and TAIL are simple filters that display a few lines from the
start or the end of a file, respectively. The general syntax for these
programs is:
HEAD -n file1 file2 ...
n is the number of lines to display: e.g. "HEAD -50 FOO" displays
the first 50 lines of "FOO". Wildcards can be used in file names.
The default number of lines is 20; the maximum that can be specified
is 65535. If no input file is specified, HEAD reads from the standard
input, so it can be hooked to another program's output via a pipe.
TAIL is used similarly.
WC is a utility to count bytes, words and lines in a file. To use
it, just type WC followed by the name(s) of the file(s) you want to
get counts for. Like HEAD and TAIL, WC defaults to reading the
standard input device if no input file is specified on the command
line.
SHOW is my adaptation of a CP/M bidirectional file display program.
It shows a file on the screen, and allows you to scroll forward and
backwards. If all you want to do is see the file, this is often more
convenient than calling up your editor. Unlike TYPE, SHOW will display
WordStar (tm) and WordPerfect (tm) files in more or less readable
format. Type SHOW with no arguments to get instructions.
MV is a general-purpose program to move files and directories
between disks and directories. It is similar to the UNIX (tm) utility
of the same name. With the R switch, MV treats directories
recursively: that is, if it is told to move a directory, it will
transfer all files found in that directory, AND all files in any
subdirectories of it. Type MV with no arguments to get instructions.
CP is virtually the same as MV, except that it copies files or
directories, without deleting the originals. Type CP with no
arguments to get instructions.
RM deletes files and/or directories. It is similar to the MSDOS DEL
command, but allows multiple files to be specified, and supports a
number of options. Type RM with no arguments to get instructions.
CAUTION: the F and R switches are potentially dangerous. Be sure you
know what you are doing before you use them; if in doubt, experiment
on a "junk" disk first.
RO is a utility to make one or more file read-only. Files that are
set "read-only" cannot be deleted by the ordinary MSDOS DEL command
(it will respond "File not found" if you try this). They are also
protected from deletion by the RM program (unless the F switch is
used). Type RO to get instructions.
RW is a utility to restore one or more files that have been set
read-only back to ordinary read-write status. Type RW for
instructions.
CRC computes a cyclic redundancy code for one or more files. It is
a good idea to run CRC on your valuable files and record the results.
Then if you ever suspect that a file has been corrupted in some way,
re-run CRC and compare the results to what you recorded. Most
possible errors in the file will alter the CRC for the file, enabling
you to detect that an error has occurred.
The CRC program accepts one or more file names and writes their CRC
codes to the standard output. The output can be redirected into a file
if you so desire.
By default, CRC computes Cyclic Redundancy Codes using the same
algorithm used by XMODEM and other communications programs. If you
add the -a switch to the command line, it will compute codes
compatible with those computed by archiving utilities such as ARC and
PKARC.
UPDATE is similar to the unix "touch" utility. It sets the time and
date of one or more files to the current system time and date. Type
UPDATE with no arguments for instructions.
FDUMP is a simple utility for viewing and patching files in ASCII,
hex, decimal or octal. It examines one logical sector (128 bytes) at
a time. When you run the program, you will be asked for a file name
and then presented with a menu of commands (you can also invoke FDUMP
with the name of a file, e.g. "FDUMP FDUMP.EXE." In this case, you
don't get the file prompt). The "dump" commands (A, H, D, and O) show
the contents of the current file sector. The edit command (E) allows
you to alter the sector contents, and the W command will put the
changed sector back on the disk, overwriting its previous contents.
The C command allows you to copy one or more sectors from the file you
are looking at to a new file. This command can be used to recover
usable data from files that have damaged sectors. The "+", "-" and
"S" commands are used to select a new sector to look at or change.
The "F" command closes the current file and allows you to select a new
file. To exit the program, type X.
CLEAN, FIXLINES and DETAB are filter programs. Like HEAD and TAIL,
they read from a file (if specified) or from the standard input, and
write to the standard output device. To save the output in a text
file, you must use the redirection operator (>). CLEAN strips off the
high bits in a file, and removes all control characters except for
carriage return (^M), line feed (^J), backspace (^H), tab (^I) and
form feed (^L). FIXLINES converts files with lines ending in only
carriage returns or line feeds to files with lines ending in CR/LF
pairs (which is the DOS standard text file format). DETAB expands
tabs in a file into spaces; it assumes that tab stops are set every 8
spaces. Since these programs are filters, they can be combined in a
pipe, e.g.:
CLEAN foo | DETAB | FIXLINES >foo2
processes file "foo" through all 3 programs and writes the results
to file "foo2". I use this combination to convert the brain-damaged
output files created by SPSS-PC into something I can print.
MODEM is a simple communications program loosely modelled after the
classic "MODEM7" series for CP/M. Far fancier programs are available,
but this one may be of interest because it includes source. Unlike
most modem programs, it uses BIOS calls to access the COM port, and
will thus work with semi-compatible computers such as the Tandy 2000.
However, since BIOS calls are slower than directly fiddling with the
hardware, transfers at speeds above 1200 bps will probably be
unreliable. MODEM supports both CRC and Checksum transfers, but there
is no ASCII transfer mode.
All of the programs are supplied "ready to use" in the form of .EXE
files. It is not necessary to re-assemble or re-compile any of them in
order to use them. However, the source code is also provided for the
use of anyone who wishes to make custom modifications to the programs.
The following information concerns the source code, and will be of
interest to programmers only.
The source code for all programs is contained in the archive named
SOURCE.ARC. Any of the available archiving utilities for the PC (such
as ARC, PKARC and NARC) can be used to extract the files from this
archive.
LS, HEAD, TAIL, MV, CP, RM and WC are written in assembly language
and were assembled with MASM 5.0. All of these programs must be
linked with the utility library ASM.LIB. The source code for the
modules in ASM.LIB is in the archive ASM.ARC, which is stored within
the SOURCE archive. ASM.ARC also contains some include files needed
for assembling the programs.
RO, RW, CRC, UPDATE, FDUMP, CLEAN, FIXLINES, DETAB, and MODEM are
written in Aztec C, and were compiled in the "small model" mode using
version 3.40a of the optimizing compiler. If you modify them, you
must recompile and then link them with the library B.LIB and the
standard Aztec library C.LIB (in that order). B.LIB is a small
utility library that is provided within the source archive. The source
for the modules in B.LIB is in B.ARC. B.ARC also contains some header
files used by the c programs.
These programs are PUBLIC DOMAIN and may be freely copied, used,
modified, etc. for ANY purpose (the one thing you probably can't
legally do is to copyright them yourself). I don't ask for any
donation or contribution for them. The best "donation" you can give
me is to donate something of your own to the public domain, thus
improving the pool of available free software.
I don't offer any guarantee of support for these programs, but I
will generally fix bugs that are reported to me. Any comments,
complaints, bug reports or suggestions for improvement should be sent
to: Jon Dart, 3012 Hawthorn St., San Diego CA 92104.