DISTRIBUTED BY: PCW-World, Cotswold House, Cradley Heath, Warley
West Midlands B64 7NF  FAX/TEL: 0384 66269

MAXISWEEP
=========

Introduction
------------

By far the most used, and most useful, of the CP/M utilities for CP/M
computers, is without doubt NEWSWEEP, designed and written by Dave Rand.

More recently a number of other utilities have come into common use, not
least CRUNCH.  This gives much better file compression than the original
SQUEEZE but, till now, files could not be accessed without going through
the full UNCRUNCH procedure. Public Domain Libraries had also made use
of the LBR file Library system and this also needed a sweep type viewing
and extracting system.

MaxiSweep is modelled on NewSweep, but attempts to fill the gap that the
newer utilities have created.  It is a Z80 CP/M-80 utility for both
copying and viewing files. It takes up about 12K on your disk, being
written entirely in assembler to keep it small.  You'll have very little
problem if you've used Dave Rand's NewSWeeP, or one of the many other
programs (like NULU) that use the concept of tagging files.  In
addition, MaxiSweep (called MS from now on) not only knows how to
unsqueeze it can also uncrunch, and read LBR files (even those with
squeezed and/or crunched contents).

Fire up CP/M, insert the disk containing MS, Key in MS<Enter> and away
we go :-

Opening Screen
==============

------------------------------------------------------------
 MaxiSweep - Version yymmdd
 Copyright (c) 1987, 1990 John Washington

 Type ? to get help.
 Drive/User/Mask A0: ????????.???
 ...   18K (18K)  in  2 files  155K free

    1. A0: MS      .COM  12K : _
------------------------------------------------------------


This tells us:

        that we are using Drive A, user area 0.

        That we are interested in all files within that user area
        (that's all the question marks).

        That 18K is used in this user area

        That the 'real' size of the files is 18K (this size may differ
        when using A,B and M drives on the 8 series machines).

        That it contains 2 files.

        That 155K remains unused on the disk.

        That the first file in the user area (in alpha order) is MS.COM
        and that it takes up 12K.

        That if we press the ? key (that's usually the shifted /) we
        should get some kind of help. i.e.

------------------------------------------------------------
 A - Retag files             Q - Unsqueeze tagged files
 B - Back one file           R - Rename file(s)
 C - Copy file               S - Check remaining space
 D - Delete file             T - Tag File
 E - Erase T/U files         U - Untag file
 F - Find file               V - View file
 G - Go run program          W - Wildcard tag of files
 J - Jump to file no.
 L - Log new drive/user      X - eXit to CP/M
 M - Mass copy tagged        Y - set attrs of tagged files
 O - Open library            cr, sp - Forward one file
 P - Print file              ? - Display this help
 $ - Licence conditions
------------------------------------------------------------

So. let's take them one by one.

A - Retag file, when the Tag facility has been used with one of the
other commands to perform an operation, pressing A, re-tags those same
files ready to undertake a further task.

B - Back one file, as it suggests - moves back one file in the listing.

C - Copy file, used to copy one file from the current disk and
user area to a new disk and User or a new User on the same
disk. The on-screen prompt asks :- Copy to (filespec)?   The
answer should be in the form Drive Letter (e.g. A or B, or even M for
machines such as the PCW with a RAM drive) and the user area number (0
to 15).

        For example:   Copy to (filespec)? A1:

This would copy a file into drive A, user area 1, the original being
retained intact.

Even computers have "off days", so it's a good idea to ask for
verification of your copy.  Just add a space and V to the end of the
reply.  MS computes a checksum as it reads the original file, and then
it reads back the copy computing the checksum again.  It takes a little
longer, but it is comforting.  However, even that won't protect you if
reading the original file was dodgy, but at least it catches most
problems.

D - Delete, can be used to Delete individual files on a 'one-off' basis.
You are prompted :- Delete file? any answer other than y (or Y) aborts
the Delete operation. To delete a number of files see T (Tag) and
E(Erase).

E - Erase T/U files, must be used with the T (Tag) option, firstly use T
to tag either the files you want to erase or those you don't. Press E
and you will be prompted :- Erase Tagged or Untagged files (T/U)? Any
answer other than T or U will abort the operation. T will begin the
erase of Tagged files, U those remaining Untagged.  You are further
prompted on screen :- Do you wish to be prompted (Y/N/A)?

N will start the erase, no stopping it now!
A will abort the erase procedure.
Y will continue with the erase but will name each file and ask  :-
Delete (Y/N/A)? before erasing any file. Whenever MS finds a SYSTEM (or
LocoScript's 'Hidden') file you are prompted to confirm the erase. Take
GREAT CARE with this one, mass erasure can seriously damage your sanity!

F - Find a file.  You are asked :- Find what?  if you answer with the
full filename, MS moves directly to that file, should you use an
abbreviation of the filename then it moves to the first file that fits.
i.e.: if you have two files, one named NSWP the other NULU, entering the
full name will take you where you want to go but enter N for NULU will
take you to the first file starting N, in this case NSWP.

You can also choose the extension (or part of it) and/or attributes.
Attributes are specified by a comma and the relevant characters (1, 2,
3, 4, for the user attributes, R, read only, S system, A archive).

G - Go run program. permits you to jump into and run small CP/M
programs directly from within an .LBR (library), allowing space saving.

J - Jump to file.  You are prompted for a file number, and whatever
you type will be interpreted as the number of a file to go to.

L - Log new disk/user and mask.  Enables you to move to a new drive
and/or user area and choose to select a subset of the files. Press L and
be prompted :- New drive/user/mask? Taking these in turn:

DRIVE, you can Log onto a new drive or the same drive if you have
changed the disk. Input A (or a) <Enter> will Log onto Drive A in the
current user area.

USER, logs onto a new user area. Input 6 and you will be logged onto
user area 6 of the current drive. DRIVE/USER, the two above facilities
can be combined to log onto a Drive and user area. Input A6 (or a6)
<Enter> to log onto Drive A User 6.  Input * to select all user areas.

MASK, enables you to Log onto all files that match a Mask input by you.
Input ????.COM <Enter> would find both NSWP.COM and NULU.COM or any .COM
file up to four characters. The ? is a 'Wildcard' and is used to
represent any single character in a filename. Input *.COM <Enter> would
find every .COM file in the current Drive/User, * is also a 'Wildcard'
and represents any number of characters. Here are some examples to make
it clearer:

New drive / user / mask?    A<Enter>   Log onto A Drive in current User.

New drive / user / mask?    A6<Enter>  Log onto Drive A in User 6.

New drive / user / mask?    A*<Enter>  Log onto Drive A all User areas.

New drive / user / mask?    *.BAS<Enter>        Log onto the current
                                                Drive but only .BAS
                                                files.

New drive / user / mask?    A8:*.BAS<Enter>     Log onto Drive A, User
                                                8, .BAS files only.

New drive / user / mask?    A8:N???.*<Enter>    Log onto Drive A, User
                                                8, any four character
                                                filename beginning with
                                                N and with any filename
                                                extension.

M - Mass file copy, copies Tagged files into another Drive and/or User.
Tag the files you want to copy, press M (or m) and be prompted :- Copy
to drive/user? Input the Drive letter and/or User number followed by
<Enter>. A copy will be made as directed, the original being retained.
Verification after each file can also be requested -- see the 'C'
command for fuller details.

O - Open library. key in O (or o) and the contents of the .LBR file will
be displayed in the normal manner, that is in alpha order, press cr, sp
or <Enter> to move through the contents.  Extract individual files with
C (copy).  Use T (tag) and M (mass copy) or C (copy) to extract a number
of files. V (view) and P (print) can be used from within the .LBR.  G
(go run program) also works for small programs (if your program is too
large you'll be warned).  The maximum size depends on your machine.

P - Print file, carries out the action listed under V (view
file) but to your printer.

Q - Unsqueeze tagged files, this is going to be a longish one! Firstly
I'd better attempt to explain what Squeeze and Unsqueeze are.  Squeezing
is a method of compressing a file (better known in technical circles as
the Huffmann algorithm) so that it takes up less of your valuable disk
space. The system employs a method originally used with the SQ.COM and
USQ.COM programs and came into general use when both facilities were
bundled together in NSWP. With this method file size can be compressed
by up to 40%. The snag is, squeezed files cannot be read directly by the
CP/M TYPE facility, so you will need to unsqueeze them before use.

Squeezed files are indicated by changing the second letter of the
filename extension to a Q. Squeeze is especially good when used with
text files. Unlike NSWP, MS WILL NOT SQUEEZE files, only unsqueeze.

Not only will it unsqueeze files it will also uncrunch. CRUNCH is a much
later enhancement of the squeeze principal, file size reductions of the
order of 60% can be obtained, until now it has not been possible to read
crunched files without going through the uncrunch process. As with
squeeze the second digit of the filename extension is changed by the
crunch process, this time to a Z. MS WILL NOT CRUNCH, only uncrunch.

To unsqueeze/uncrunch files. First tag the file(s). Then press Q, you
will be prompted :-    Copy to drive/user? Input drive letter/user
number<Enter> it can be the current setting as the file name extension
will be changed, the Q or Z will be replaced in the second letter of the
extension. (For this reason NEVER use Q or Z in your filename
extensions).

Screen prompts show the progress of the action and when complete
indicates the new filename. It may take a little while if large files
are being un-squeezed/crunched.

R - Rename file(s), not used with the tag facility, simply bring up the
file you need using the <Enter>, <Return> or spacebar, key in R and be
prompted :- New name, or *?   Key in the new name, including the
extension and press <Enter>. You don't need to scroll through the files
until you find the one you need IF you know the COMPLETE filename, in
this case press r at any place and answer the prompt with *, you will
then be prompted to input the current filename <Enter> the new filename
<Enter> and hey presto.

S - Check remaining space, press S (or s) and follow the prompt    :-
Which drive?   Key in A,B or M (or whatever) <Enter>.  The answer is for
the complete drive, user areas are not needed in this case.

T - Tag file for mass, It marks files to be used in any of the mass
operations; ie: E,M,Q or Y.

Scroll down to the first file needed, press t (or T), you are informed
that the item is tagged and given two file sizes, the first gives the
total file size on the current drive, the second shows the actual size.

Note for Amstrad PCW owners: these will differ from drive A and B/M on
the 8 series machines as the 180K format A drive works in blocks of 1K,
whilst the M and B drives work in 2K multiples. The 9 series machine has
a 720K drive as it's A and so always works in 2K blocks.

U - Untag file, removes a Tag from a file, just in case you get carried
away, or more to the point when the total Tagged files size becomes
greater than is available on the disk you intend moving them too.

V - View file, view the contents of a file on the screen, will read all
ASCII text and will make some sense of LocoScript and even WordStar, it
will also read directly any squeezed or crunched file without going
through the unsqueeze or uncrunch process. MS will read only, it has no
facility to write at all. All of the above View facilities are also
available with the P (for Print) option but in this case the output is
via your printer.

W - Wildcard tag of files, this enables you to use the Wildcard
characters to undertake an automatic tag, for instance, all .COM files
by entering W (or w) and receiving the prompt :-      Tag what? entering
*.COM will tag all .COM files on the current drive and user.

Attributes can also be used for wildcard tags.  For example:

,A              tag all files with the archive bit set

.COM,S          tag all .com system files

F?E?.DOC        tag files like fred.doc, flea.doc, feed.doc etc.

,1234           tag all files that have all four user bits set

X - EXIT BACK TO CP/M, press the X (or x) key at any time to cancel MS
and return to CP/M.  But if you're in a library this will simply close
the library and take you back to the previous directory.  Note that this
directory has not been updated if you've extracted files from library --
just use the L command to get a fresh listing of the directory.

Y - Set file status.  It ONLY works with tagged files, unlike M and E it
does not have a single file alternative.  So if you only want to work on
one file you still need to Tag it.  When Y is input you receive the
prompt Which flags (1-4, R,S,A)?

        R sets the file up to be READ ONLY, and makes it difficult to
        alter or erase. If MS has been correctly patched for your
        machine this is indicated by an underline or highlight on the
        first letter of the filename extension.

        S sets up the file as a SYSTEM FILE. This does two things,
        firstly it makes it into a hidden file, DIR and other directory
        utilities such as D.COM will not list it. The second advantage,
        at least for CP/M 3 users, is that as long as you place this
        SYSTEM file in user area 0 of any disk it can be accessed from
        within any other user area. Small disk utilities like D.COM
        (only 1K) can be left in User 0 of every disk and be called up
        from any other user area.  Again MS can indicate files set this
        way with the underline or highlight.

        A sets the archive bit (sometimes called "file changed").  When
        you close a file after writing, CP/M clears this bit.  Some
        back-up utilities copy all files with this bit cleared, setting
        it to 1 afterwards.  If you have such a utility you may find it
        useful to modify this bit.  Personally I don't (have such a
        utility, or find it useful!).

        1-4. These allow four other bits to be set. Quite what use they
        are is beyond me, but other utilities allow them to be set, so
        someone is sure to tell me how indispensable they are.

? - Display this help, at any point where a command is valid, the help
screen can ble called by pressing the ? key.  Depending on whether or not
a library is open, appropriate help is given.

cr,sp - forward one file, pressing the <cr> key (often labeled <RETURN>
or <ENTER>) or the spacebar, will move you forward one file at a time.


Advanced facilities
-------------------

If you frequently want to do the same thing in MS, (for example, open a
library, find a file, and run it) it may be useful to type these
commands as an extension of the command line.

For example:

       MS FUTILITY;OFTINYTIM.COM;G

This example would open a library file UTILITY.LBR, and run a program in
it called TINYTIM.  This can be particularly useful for users of
machines that can preset commands from function keys, such as the Epson
PX-8 and Geneva.

The syntax may seem mind-boggling at first sight, but is easy once you
get the hang of it.  MS has two ways of reading the keyboard (as do many
other CP/M utilities).  It can read either a single key-stroke (for
example the main commands are read this way), or a line, terminated by
<enter> or <return>.  Note that semicolon is used to indicate the end of
such lines in the command line, so several commands can be given.
However, where a single character is given, no semicolon is used.

Does that make it clear?  The above example would be interpreted as:

        Read a single char, for a command letter.

        Is it 'L'?  No, so first look at the current disk, current user.

        Interpret the F command.

        F asks for a filename, so take everything up to the end of the
                command line, or a semicolon, i.e. "UTILITY".

        We assume UTILITY.LBR exists, and no other files starting
                UTILITY, so the cursor is now on UTILITY.LBR.

        Get another command letter. 'O', so open the library.

        Get another command letter. 'F', so interpret the 'find'
                command.  This time search for TINYTIM.COM.
                This could be abbreviated, if you know the content of
                the library -- the ultimate would be just FT, sufficient
                if there are no other files with initial T.  (I'm
                tempted to add "No FT, no comment" -- Brit humor, or
                just me?)

        Get another command letter.  'G'.

In this example the command line is exhausted (maybe you are too!), so
the parameters for the command line are now requested from the keyboard.
However, if you always wanted to use the same parameters, obviously
those could go in the above command line also.  If you don't want to
give any parameters, just add a semicolon to the end of the command
line.

There is a restriction that the MS command line must be 125 characters
or less.

To avoid potential dangers in such a powerful feature, commands such as
delete and erase still ask for confirmation from the keyboard.


Command line input can disable the video display, by using a dash or
hyphen. Don't use this feature if you're not really Really confident,
since it will also suppress display of any error messages!  Turn video
back on with '+', but reading from the keyboard will turn on the video
display anyway, so this command is rarely wanted.


Acknowledgments
---------------

MaxiSweep owes much to the ideas of other authors.  Dave Rand (Sweep and
NSWP), Steven Greenberg (Crunch), Martin Murray (Nulu) are significant
amongst them.

This documentation is based on Bob Ellis' excellent work, plus thanks to
Geoff Barnard, Barry Pickles and Rick Ryall.


Contributions, suggestions etc to:

John Washington, 33 Turnoak Ave, Woking,
                 Surrey, England GU22 0AJ

                 or

c/o Bruce Carlson, 2816 NW 6th Avenue, Wilton Manors,
               Ft Lauderdale, Florida 33311, U S A


        