What is NSWP2?
Invoking NSWP2
Copying a file
Delete file(s)
Print file(s)
REName file(s)
View ASCII file(s)
Tag files
Mass copy of files
SQ/USQ file(s)
Re-Tag files
Batch REName
Log to new drive/user
Other commands
Special features
DDT customization
Remarks
:What is NSWP2?

NSWP2  is a  utility program for  maintaining  file  directories,
transferring  files  between user areas on the  same  drive,  and
transferring  files  between drives and user areas under  CP/M2.X
and under CP/M 3.0.

NSWP2 will not run under CP/M 1.4, but it will run under MP/M .

This software was  orginally written in  PL/I by  Robert  Fisher.
The current version was written in CP/M  assembler  by Dave  Rand
with a number of added functions.

:Invoking NSWP2 and moving about the directory

When NSWP2 is invoked, you will see a display of the current user
area you are in, along with the total amount of space occupied by
the files,  the number of files there are  and the amount of disk
space remaining in k.  You will  then get a display of the  first
entry in the directory. NSWP will also give  you a listing of the
user area that the file(s) are on,  if you logged in all user
areas.  Typing 'space' or 'return' or  'F' moves  you  forward in
the directory, typing B (or b) moves you backward.  The directory
is circular,  so typing space at the end of the directory moves
you to the beginning. (A line is skipped.)

When you first invoke NSWP, you can specify an alternate drive to
start on.
               A>NSWP B:

will begin with drive B:  logged in.  Selecting user area *  will
cause all user areas to be "swept" at once.


At  any time,  you can view the menu of functions by typing  a
question mark (?).

Simply typing 'x' exits the program.

Note that all characters can be entered in upper or lower case.


:C - Copy file function

C -- This allows you to copy the file to the drive and user  area
of your choice. You will be prompted for the drive and user area.
Just enter 'b3:', say, to transfer the file to drive B: user area
3.  If you omit the user area,  the current user area of the file
is  used.  Any file of the same name in the target area is  first
erased,  an  exception  being  when you are transferring  to  the
current drive and user area.  In the latter case, the transferred
file is copied with its named changed by putting a $ in the  last
letter of the file type.

If  an  existing file in the target area that must be  erased  is
marked  read-only (R/O),  then the copy is simply not  made.  You
will be told. You may use the delete function to delete the file,
and then retry the copy.

As  an option,  NSWP will perform a CRC verification of the copy.
When you are prompted for the drive and user, add a 'v' or 'V' to
request verification. Thus specifying  'b3: v' will copy the file
to drive b:,  user area 3,  with verification.   A description of
the verification method is included with this documentation.

BUG: CP/M does not allow two files of the same name to be open on
the  same  drive,  even  in  different  user  areas.  Thus,  when
transferring  between user areas on the same  drive,  the  target
file is first named with the $ convention and then renamed.  This
can result in an extra file being erased.

If there is too little room on the target drive,  the transfer is
aborted and the directory entry is erased.

:D - Delete (ERAse) file(s)

D -- The current file is deleted. You will be asked if you really
want it erased. If the file is read-only (R/O), then a bdos error
will occur, and the program will warm boot.

:P - Print a file

P -- The current file is sent to the LST:  device (your printer).
If the file is squeezed, it will be unsqueezed as it is listed. A
control-C interrupts the function.

:R - REName file(s)

R -- The  current file is renamed to the name and user  area  you
specify. For example:

         A15:FOO    .COM? A0:FOO.COM

will rename the file from A15 to A0.

Lower  case will be converted to upper case,  but other 'illegal'
characters are not trapped. It is quite possible to give names to
files that CP/M won't recognize.  (You can also change them  back
again later, however, so no harm is done.) Responding with "*" to
the  prompt  will put you in the batch wildcard renaming  mode.If
the  file is read-only,  a bdos error will occur and the  program
will warm boot.

:V - View an ASCII file

V  -- The  current  file  is  displayed  at  the  terminal,  with
automatic  pagination.  The return key will continue the  process
until  a control x is typed to cancel the display to the  screen.
Single  line spacing is possible by typing the space bar when the
screen display has stopped.

:T - Tag file(s)

T -- Tag  a  file for later transfer.  (See below.)  After  being
tagged,  the file will be marked with an asterisk,'*'.  The total
of all tagged files is displayed both in units they occupy on the
current  disk and in units they would occupy on a  single-density
disk with a 1k block size.

U -- Undo the effect of T (and take away the '*' or '#').

* -- Indicates a currently "tagged" file

# -- Indicates a previously "tagged" file, may be re-tagged with
     the "A" option

:M - Mass transfers

M -- Mass  transfer  of all tagged files to a selected drive  and
user area. This is the main reason for the program. If the target
drive  fills,  the operation is aborted,  with the  untransferred
files remaining tagged.  This function invokes the copy  function
used  by C,  so everything said above applies here.  To abort the
transfering process, you must enter a CTRL-C.

After  transferring a tagged file,  the tag is changed to '#'  so
you can tell what has been sent.  This is for display  only,  the
file is otherwise considered untagged, but see the A command. The
'#' can be removed with the U command, if desired.

If no user area is specified, or if "*" is specified, the current
user area of the file is used.

You  may  request verification on mass transfers just as  in  the
single  file copy.  Just follow the drive and user  specification
with a space and a 'v' or 'V'.

:Q - SQ/USQ Tagged files

Q  -- Mass  transfer of all tagged files to a selected drive  and
user area, unsqueezing those which have been previously squeezed,
or squeezing those which are tagged.

OPTIONS: S - SQ tagged files during transfer
         U - USQ tagged files during transfer
         R - Reverse status to specified du:
             If SQueezed, then USQ, etc.

NOTE: The "Q" option will NOT work on untagged files
:A - Tag again

A -- Retags all the files currently marked with '#'.  This allows
you to repeat the transfers on another disk. Useful when the same
batch of files must be sent to several disks.

:R - REName file(s)

R -- Batch rename.  You will be prompted for an "Old name:" and a
"New name:".  In each case you may give any "ambiguous file name"
in response. The logged-in directory is searched for matches with
"Old  name",  and  the files are renamed,  if  possible,  by  the
formula specified in "New name".  A '?' in "New name" means  keep
that  character of the current file name,  an * is equivalent  to
filling  out  the remainder of the field (filename  or  filetype)
with  "?"'s.  Any  other  character  replaces  the  corresponding
character  in the current file name.  When the substitutions  are
done, embedded spaces are removed.

:L - Log new du:

L -- Login new drive and user area. If the user area is ommitted,
the  current user area is used.  You can NOT specify  a  starting
place in the directory.  Selecting "*" for user area, logs in all
user areas at once.

When logging into a new drive/user area be sure to follow the user
number with a colon.

           i.e.  B2:       logs ALL files on B2

                 B*:       logs ALL user areas of drive B

                 B2:*.OBJ  logs ONLY the .OBJ files of B2

:B, S, W, X, and ? commands

B -- Moves you backward thru directory listing

S -- Calculates space remaining on a drive.

     Simply enter drive letter to be examined

W -- Wildcard tag of files.  Allows you to select a large
     group of files for tagging.

         *.*     *.ASM    *.OBJ   etc...

X -- Exit to CP/M.

? -- Redisplay menu of commands.

:Special features

If your terminal supports reverse (or inverse) video modes, then
NSWP2 can show you the attributes set for each file.  If none of
the attribute flags are set then the directory listing will appear
as normal.  If any of the 1-4, R/O, SYS, or ARC bits are set, they
will appear with a reverse video block in the directory listing.

NSWP2 may be also set to clear your local CRT when it signs on.

To use these special features, see the next section dealing with
DDT customization of memory byte locations.

:DDT Customization

The byte at location 103h sets the number of lines displayed per
screen by the "V"iew command

The reverse (or inverse) ON video bytes are from 104h to 10Ah, the
first byte indicates the length of the sequence.

The reverse OFF video bytes are from 10Bh to 111h, again the first
byte indicates the length of the sequence.

Bytes 1F93h thru 1F97h or for your clear screen code sequence.

These memory locations can be set with DDT in the "S" mode, or
even easier by using the EDFILE utility program.

Be sure to SAVE 46 after using DDT.COM
:Remarks

Whenever a drive is asked for (and on start-up),  the disk system
is reset.  This is to prevent a disk from being 'read only' under
CP/M, and to allow you to repeat operations on fresh disks (e.g.,
finish  a mass transfer after a disk fills by inserting a  second
disk).  It  also means that you should be free to switch  density
and/or  number  of sides of a disk in a particular  drive.  This,
however, depends on how well your BIOS is written.

There  is  no logical upper limit to directory size,  nor to  the
size  of a file that may be transferred.  The directory  size  is
limited by available memory,  though, as certain information must
be  kept on each entry.  You should be able to use well over 1500
entries  in a 64k system.  Figure 20 bytes per entry starting  at
26k and running up to within 1k, or so,of the BDOS.

File  transfers make use of as much memory as possible to  buffer
data.

It is required to include the colon when specifying a drive and
user area. Thus responding "B3:" is not equivalent to just "B3".

Copy  verification  is  done by computing a  CRC  checksum  while
writing the file.  NSWP then reads the copied file back computing
it's checksum. The two checksums are compared and you are told if
they don't match.

The CRC verification takes approximately 2.5 times as long as the
straight copy.

This  documentation last updated 28 Mar 84 by Steve Sanders.  It
reflects  the  latest  version available  at  that time.

                         NSWP202
^Z
