home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
A
/
ARCS.ZIP
/
ARCS.HLP
< prev
next >
Wrap
Text File
|
1989-10-13
|
13KB
|
392 lines
Notice
Changes in the system
The problem
What is an archive?
File lists
ARCADD -- add files to an archive
ARCDEL -- delete files from an archive
ARCGET -- retrieve files from an archive
ARCDIR -- display archive directory
ARCTYPE -- display or print archive members
ARCCOPY -- copy an archive (reorganize)
ARCRUN -- run a program out of an archive
Downloading from an archive
:Notice
Most programs originally conceived by Michael M. Rubenstein.
Original version (PL/I) Copyright 1982 Michael M. Rubenstein.
Current version (ASM) Copyright 1983 Dave Rand.
This documentation by Dave McCrady. Applicable portions plagiar-
ized from Mike Rubenstein's original .DOC, with thanks.
This documentation and the accompanying programs may be freely
distributed for noncommercial purposes provided that the copy-
right notice is retained.
The archive programs were originally written in pl/i and compiled
using the Digital Research Inc. pl/i-80 compiler. The current
version is written in standard CP/M assembler and is completely
compatable with Rubenstein's program.
This help file is for the following versions
arcadd 1.32
arccopy 1.16
arcdir 1.30
arcget 1.11
arctype 1.31
arcrun 1.17
arcdel 1.12
:Changes in the system since the pl/i version:
- programs are very small (typically 2K) and run
much faster.
- maximum use is made of memory buffers to speed up disk
i/o, particularly when building an archive. Buffers of
45-50K in a 64K CP/M configuration are typical.
- ARCRUN has been implemented. Used with ZCPR2's
COMMAND RUN feature, its operation is invisible to
the user.
- most programs (except ARCRUN) can be executed either
straight from the command line or from a program
prompt.
- ARCTYPE now displays squeezed as well as ascii files
and refuses to display most non-ascii files.
:The problem
Anyone who works with a computer, soon finds that the disk space
is limited. It's amazing how fast a disk can fill up.
On any CP/M system, the file space allocation is at least 1K.
Most double density systems allocate 2K and many allocate 4K per
file. If your disk contains a great many small files you can run
out of data space (or directory space) before you know it.
The ARCS system is a collection of programs which take a large
number of small files and combine them into a larger file. In
actual practice, another small file is built to keep track of the
large data file.
For example, let's assume one of your disks contains 27 files
using 84k. 21 of these files are less than 2k of data. Most of
these actually contain less than 1k of data. The largest file is
10k. Even this file could be wasting about 1.5k.
Run this disk through the ARCADD program. That would reduce the
space to about 48k for the data and 2k for the directory. That's
a lot better. You also save CP/M directory space since one
extent is used for each 16K instead of one for each small file.
We can do better still. Now run the data file through Richard
Greenlaw's excellant squeeze program. That reduces it to about
30k of data (and still 2k of directory), about 38% of its
original size. Note, however, that ARCTYPE, ARCADD, ARCGET and
ARCRUN won't work with a squeezed archive.
:What is an archive?
An archive consists of two files, a data file and a directory
file. The data files contains all the members of the archive. The
directory file contains information on what files are in the
archive and where they are.
Usually, you'll take the simple route and just specify the name
as a single file name, such as
source
This is interpreted as the archive
(source.arc source.dir)
where the first file is the data file and the second is the
directory. You can specify the drive (e.g. b:source). ... When
adding to or retrieving from an archive, you can omit the archive
name. In that case, the archive will be
(archive.arc archive.dir)
In any case, you can just specify the drive. Specifying "b:" will
give you
(b:archive.arc b:archive.dir)
:File lists
The add and get programs require a file list.
A file list may be a single (ambiguous) file name
*.bas
or a list of (ambiguous) file names enclosed in parentheses
(*.bas test.asm b:*.bas b:test.*)
Notice that the files may be on different drives.
...
There are some restrictions on the file names:
- A temporary file (type .$$$) cannot be put in
an archive.
- A file with the name $$$.sub cannot be put in
an archive.
- A file with the same name as the data or the
directory file can be put into an archive,
but it cannot be successfully retrieved to
the same drive as the archive.
- A null length file (0K) such as a drive header
cannot be put into an archive.
...
- If a file name contains parentheses, they
must be matching. For example, you can
archive the file
test(ab).dat
but not the file
test(ab.dat
- If a file name begins with a left paren-
theses, you may not specify the file as a
single file without parentheses. For exam-
ple, you must specify
((test).*)
rather than just
(test).*
...
There are no restrictions on the content of the files which go
into an archive. However, the following guidelines are
recommended.
- If you are going to squeeze the data file,
the members should be similar (e.g. all pl/i
programs or all program documentation files).
- Squeezing the directory isn't much use since
it's pretty small. If you do squeeze it you
won't be able to display the directory very
easily.
- If you squeeze, you must unsqueeze before
retrieving.
:ARCADD -- add files to an archive
To add files to an archive, creating the archive if it does not
already exist, use the command
arcadd <file list> [<archive name>]
or just use the command
arcadd
to get a short description. You will then be prompted with an
asterisk for the parameters. This will be repeated until you
enter a blank line.
Even if a file matches more than one specification, it will only
be included once, so you can use the file list
(*.bas test.*)
even if there is a file test.bas.
...
If a file with the same name as an added file is already in the
archive, it will be deleted. The space used by the file will not,
however be reused in the archive. The space may be recovered
using the arccopy program.
The program will not let you add an archive to itself. This
allows use of *.* even if the files are on the same drive as the
archive. It is possible to add a file from another drive with the
same name as the archive, but it will have to be retrieved to
another drive also.
ARCADD also permits the use of a handy, but dangerous, option. It
erases a file after it has been added to an archive. It is in-
voked at the end of the command line. Type a space followed by
"/E". In the case of our first example:
arcadd <file list> [<archive name>] /E
would build the archive from your file list and then delete each
file in the list after it was added. Needless to say, this is
NOT a recommended procedure on master copies. A power failure or
BDOS error in the middle of such an operation could result in the
permanent loss of a file. Use this option with care.
:ARCDEL -- delete files from an archive
To delete individual files from an archive, use the command
arcdel <name of archive> name of file
or just use the command
arcdel
to get a short description. Wildcards may be used when
specifying file names, but not when specifying the archive.
:ARCGET -- retrieve files from an archive
To get files from an archive, use the command
arcget <file list> [<archive name>]
or just use the command
arcget
to get a short description. You will then be prompted with an
asterisk for the parameters. This will be repeated until you
enter a blank line.
...
The drive specifiers in the file list determine which drive the
file will be put on. It does not matter which drive it originally
came from.
Only the first matching file name is used for a file. For example
if you type
arcget (a:test.* b:*.bas) arcname
the file test.bas will be put on drive a.
You will be told of any files in the list which had no match. In
the above case, if test.bas is the only .bas file in the archive,
you will get a message that b:*.bas did not have a match.
:ARCDIR -- display archive directory
To display the directory of an archive, use the command
arcdir <arcname>
This will display the names and sizes (in 128 byte sectors) of
the members in alphabetic order. The final line of the display
will be
Using aaa records of bbb allocated (ccc%)
where aaa is the number of data records.
bbb is the number of records in the data file.
ccc is the percent usage.
...
If you just use the command
arcdir
a brief description of the program will be dis-
played.
:ARCTYPE -- display or print archive members
To type squeezed or ascii files from an archive, use the command
arctype [<archive name>] [<option>]
or just use the command
arctype
to get a short description. You will then be prompted with an
asterisk for the parameters. This will be repeated until you
enter a blank line.
The file is displayed on the console with paging (the display
pauses at the end of a page or of a file).
...
During the type out, you may key the following characters.
control s -- suspend output until a key
is pressed.
control x -- skip to the next file
control c -- terminate typing of files
Only the first matching file name is used for a file. For example
if you type
arctype (test.* *.bas) arcname
the file test.bas will be put on drive a.
You will be told of any files in the list which had no match. In
the above case, if test.bas is the only .bas file in the archive,
you will get a message that b:*.bas did not have a match.
:ARCCOPY -- copy an archive (reorganize)
To copy an archive, use the command
arccopy <old arcname> [<new arcname>]
or just use the command
arccopy
to get a short description. You will then be prompted with an
asterisk for the parameters. This will be repeated until you
enter a blank line.
The major reason for using arccopy is to regain space lost when
arcadd is used.
:ARCRUN -- run a program out of an archive
CP/M command files can be placed in an archive and executed from
that archive. If you use the default name of PROGS you won't even
have to specify its name. More on that in a moment.
Suppose, for example, you are logged to drive A and want to run
PIP, which you have in an archive called UTILITY.ARC. To run pip,
you would enter:
arcrun -utility pip
But there's an easier way. Rename your archive to the default
name of PROGS.ARC. Now you can use PIP by entering:
arcrun pip
Richard Conn's new ZCPR2 software can make the entire operation
invisible. First, enable CMDRUN (Command Run) to automatically
invoke ARCRUN. Then to use PIP from within an archive called
PROGS.ARC you just enter:
pip
When ZCPR2 doesn't find PIP.COM in CP/M's directory it orders
ARCRUN to get it from the archive and executes it from there.
:Downloading from an Archive
The XMODEM in use here supports downloading individual member
files from an archive. To use it, enter:
xmodem a du:<name of archive> name of file
The Drive/User specification is optional and is needed only if
the archive is on other than the default drive and user area.
There is no way to upload into an archive.
hive.
rt counter
LCNT: DB 0 ;line position counter
;
DS 64 ;room for 32 level stack
STACK DS 2 ;old cp/m (or mp