UNARC CPM%UNARC DOC(ΣUNARC FORvUNARC MSG 2\UNARC16 CPMR%UNARC16 DIFwUNARCA CPM-oUNARCOVLASMob ÍCOMCMEXEOBJOV?REL?RLINTSYSBADLBRARCARK?Q??Z?UNARC 1.6 27 Mar 87 CP/M Archive File Extractor Usage: [d:]arcfile[.typ] [d:][afn] [N|P|C] Examples: B>A:SAVE.ARK *.* ; List all files in CP/M archive SAVE on drive A B>A:SAVE.ARC *.* ; List all files in MS-DOS archive SAVE on drive A A>SAVE ; Same as either of above A>SAVE *.* N ; Same as above (no screen pauses) A>SAVE *.DOC ; List just .DOC files A>SAVE READ.ME ; Typeout the file READ.ME A>SAVE READ.ME N ; Typeout the file READ.ME (no screen pauses) A>SAVE A: ; Extract all files to drive A A>SAVE B:*.DOC ; Extract .DOC files to drive B A>SAVE C:READ.ME ; Extract file READ.ME to drive C A>SAVE PRN.DAT P ; Print the file PRN.DAT (no formatting) A>SAVE *.* C ; Check validity of all files in archive Copyright (C) 1986, 1987 by Robert A. Freed s71!nͫ!E(  F(!Lk WL !ͭ!*| (i=" ̀:1  = 0!_6q|  د222   8:!2Z>ͳ ͳ ͂ !^+~ #~N(P 2C 2: 2 2> !l bk6? !e 6A#6R#6K2!](hO (! w=2!\:`͘ !<(6!g6C2| :s :  ###~<2s=(:!!H(!!z:!qLf* ~ <ɯ\>͍><< ( c!~5 #+w7*,"~͝\U`#|x {jaj8!w<,zw\$*}8"}!!|4  ! !! (!8 >$. x8> w~#?(#:G!s= Gw2:O: (\' >2,=`_A2$ ѻ_!|Y}90yOq%w$, ɱL!(?((#=2! >?:G:  ;`o& ~Y!%wO#:Zw $:s(80w: G!F-N 9(6͕͝(nͶ ͢(_͂ {Y͕͕`2: 0M ( 8  0 :<ȷ*R,Ŀ !!ͭx0Ŀ ͈!6` ^͇ O(zW ٯo? 87&0$$~$F /  !uT]!t 6d0 O!& >U(=85!Q 6( 6l_> 8 `/>2 !"' ! > (! ! " "} S 2)x2 ͇ C* ůp < ڃ ͦ  #~ ~ `iͦ ~8 rW+~s_##~+p #~ %( $~rW+~s_# **d#"*ͦ +s#r#w}- |%*( ( )4T])!'5#~#F!?(M<82(|=!)N6 +w+~(GwG!,͊ !"*!X 7lgxG ob ,L}Z8 90)))))lo& T])))))))))))|gͦ ~G) ^#Vz eˤͦ ~(#r+s_!)8+~g2(gjjjj*$.ckCgggGwG >y (Oo|&$fo:&*$oR(DM*!B"!0*#+"#0 :(3bk 6#} ( S S !͕͝=`:: C<!=8 Y  x (8 0͂ ͢!4(:  s(`^͢# x *|#" !͵!!͵!F L8d: ͵F3!F[@L[1 d[+6& !_=(L (Y ͂ Ͷ > Y > Y !5>w7Ͷ ͢(>Ͷ <2͂ Y Ͷ ͂ = > Y  ͂ ( (>=Y  x>.((w#*!:#?lg:=_/_T*"@6k#!p: 8 ( ( 8 ( HLͭ`i)jJ)j)j)jJ)j)jͭx( >e=RB0F6%#:F6 #*)))| 8O!I 6 #?P0q*|a( 8p > )))_6:#?w#[*"/Sro6z'`w#   ^#V#~#f_W_ 7͉0w#0| ٱ(w#z(͑ |8e.)8,^#V#N#Fw# q#a{Z80 required!$aborted!CP/M version 2 or higher requiredNot enough memoryAmbiguous archive file nameCannot find archive fileInvalid archive file formatWarning: Bad archive file header, bytes skipped = 00000No matching file(s) in archiveInvalid archive file driveInvalid output driveArchive File = FILENAME.ARCOutput Drive = A:Checking archive...Cannot extract file (need newer version of UNARC?)Replace existing output file (y/n)? Disk fullDirectory fullCannot close output fileIncompatible crunched file formatTypeout line limit exceededWarning: Extracted file has incorrect CRClength[more] ???JanFebMarAprMayJunJulAugSepOctNovDecUnpacked Packed SqueezedCrunchedSquashedUnknown!Name======== =Length Disk =Method= Ver =Stored Saved ===Date== =Time= CRC= ==== ======= ==== ======= === ==== Total File: UNARC.DOC Subject: User Documentation for UNARC Program Version: 1.6 Date: March 27, 1987 ------------------------------------------------------------------------------ UNARC CP/M Archive File Extraction Utility Copyright (C) 1986, 1987 by Robert A. Freed All Rights Reserved This file provides user-level documentation and operating instructions for UNARC version 1.6, released March 27, 1987. Refer to the notice at the end of this file regarding rights of use and distribution of this program. The release message file, UNARC.MSG, provides a list of all additional files distributed with the current UNARC release and describes the program changes from the previous version 1.4 and 1.5 releases. ABSTRACT -------- UNARC is a utility program for CP/M systems which allows the listing, typeout, printing, checking, and extraction of subfiles contained in "archive" library (*.ARC or *.ARK) files. These are commonly used for compressed file storage on remote access bulletin board systems. UNARC provides the CP/M user the ability to process such files after downloading them via modem from these remote systems. REQUIREMENTS ------------ UNARC requires CP/M version 2 or higher. The program is offered in two versions. The standard version, UNARC.COM, requires a Z80 processor (or compatible equivalent, e.g. HD64180 or NSC800). An alternate version, UNARCA.COM, is provided for systems with 8080 or 8085 processors (or 16-bit systems using the NEC V20 for CP/M emulation). Identical capabilities are provided by the two program versions. NOTE Although UNARCA.COM can execute on ANY system capable of supporting CP/M, it is larger and significantly slower than UNARC.COM and should be avoided by users of Z80-based systems. UNARC is written in Z80 assembly language and requires only 5K bytes of disk storage (6K for UNARCA). As distributed, the program requires at least 30K bytes of available memory space (TPA) for full support of all archive file formats (31K TPA size for UNARCA). (Smaller systems may be able to use some of the program's capabilities.) ABOUT ARC/ARK FILES ------------------- The files which UNARC processes utilize a format that was introduced by the ARC shareware utility program, which executes on 16-bit computers running the MS-DOS (or PC-DOS) operating system. This format has achieved widespread popularity since the ARC program first appeared in March 1985, and it has become the de facto standard for file storage on remote access systems catering to 16-bit computer users. More recently this file format has achieved increased popularity on RCP/M (Remote CP/M) systems. NOTE Most RCP/M system operators have adopted the convention of naming CP/M archive files with the filetype ARK. This differentiates these from MS-DOS archive files, which use the filetype ARC. This is a naming convention only: There is no difference in format, and UNARC will accept files of either type interchangeably. An archive is a group of files collected together into a single file in such a way that the individual files may be recovered intact. In this respect, archives are similar in function to libraries (*.LBR files), which have been commonplace on CP/M systems since 1982, when the original LU library utility program was introduced by Gary P. Novosielski. (However, the two file formats are not compatible.) The distinguishing characteristic of an ARC archive is that its component files are automatically compressed when they are added to the archive, so that the resulting file occupies a minimum amount of disk space. Of course, file compression techniques have also been commonplace in the CP/M world since 1981, when the public domain SQ and USQ "squeeze and unsqueeze" programs were introduced by Richard Greenlaw. The SQ/USQ programs and their numerous popular descendants utilize a well- known general-purpose form of data compression (Huffman coding). This technique, which is also utilized in ARC files, performs well for many text files but often produces poor compression of binary files (e.g. object program .COM files). The ARC program also provides an advanced data compression method, which it terms "crunching." This method (which is based on the Lempel-Ziv-Welch or "LZW" algorithm) performs better than squeezing in most cases, often achieving 50% or better compression of ASCII text files, 15-40% compression of binary object files, and as much as 95% compression of bit- mapped graphics image files. Five different methods are actually employed for storing files in an archive. The method chosen for a particular file is the one which results in the best compression for that file: (1) No compression ("unpacked"). The file is stored in its original form. (2) Run-length encoding ("packed"). Repeated sequences of 3-255 identical bytes are compressed into a three-byte sequence. (3) Huffman coding ("squeezed"). Each 8-bit byte (after run-length encoding) is encoded by a variable number of bits, with bit length (approximately) inversely proportional to the frequency of occurence of the corresponding byte. (4) LZW compression ("crunched"). Variable-length strings of bytes (in theory, up to nearly 4000 bytes in length) are represented by a single (maximum) 12-bit code (after run-length encoding). (5) LZW compression ("squashed"). This is a variation of crunching which uses (maximum) 13-bit codes (and no run-length encoding). Note that since one of the five methods involves no compression at all, the resulting archive entry will never be larger than the original file. NOTE The most recent release of the MS-DOS ARC program (version 5.20) has eliminated squeezing as a compression technique. However, UNARC continues to process squeezed files for compatibility with archives created by earlier versions of ARC and by other MS-DOS archiving programs (notably PKARC). The squashed compression method was recently introduced by the MS-DOS programs PKARC and PKXARC. UNARC can process files which use this method, although it is not universally accepted by other MS-DOS archive extraction programs (including ARC). During its lifetime, the ARC program has undergone numerous revisions which have employed different variations on some of the above methods, particularly LZW compression. In order to retain compatibility with archives created by earlier program revisions, ARC stores a "version" indicator with each file in an archive. Based on this indicator, the latest release of the ARC program can always extract files created by older releases (although it will only use the latest data compression versions when adding new files to an archive). NOTE The current release of UNARC supports archive file versions generated by all releases of the following MS-DOS programs through (at least) the indicated program versions: ARC 5.20 (24 Oct 86), by System Enhancement Associates, Inc. ARCA 1.22 (13 Sep 86), by Wayne Chin and Vernon Buerg ARCH 5.38 (26 Jun 86), by Les Satenstein PKARC 2.0 (15 Dec 86), by Phil Katz (PKWARE, Inc.) (UNARC does not recognize, but is unaffected by, the non-standard archive and file commenting feature of PKARC.) Although the above discussion has emphasized the origin of archive files for the MS-DOS operating system, their use has recently spread to many other systems. Programs compatible with MS-DOS ARC have appeared for UNIX, Atari 68000, VAX/VMS, and TOPS-20 systems. A CP/M utility for building archive files will also be available in the near future. For additional information about archive files and the MS-DOS ARC utility, refer to the documentation file, ARC.DOC, which is available from most remote access systems which utilize archive files. For additional information about the LZW algorithm (and data compression methods in general), refer to the article "A Technique for High-Performance Data Compression", by Terry A. Welch, in IEEE Computer magazine, Vol. 17, No. 6, June 1984. USING UNARC ----------- The UNARC program provides an on-line help message, which is generated by running the program with an empty command line: A>UNARC UNARC 1.6 27 Mar 87 CP/M Archive File Extractor Usage: UNARC [d:]arcfile[.typ] [d:][afn] [N|P|C] Examples: B>UNARC A:SAVE.ARK *.* ; List all files in CP/M archive SAVE on drive A B>UNARC A:SAVE.ARC *.* ; List all files in MS-DOS archive SAVE on drive A A>UNARC SAVE ; Same as either of above A>UNARC SAVE *.* N ; Same as above (no screen pauses) A>UNARC SAVE *.DOC ; List just .DOC files A>UNARC SAVE READ.ME ; Typeout the file READ.ME A>UNARC SAVE READ.ME N ; Typeout the file READ.ME (no screen pauses) A>UNARC SAVE A: ; Extract all files to drive A A>UNARC SAVE B:*.DOC ; Extract .DOC files to drive B A>UNARC SAVE C:READ.ME ; Extract file READ.ME to drive C A>UNARC SAVE PRN.DAT P ; Print the file PRN.DAT (no formatting) A>UNARC SAVE *.* C ; Check validity of all files in archive As shown by this help display, the UNARC utility provides the following capabilities: (1) Listing the directory of an archive (2) Extracting component files from an archive (3) Typing the contents of a component file at the console (4) Printing a component file directly on the CP/M list device (5) Checking the validity of an archive and its component files The particular operation to be performed is determined by the form of the file parameter(s) in the command line, as described separately in the sections which follow. The following characteristics apply to all operations: The first command line parameter must specify the name of an archive file. A drive name and filetype are optional. The filetype, if omitted, defaults to "ARK" or, if no such file exists, the alternate (MS-DOS) default "ARC" is assumed. The standard CP/M terminal control characters, CTRL-S (to suspend console output) and CTRL-C (to abort the program), may be used at any time. CTRL-K may also be used as an alternate for CTRL-C. Printer output to the CP/M list device may be obtained by typing CTRL-P at CCP command level before executing UNARC. In addition, by default UNARC will pause after every 23 lines of console output. At this time, the message "[more]" will appear at the bottom of the console screen. The listing may be resumed by typing any key (other than CTRL-S, CTRL-C, or CTRL-K, which will function as described above). If the space bar is used, one more line of console output will be displayed (over- writing the "[more]" message) and the program will again pause. If any other key is typed (e.g. RETURN), another 23 lines of output will be allowed to scroll onto the screen before the next pause. (LINE FEED may be used to prevent overprinting of the "[more]" line, e.g. for hard-copy terminals.) If continuous display is desired, this automatic pause feature may be disabled by specifying "N" at the end of the command line. The "N" must be the last command line character, and it must be preceded by a space. Also, there must be two preceding file parameters on the command line. E.g., note the difference between the following commands: A>UNARC SAVE N ; Typeout the file N. in archive SAVE A>UNARC SAVE *.* N ; List all files in archive SAVE with no pauses The N option may not be used in conjunction with the P (Print) or C (Check) options. LISTING AN ARCHIVE DIRECTORY ---------------------------- By default, UNARC produces a detailed console listing of the component files in an archive. (In fact, there is no way to suppress this listing; it is generated during all UNARC operations.) If only the archive file name appears on the command line, UNARC will generate a complete directory of all component files in the specified archive file. Otherwise, the second command line parameter may be used to select a particular file to be listed (or group of files, if it contains the ambiguous file specification characters "*" or "?"). If no disk drive name is provided for the second parameter, and this parameter specifies a group of files, the directory listing is the only output generated by the program. A sample directory listing is illustrated here: A>UNARC CODES Archive File = CODES.ARK Name Length Disk Method Ver Stored Saved Date Time CRC ============ ======= ==== ======== === ======= ===== ========= ====== ==== ABLE .DOC 24320 24k Crunched 8 11777 52% 30 Apr 86 10:50a 42C0 BRAVO .COM 17152 17k Squeezed 4 14750 14% 2 May 86 4:11p 8CBD CHARLIE .TXT 234 1k Packed 3 99 58% 2 May 86 4:11p 8927 ==== ======= ==== ======= === ==== Total 3 41706 42k 26626 36% 58A4 This listing is equivalent to the "verbose" listing of the MS-DOS ARC program (with the addition of the "Disk" and "Ver" fields, which are unique to UNARC). The listing requires a 78-column terminal width; there is currently no "short" listing format. "Name" is the file name which will be generated if the file is extracted by UNARC on a CP/M system. (This is not necessarily the same as the name recorded in the archive file. Although CP/M and MS-DOS file naming conventions are identical, two conversions are made to guarantee file name validity under CP/M: Lower-case letters are converted to upper-case, and non-printing characters are converted to dollar signs, "$".) Archive entries are usually maintained (and hence listed) in alphabetic name order. "Length" is the uncompressed file length, i.e. the number of bytes the file will occupy if extracted to disk, exclusive of any additional length imposed by the CP/M file system. Note that MS-DOS permits files of arbitrary lengths (unlike CP/M which restricts all files to a multiple of 128 bytes). "Disk" is the actual amount of disk space required to extract the file to a CP/M disk, expressed as a multiple of 1K (1024) bytes. Note that this number is dependent on the disk data allocation block size. (CP/M permits various block sizes, ranging from 1K to 16K bytes. Typical sizes are 1K for single- density floppy disks, 2K for double-density floppies, and 4K for hard disks, although these values are quite system-dependent.) In the absence of an explicit output drive name, UNARC uses the block size of the default (currently "logged") disk drive (i.e. the drive which appears in the CCP prompt). "Method" is the compression method used, specified as "Unpacked", "Packed", "Squeezed", "Crunched", "Squashed", or "Unknown!". If the method "Unknown!" appears, it most likely indicates (if not a faulty archive file) a newer release of the MS-DOS ARC program that supports a new compression method (or a new variation of an existing method). In this case, a corresponding new release of UNARC will be required to extract the file. "Ver" further identifies the version of compression used. Currently, UNARC supports versions 1-9: unpacked files can have versions 1 or 2; packed files, version 3; squeezed files, version 4; crunched files, versions 5-8; and squashed files, version 9. The highest version number associated with each compression method is the one generated by the most recent release of the MS-DOS ARC program. "Stored" is the compressed file length, i.e. the number of bytes occupied by the file in the archive. (This does not include the overhead associated with the directory information itself, which adds an additional 29 bytes to the size of each component file.) "Saved" is the percentage of the original file length which was saved by compression; i.e., higher values indicate better compression. (The MS-DOS ARC documentation refers to this as the "stowage factor.") The value shown on the totals line applies to the archive as a whole, not including the directory overhead. "Date" and "Time" refer to the last file modification, as of the time it was added to the archive. (Date and time stamping is, of course, one of the nice features of MS-DOS which is lacking in standard CP/M 2.2.) "CRC" is an internal 16-bit cyclic redundancy check value which is computed when a file is added to an archive (expressed in hexadecimal). As a test of file validity, UNARC re-computes this value when it extracts a file (see below). Note that this value is calculated by a different method than that used by either of the two popular public domain programs, CRCK and CHEK. (It is however quite valid as a reliable error-detection mechanism.) This value is shown in the listing for completeness only. The value shown on the totals line is the 16-bit sum of all displayed CRC values. This is useful as a single "checksum" value for comparing entire archives. (Since the CRC values are computed before compression takes place, the total should be the same for all archives created from the same set of input files, independent of any particular variations in file order or compression methods.) The "Total" line is displayed only if multiple files appear in the listing, and it includes a count of the number of files listed. EXTRACTING FILES FROM AN ARCHIVE -------------------------------- If the second command line parameter contains a disk drive name, UNARC will extract the selected file(s) from the archive to CP/M file(s) on the indicated disk drive. If only a drive name appears, all component files of the archive will be extracted. The following illustrates a sample archive directory listing as generated during a file extraction operation: A>UNARC CODES B: Archive File = CODES.ARK Output Drive = B: Name Length Disk Method Ver Stored Saved Date Time CRC ============ ======= ==== ======== === ======= ===== ========= ====== ==== ABLE .DOC 24320 24k Crunched 8 11777 52% 30 Apr 86 10:50a 42C0 Replace existing output file (y/n)? Y BRAVO .COM 17152 18k Squeezed 4 14740 14% 2 May 86 4:11p 8CBD Warning: Extracted file has incorrect CRC Warning: Extracted file has incorrect length Warning: Bad archive file header, bytes skipped = 10 CHARLIE .TXT 234 2k Packed 3 99 58% 2 May 86 4:11p 8927 ==== ======= ==== ======= === ==== Total 3 41706 44k 26616 36% 58A4 The above listing also illustrates several warning messages which may occur when extracting files from an archive. The message "Replace existing output file (y/n)?" appears if a file of the same name already exists on the output drive. The user must answer "Y" (or "y") to allow the extraction to proceed (in which case, the existing file is unceremoniously deleted). Any other response will cause UNARC to preserve the existing file, bypass the extraction operation for the current file, and (except for a CTRL-C response) skip to the next file to be extracted (if any). The first two warning messages illustrated above are provided as a check on the validity of the extracted file. These indicate that either the cyclic redundancy check (CRC) value computed by UNARC, or the resulting extracted file length, does not match the corresponding value recorded in the archive when the original file was added to it. The final warning message occurs if UNARC fails to detect the proper format for the start of a new subfile, but can recover by skipping a certain number of bytes in the archive file. (If the recovery attempt fails, UNARC aborts with the message "Invalid archive file format.") The appearance of any of these messages most likely indicates that the file data has been corrupted in some way (e.g. during modem transmission from a remote system). Note that if the original (i.e. MS-DOS) file length was not an exact multiple of 128 bytes (as required by CP/M), UNARC will pad the final record of the extracted file with hex "1A" (ASCII CTRL-Z) bytes. This provides the correct end-of-file termination for text files, according to CP/M conventions. Also, the disk space shown in the archive directory listing will be correct for the specified disk drive. (In the above examples, drive A: has a 1K data allocation block size while drive B: has a 2K block size, which accounts for the differences in the two listings.) In order to determine the exact disk space requirements in advance of a file extraction operation, the user may first "log into" the desired output drive (i.e. select it as the default drive), and run UNARC to obtain a directory listing only. (This is a consideration only on systems with mixed disk drive types.) A file extraction operation may be aborted at any time by entering CTRL-C from the console. In this case, any partial output file will remain on disk and should be deleted manually following the program abort. (Any existing file of the same name will have already been deleted, however.) TYPING OUT A FILE IN AN ARCHIVE ------------------------------- A console typeout of the contents of a single component file in an archive may be requested by specifying a non-ambiguous file name (and no disk drive name) in the second command line parameter. For example: A>UNARC CODES ABLE.DOC Archive File = CODES.ARK Name Length Disk Method Ver Stored Saved Date Time CRC ============ ======= ==== ======== === ======= ===== ========= ====== ==== ABLE .DOC 24320 24k Crunched 8 11777 52% 30 Apr 86 10:50a 42C0 ------------------------------------------------------------------------------- This is file ABLE.DOC, contained within the archive CODES.ARK. Typeout will proceed until the end of this file or may be aborted by CTRL-C..... The specified file is assumed to contain valid ASCII text data. In particular, all bytes are masked to seven bits, and all ASCII control characters are ignored except for HT (horizontal tab, which is expanded to blanks with assumed tab stops at every eighth column), LF, VT or FF (line feed, vertical tab or form feed, which generate a new typeout line), and SUB (CTRL-Z, which by CP/M convention indicates end-of-file and terminates the typeout). Note that BS (backspace) and CR (carriage return) are ignored, so that text will not be obscured within files which utilize these for over- printing (i.e. when directed to a printer). The following filetypes, which are usually associated with binary (non-text) data, are specifically excluded from typeout operations: COM, EXE, OBJ, OV?, REL, ?RL, INT, SYS, BAD, LBR, ARC, ARK, ?Q?, and ?Z?. If one of these types is specified, only the directory information for the requested file is listed. Note that CRC and file length checking are not performed during a typeout operation, as they are during extraction to a disk file. PRINTING A FILE IN AN ARCHIVE ----------------------------- A single component file in an archive may be output directly to the printer (CP/M list device) by specifying a trailing "P" on the command line. The "P" must be the last command line character, and it must be separated from the second file parameter by a space. (The file parameter must specify a non- ambiguous file name and no disk drive name.) For example: A>UNARC CODES CHARLIE.TXT P The specified file is assumed to contain data suitable for printer output and is passed directly to the printer without alteration or additional formatting. This operation is particularly well-suited for output of binary graphics images on dot-matrix printers, since these can be extemely large but tend to compress quite well (e.g. to less than 5% of their original size). Note that the binary data filetypes which are excluded from typeout operations are also excluded from printing operations. Printing may be paused or aborted by use of the console CTRL-S and CTRL-C characters. CHECKING FILES IN AN ARCHIVE ---------------------------- UNARC may be directed to extract one or more component files from an archive, without actually storing these as disk files, by specifying a trailing "C" on the command line. This operation performs file CRC and length checking, and it is useful for verifying correct modem data transmission of an archive. The "C" must be the last command line character, and it must be separated from the second file parameter by a space. (The file parameter must not specify a disk drive name, which indicates extraction to disk.) To check an entire archive, specify "*.*" for the second file parameter, for example: A>UNARC CODES *.* C PROGRAM OPTIONS --------------- UNARC provides several options which may be used to tailor the program for specific non-universal requirements. Many of these are intended for RCP/M (Remote CP/M) system operators, to allow generation of a secure version of UNARC which can be used by remote callers for purposes of archive directory listing and/or file typeout only (but not file extraction). Others are provided for specialized non-standard CP/M systems and need not concern the majority of users running CP/M 2.2, CP/M 3.0 (CP/M Plus), or ZCPR3/ZRDOS systems. Additional options provide user preference features (such as the number of screen lines between console output pauses, or the list of filetypes excluded from typeout operations). All of these options are described in UNARCOVL.ASM, an assembly language source file that can be edited and assembled to generate a HEX-format overlay for easy patching of the UNARC.COM or UNARCA.COM program files. Complete details are provided for technically-oriented users in UNARCOVL.ASM. However, the default options in the distributed program files are suitable for the majority of users with standard CP/M operating systems. PROGRAM DISTRIBUTION -------------------- The UNARC program, its documentation, and all related files are distributed in archive file format (of course!). The distribution file is named UNARCxx.ARK, where "xx" is derived from the current version number (e.g. UNARC16.ARK for version 1.6). (This does not include the program source code, which is distributed separately.) This archive has the special characteristic that it is "self-unpacking." I.e., a separate copy of the UNARC.COM program file is NOT required to extract the component files from this archive. The procedure for extracting the distribution files is quite simple: First, copy or rename UNARCxx.ARK to a program file, UNARCxx.COM, on the current disk drive. (Note that the filename, UNARCxx, must NOT be changed.) Then, run this program with a single optional command line parameter specifying the disk drive to which all distribution files will be extracted (defaults to current drive). For example, assuming UNARC16.ARK is on drive B: and the files are to be extracted to drive C:, the following CP/M commands may be used: A>B: ; Set current drive for UNARC16.ARK B>REN UNARC16.COM=UNARC16.ARK ; Rename it to UNARC16.COM B>UNARC16 C: ; Run it to extract all files to drive C: Note that this self-unpacking capability is provided only by the distributed archive file, and it will not work if that file is altered or reconstructed. AUTHOR'S NOTE ------------- I undertook writing the UNARC program to satisfy my curiosity about software developments in the MS-DOS/PC-DOS world. At the time I began work on UNARC, the MS-DOS ARC program had been in existence for over a year and had achieved widespread popularity and acceptance in the 16-bit community. Unfortunately, the lack of a compatible equivalent for CP/M systems rendered a large amount of public domain software inaccessible to 8-bit users such as myself. (Note that 16-bit software can indeed be of interest to users of 8-bit systems, e.g. Pascal and C language programs.) Also, an increasing number of RCP/M systems now cater to both 8-bit and 16-bit users. Since the release of UNARC 1.0 (May 3, 1986), I have been encouraged to see that the program has found a welcome home on many such systems. Special thanks are due to Irv Hoff and Norman Beeler for providing archive file support in the KMD20 and LUX52 series of programs, respectively. With the increasing popularity of .ARC files on many different computer systems, I believe that continued such support of this compression format is both desirable and inevitable for CP/M systems. At the time of this writing I am about to release NOAH, a companion program to UNARC which will allow CP/M users to generate ARC-compatible files. Bob Freed March 27, 1987 NOTICE The UNARC program and its associated documentation is the copy- righted property of its author -- it is NOT in the public domain. HOWEVER... Free use, distribution, and modification of these files is permitted (and encouraged), subject to the following conditions: (1) Such use or distribution must be for non-profit purposes only. (2) The author's copyright notice may not be altered or removed. (3) Modifications to this program or its documentation files may not be distributed without notification of and approval by the author. (4) The source program code may not be used, in whole or in part, in any other publicly-distributed or derivative work without similar notification and approval. No fee is requested or expected for the use and distribution of this program subject to the above conditions. The author reserves the right to modify these conditions for any future revisions of this program. Questions, comments, suggestions, commercial inquiries, and bug reports or fixes are welcomed by the author: Robert A. Freed 62 Miller Road Newton Centre, MA 02159 Telephone (617) 332-3533 ------------------------------------------------------------------------------ UNARC is a CP/M 2.x+ utility which lists, types, prints, checks, and extracts files in archive libraries (*.ARC or *.ARK files). Includes separate program versions for Z80 (UNARC.COM) and 8080 (UNARCA.COM). Assembler overlay file supports installation for RCP/M's and special options. Version 1.6 corrects a bug which caused incorrect CRC error warning message when extracting some files to disk. UNARC16.ARK is a "self-unpacking" archive: Rename it to UNARC16.COM, and then run it! File: UNARC.MSG Subject: Release Message for UNARC Program Version: 1.6 Date: March 27, 1987 ------------------------------------------------------------------------------ Version 1.6 of the CP/M UNARC utility: * Corrects a bug in version 1.5, which caused generation of an 'incorrect CRC' warning message (during extraction of files to disk) in certain cases where such an error condition did not actually exist. Version 1.5 of UNARC included the following changes from the previous version 1.4 release: * Provides self-unpacking archive support (see below). * Corrects a serious bug in the non-Z80 version (UNARCA.COM), which caused failure to output the last 1-255 bytes of an extracted file in certain situations. (In particular, ALL files less than 256 bytes in length could not be extracted from archives.) * Supports the new "squashed" compression method generated by the MS-DOS program PKARC (version 2.0 or later). * Provides a new command line option (P) for direct printing of files on the CP/M list device. * Provides a new command line option (C) for checking the validity of archive files. * Displays a checksum total of CRC values (useful for comparing separate copies of an archive file). * Alters the mechanism used to avoid a problem with the LUX library/archive utility program, to provide independence of UNARC from recent multiple releases of new LUX versions by different authors. (See USELUX definition in UNARCOVL.ASM overlay file.) * Minor enhancements to tab expansion and CTRL-S/CTRL-C processing during file typeout. * Expands on-line help display examples. Complete details of all of the above changes (and past history of prior UNARC releases) are provided in the version 1.5 source program file (UNARC.Z80). * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * UNARC is now distributed exclusively as a "self-unpacking" archive file, UNARC16.ARK. This allows automatic extraction of the distributed files, without requiring access to a separate copy of UNARC.COM or UNARCA.COM. To utilize this capability, simply copy or rename UNARC16.ARK to a program file, UNARC16.COM, on the current disk drive. (The exact file name UNARC16.COM is required.) Then, run this program, with a single optional command line parameter specifying the disk drive to which all distribution files will be extracted (defaults to current disk). For example, assuming UNARC16.ARK is on drive B:, and the files are to be extracted to drive C:, the following CP/M commands may be used: A>B: ; Set current drive for UNARC16.ARK B>REN UNARC16.COM=UNARC16.ARK ; Rename it to UNARC16.COM B>UNARC16 C: ; Run it to extract all files to drive C: Note that this self-unpacking capability is provided only by the distributed archive file, and it will not work if that file is altered or reconstructed. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The following files are distributed with this release: Filename.Typ Size Recs CRC Description ------------ ---- ---- ---- ----------- 1 UNARC .MSG 7k 50 Release message (this file) 2 UNARC .COM 5k 37 17B5 Program (Z80 version) 3 UNARCA .COM 6k 45 913C Program (8080/8085 version) 4 UNARC .DOC 31k 244 A8B1 User documentation 5 UNARC .FOR 1k 4 23B4 Brief "what's it for?" abstract 6 UNARCOVL.ASM 14k 111 EEC3 Overlay source for program options 7 UNARC16 .DIF 2k 14 8E8C Version 1.6 source code differences 8 UNARC .Z80 122k 969 406F Version 1.5 source code (UNARC15S.ARK) (The CRC values shown above are those displayed by UNARC itself, and these should be used for verification purposes. These are not compatible with the values produced by other CP/M programs, such as CRCK and CHEK.) Items 1-7 are included in the self-unpacking UNARC16.ARK file. Item 5 may be used to supply a requested program description after uploading UNARC16.ARK to a remote system. Item 6 supports all user-configurable program options. Item 8 is distributed in a separate archive file, UNARC15S.ARK, and it is not required for UNARC program operation or configuration. (Due to the relatively insubstantial nature of the version 1.6 update, the new source code file is not being distributed. However, item 7 may be used, in conjunction with the SSED utility (version 2.0, by Chuck Forsberg), to generate an updated source code file from the distributed file for version 1.5.) NOTE 8080/8085 USERS: The file UNARCA.COM is an alternate version of the program which will run on your systems. However, it is larger and substantially slower than the standard (Z80-only) version, UNARC.COM. (UNARCA.COM will run on ALL CP/M systems, but it is specifically NOT recommended for users with Z80's!) RCP/M SYSOPS: The assembly language overlay file UNARCOVL.ASM is provided primarily for your use in generating a secure version of UNARC for use by remote callers. Note that several of the UNARC 1.6 changes had been distributed to RCP/M Sysops in an earlier Beta-test release (UNARC 1.42). That version was also distributed with several recent releases of the LUX utility program (by different authors), and it should now be replaced by UNARC 1.6. (If you use LUX, be sure to define USELUX = YES in the overlay file.) Due to the self-unpacking feature of UNARC16.ARK, it is no longer necessary to provide separate copies of UNARC.COM and UNARCA.COM for downloading by first-time users. (Even if you prefer the use of .LBR files on your system, you are encouraged to maintain at least this one file, UNARC16.ARK, in its distributed form!) The UNARC.DOC file provides a complete program description and user operating instructions. Refer to the notice in that file regarding rights of use and distribution of this program and its associated documentation files. Copyright (C) 1987 by Robert A. Freed All Rights Reserved ------------------------------------------------------------------------------ ÍCOMCMEXEOBJOV?REL?RLINTSYSBADLBRARCARK?Q??Z?UNARC 1.6 27 Mar 87 CP/M Archive File Extractor Usage: [d:]arcfile[.typ] [d:][afn] [N|P|C] Examples: B>A:SAVE.ARK *.* ; List all files in CP/M archive SAVE on drive A B>A:SAVE.ARC *.* ; List all files in MS-DOS archive SAVE on drive A A>SAVE ; Same as either of above A>SAVE *.* N ; Same as above (no screen pauses) A>SAVE *.DOC ; List just .DOC files A>SAVE READ.ME ; Typeout the file READ.ME A>SAVE READ.ME N ; Typeout the file READ.ME (no screen pauses) A>SAVE A: ; Extract all files to drive A A>SAVE B:*.DOC ; Extract .DOC files to drive B A>SAVE C:READ.ME ; Extract file READ.ME to drive C A>SAVE PRN.DAT P ; Print the file PRN.DAT (no formatting) A>SAVE *.* C ; Check validity of all files in archive Copyright (C) 1986, 1987 by Robert A. Freed s71!nͫ!E(  F(!Lk WL !ͭ!*| (i=" ̀:1  = 0!_6q|  د222   8:!2Z>ͳ ͳ ͂ !^+~ #~N(P 2C 2: 2 2> !l bk6? !e 6A#6R#6K2!](hO (! w=2!\:`͘ !<(6!g6C2| :s :  ###~<2s=(:!!H(!!z:!qLf* ~ <ɯ\>͍><< ( c!~5 #+w7*,"~͝\U`#|x {jaj8!w<,zw\$*}8"}!!|4  ! !! (!8 >$. x8> w~#?(#:G!s= Gw2:O: (\' >2,=`_A2$ ѻ_!|Y}90yOq%w$, ɱL!(?((#=2! >?:G:  ;`o& ~Y!%wO#:Zw $:s(80w: G!F-N 9(6͕͝(nͶ ͢(_͂ {Y͕͕`2: 0M ( 8  0 :<ȷ*R,Ŀ !!ͭx0Ŀ ͈!6` ^͇ O(zW ٯo? 87&0$$~$F /  !uT]!t 6d0 O!& >U(=85!Q 6( 6l_> 8 `/>2 !"' ! > (! ! " "} S 2)x2 ͇ C* ůp < ڃ ͦ  #~ ~ `iͦ ~8 rW+~s_##~+p #~ %( $~rW+~s_# **d#"*ͦ +s#r#w}- |%*( ( )4T])!'5#~#F!?(M<82(|=!)N6 +w+~(GwG!,͊ !"*!X 7lgxG ob ,L}Z8 90)))))lo& T])))))))))))|gͦ ~G) ^#Vz eˤͦ ~(#r+s_!)8+~g2(gjjjj*$.ckCgggGwG >y (Oo|&$fo:&*$oR(DM*!B"!0*#+"#0 :(3bk 6#} ( S S !͕͝=`:: C<!=8 Y  x (8 0͂ ͢!4(:  s(`^͢# x *|#" !͵!!͵!F L8d: ͵F3!F[@L[1 d[+6& !_=(L (Y ͂ Ͷ > Y > Y !5>w7Ͷ ͢(>Ͷ <2͂ Y Ͷ ͂ = > Y  ͂ ( (>=Y  x>.((w#*!:#?lg:=_/_T*"@6k#!p: 8 ( ( 8 ( HLͭ`i)jJ)j)j)jJ)j)jͭx( >e=RB0F6%#:F6 #*)))| 8O!I 6 #?P0q*|a( 8p > )))_6:#?w#[*"/Sro6z'`w#   ^#V#~#f_W_ 7͉0w#0| ٱ(w#z(͑ |8e.)8,^#V#N#Fw# q#a{Z80 required!$aborted!CP/M version 2 or higher requiredNot enough memoryAmbiguous archive file nameCannot find archive fileInvalid archive file formatWarning: Bad archive file header, bytes skipped = 00000No matching file(s) in archiveInvalid archive file driveInvalid output driveArchive File = FILENAME.ARCOutput Drive = A:Checking archive...Cannot extract file (need newer version of UNARC?)Replace existing output file (y/n)? Disk fullDirectory fullCannot close output fileIncompatible crunched file formatTypeout line limit exceededWarning: Extracted file has incorrect CRClength[more] ???JanFebMarAprMayJunJulAugSepOctNovDecUnpacked Packed SqueezedCrunchedSquashedUnknown!Name======== =Length Disk =Method= Ver =Stored Saved ===Date== =Time= CRC= ==== ======= ==== ======= === ==== Total 4c 57944 DB 'UNARC 1.6 27 Mar 87' . 10c 19282 DB 'UNARC16' . 47a 53450 1.6 27 Mar 87 (RAF) - Murphy's Law strikes again: Within hours after the release of version 1.5, a bug was discovered. Incorrect CRC error messages are generated during file extraction in some situations. This was caused by failure to clear carry before a 16-bit subtract (SBC HL,DE), which we changed inadvertantly in 1.42. (So much for Beta-testing!) Such faulty error messages occur only for disk file extraction, not when the 'C' command option is used to check an archive. Furthermore, the bug occurs only when (1) a file contains an odd number of 128-byte records and (2) the BDOS returns from the last write-record call with carry set. [Note of interest: The CP/M 2.2 BDOS returns with carry set only if the output drive is different than the current default drive. This assumes, of course, that no RSX-type system extensions are in place to intercept BDOS calls: We would have caught this bug, but for such a system extension which always clears carry before returning from BDOS calls.] Our thanks to Tom Brady for reporting this one. - Zero-fills last record of .COM file. (Not needed with Z80ASM and/or SLRNK, but provided so that M80/L80 will generate identical output to that produced by the SLR Systems' tools.) . 1896a 6627 ; Note: Following instruction added in UNARC 1.6, since the preceding ; test (altered in 1.42) no longer clears carry. OR A ; Clear carry for 16-bit subtract . 4112a 26825 IF ($ AND 7FH) NE 0 ; Clear out final record of the .COM file ; (Needed only for precise M80/L80 compatibility with Z80ASM/SLRNK) REPT 128-($ AND 7FH) DB 0 ENDM ENDIF . $a 5531 . öCOMCMEXEOBJOV?REL?RLINTSYSBADLBRARCARK?Q??Z?UNARC 1.6 27 Mar 87 CP/M Archive File Extractor (8080 Version) Usage: [d:]arcfile[.typ] [d:][afn] [N|P|C] Examples: B>A:SAVE.ARK *.* ; List all files in CP/M archive SAVE on drive A B>A:SAVE.ARC *.* ; List all files in MS-DOS archive SAVE on drive A A>SAVE ; Same as either of above A>SAVE *.* N ; Same as above (no screen pauses) A>SAVE *.DOC ; List just .DOC files A>SAVE READ.ME ; Typeout the file READ.ME A>SAVE READ.ME N ; Typeout the file READ.ME (no screen pauses) A>SAVE A: ; Extract all files to drive A A>SAVE B:*.DOC ; Extract .DOC files to drive B A>SAVE C:READ.ME ; Extract file READ.ME to drive C A>SAVE PRN.DAT P ; Print the file PRN.DAT (no formatting) A>SAVE *.* C ; Check validity of all files in archive Copyright (C) 1986, 1987 by Robert A. Freed !9"<q1.!.ͪ3!E88?8͹ 1!~ͺk!*.|.ʛ=:1d8?8= j! U6dE222  Sښ:!2>uͷHͷͅ1!^+~ #~NP2>C2?: 22B> !lO~# D bk6? !e 6A#6R#6K2=!]ʁ ʛ!o w=2@!\:0ڛV!=6!g6C 2`:}: }###~<2C=ʍ:!!Wʾ!!z:!qLá* ~<ɯ\>O><O<  Þ!~~5;#!+w.7F*@,J"@~\Û#|^x^{ja}o|g€,-|^!@w<zÛw\$*}^"}!L!|4p8!~q!P!D" !>$.x> w*~*#"?(#:G!?=IGw2>:O:Oc͂>2OÏ=Kқ_A2|͂ѻi_!|͔}y<=O|*"yO*"q%w$,™ɱ !L?#=2O!D >? :OG:p қo& ~͔!wO#:w_ :I I I w:>› !-NÛ ʛ ʍ ͺw _ͅ{Yʛ2:p ͐ ʺ  ë ͣ ҷ :O<ȷ*}o|g ,-|!ͺx!6Ûy n O( zW   ͐ o<=F g 7&N $$~$F_ /ͣ , g 0  !uT]! 6Ҝ  O!t >U ! ʩ 6 _> ü ڷ -›/>2 !" ! > ! " ! "*" " " 2x2: n `i" ů < ͐ h ; 1 #~͊  ~= `i; ~P rW+~s_#? #~+ #~͊ %x $~rW+~s_#[  + *||#"; +s#r#w}-¾ |%ʻ ʾ ¾ 4T])!5#~#F!<=N |<=g|}<=o| |<=g|}<=o| 2|=!N6 +w+~5 Gw G) !,q !"! x|h 7 lgxGN ob |g|<=g|}<=o|L}}o|g¢ ,-|  y<=O|һ )ª ))))l o& T])))))))))))|g; ~J) ^#Vz e|g; ~ # r+s_!~<=w|= +~g2g}o|gY ,-|}o|gh ,-|}o|gw ,-|}o|g† ,-|*.ckCjjjJz¼ Gµ > y ± ʺ Oo|&$fo:*o}o|g ,-|DM*}o|g,-|"*+":Wbk )6#}%?AA3!=Û:?:>®1<!=X xc sv vͅ!<4v: vvOÛ^# x¯*.|#".~!6!0!P?U͇:͚S!*.10?*4N 6͇*:V6Âb!_=oL cXrͅͺ> X> X!B5>wͺʠͺ <2BͅXúkͺÂͅ=> Xͅʅ >=X x>.w#*:|<=g||<=g|?lg:C=_/_T*4"416k#!:p} } } } } :?ͺ`i"*)"}o|g¯,-|*"}o|g,-|*)"}o|g,-|*)"}o|g,-|*)"}o|g,-|*"}o|g',-|*)"}o|g?,-|*)"}o|gW,-|ͺ*xʑ>e=}o|gz,-|}o|gŠ,-|m86%#:86 #*)))| ڶO! 6 #<=P0R*|a p > )))͂6:#?w#**:":Sr~'z'`w# U R ^#V#~#f\_W_ 7͏0tw#m|aow#†ozʝ͘£|ڨíe.)ڵ,­^#V#N#Fw# q#a{*"*"*"~# x# x NOTE: The Z80 version is smaller and faster! $aborted!CP/M version 2 or higher requiredNot enough memoryAmbiguous archive file nameCannot find archive fileInvalid archive file formatWarning: Bad archive file header, bytes skipped = 00000No matching file(s) in archiveInvalid archive file driveInvalid output driveArchive File = FILENAME.ARCOutput Drive = A:Checking archive...Cannot extract file (need newer version of UNARC?)Replace existing output file (y/n)? Disk fullDirectory fullCannot close output fileIncompatible crunched file formatTypeout line limit exceededWarning: Extracted file has incorrect CRClength[more] ???JanFebMarAprMayJunJulAugSepOctNovDecUnpacked Packed SqueezedCrunchedSquashedUnknown!Name======== =Length Disk =Method= Ver =Stored Saved ===Date== =Time= CRC= ==== ======= ==== ======= === ==== Total GA2\x<2C@2e!37#!#2<2 >$2~2.L.l.j.ÿ~# x# UNARC16 COM  UNARC16.COM A: N (Self-unpacking file A:UNARC16.COM) $; UNARCOVL.ASM ; ; Overlay File for UNARC ; CP/M Archive File Extractor ; Version 1.6 27 Mar 87 ; ; Copyright (C) 1987 by Robert A. Freed ; All Rights Reserved ; ; This file may be used to customize the UNARC utility for specific ; non-universal requirements. It is intended primarily for RCP/M ; system operators or technically-oriented users with specialized ; system requirements. Use only with the UNARC program version ; indicated above. ; ; NOTE: This file is intended for individual, private use only! ; Please DO NOT re-distribute versions of the UNARC.COM (Z80) or ; UNARCA.COM (8080/8085) program files which have been modified by use ; of this overlay (except as noted for the USELUX definition below). ; The distributed program files are suitable for the majority of users ; with standard CP/M 2.2 or CP/M 3.0 (CP/M Plus) operating environments. ; ;======================================================================= ; ; To use, simply follow these three steps: ; ; 1) Edit this UNARCOVL.ASM file for desired options. ; 2) Assemble to create an UNARCOVL.HEX file. ; 3) Merge with the distributed UNARC.COM or UNARCA.COM program files. ; ; The ASM.COM assembler supplied with CP/M 2.2 may be used for assembly. ; DDT.COM or SID.COM may be used for the final step (if you save the ; correct number of memory pages), but the publicly-distributed program ; MLOAD.COM (by Ron Fowler, Nightowl Software, Inc.) is recommended: ; ; A>MLOAD UNARC.COM,UNARCOVL (for the Z80-only version) ; A>MLOAD UNARCA.COM,UNARCOVL (for the 8080/8085 version) ; ;======================================================================= ; NO EQU 0 YES EQU NOT NO ; ; Most UNARC program options are specified by EQUate statements below. ; Each option is followed by a detailed description of its function. ; Most of these options are provided for RCP/M systems, and those most ; commonly changed are marked with an asterisk '*' in the comment field. ; (The other option defaults are suitable for the majority of systems.) ; RCPM EQU NO ;*YES if remote CP/M system ; ; Define RCPM = YES to generate a restricted version of UNARC for secure ; use by callers of an RCP/M remote access system. "Restricted" implies ; that no disk file extraction can be performed. Also, the P (print) ; and C (check archive) command line options are ignored. In addition, ; file typeout may be disallowed (see TYFLG) or limited to a maximum no. ; of lines (see TYLIM), and the default interpretation of certain other ; parameters is modified (see TYPGS and BLKSZ). ; ; The following two definitions apply only if RCPM = YES: ; USEWHL EQU YES ; YES if RCP/M uses a wheel byte WHEEL EQU 003EH ;*Wheel byte address if USEWHL is YES ; ; Most RCP/M systems utilize a "wheel" byte in memory, to restrict ; access to privileged functions by remote callers and to provide ; greater flexibility for the sysop. If such a byte is implemented ; (USEWHL = YES), a single version of UNARC may be utilized both for ; restricted use by remote callers (wheel byte zero) and unrestricted ; local use by the sysop (wheel byte non-zero). Define WHEEL with the ; address of the wheel byte location in external memory. (ZCPR3 users ; should specify the address of their Z3WHL byte, as determined by ; running SHOW.COM). Note that all subsequent references to the ; "restricted" version of UNARC apply only when the wheel byte is zero; ; when the wheel byte is set, operation of UNARC is identical to that ; obtained by defining RCPM = NO. For those few RCP/M systems which do ; not implement a wheel byte (USEWHL = NO), it will be necessary to ; maintain separate versions of UNARC for remote callers (RCPM = YES) ; and local sysop use (RCPM = NO). ; ; The following two definitions apply only in restricted versions: ; TYFLG EQU YES ; NO to disallow RCP/M file typeout TYLIM EQU 0 ;*Non-zero typeout line limit (1-255) ; ; Define TYFLG = NO to disallow file typeout operations on RCP/M ; systems. In this case, UNARC may be used only to obtain directory ; listings of archive files. (In which case, it may be more appropriate ; to rename the program 'ADIR' -- see program name patch at end of this ; file.) If TYFLG = YES (the normal case), TYLIM may be defined as the ; non-zero limit (255 maximum) of the number of file lines which may be ; displayed. This may be desired by some RCP/M sysops to discourage ; excess on-line "browsing" in favor of downloading of long files by ; callers. If TYLIM = 0, unlimited file typeout is permitted as in ; unrestricted versions. ; CCPSV EQU 8 ; No. high memory pages to save (8 = 2K) ; ; UNARC uses all available TPA space for buffering output files, which ; provides better performance in systems with larger memories. However, ; by default the program preserves the (CP/M 2.2) CCP area at the top of ; the TPA, and it returns directly to the CCP instead of forcing a warm ; boot after execution. CCPSV specifies the amount of memory (256-byte ; pages) to reserve for this purpose. The default value (CCPSV = 8) is ; appropriate for the CCP size in standard CP/M 2.2 systems. Setting ; CCPSV = 0 will yield an additional 2K bytes of buffer space, but it ; forces a warm boot return after each program execution. This need be ; used only with very small CP/M 2.2 systems (but may be desirable with ; CP/M 3.0 or any non-standard system with a permanently-resident CCP). ; Certain non-standard CP/M implementations (TRS-80?) may require the ; definition CCPSV = 9. ; TYPGS EQU 0 ; No. buffer pages for typeout (0=max) ; ; This value specifies the number of (256-byte) pages to buffer an ; extracted file during typeout operations. The default definition ; (TYPGS = 0) provides the maximum possible buffering (the entire TPA ; space), but may cause a long delay at the start (and in the middle) ; of typeout of large files. Defining TYPGS = 1 will minimize viewing ; waits, but may cause excessive start/stop of floppy disk drive motors ; on some systems (e.g. 1983 Kaypro models). Since this is not a ; consideration for systems with hard disks, users of such systems may ; prefer TYPGS = 1. For restricted RCP/M versions, TYPGS = 1 is assumed ; if the default (TYPGS = 0) is not changed (to minimize delays for ; remote users). ; ; Note that the TYPGS definition may be overridden by the following: ; USELUX EQU NO ;*YES if UNARC will be used by LUX ; ; Some versions of the LUX library/archive utility program fail to ; properly protect the resident code which LUX relocates to high memory ; before calling UNARC. (This may be due to a problem of interaction ; between LUX and the BYE5 RCP/M monitor program.) This can result in ; a system crash during typeout of an archive member file with the LUX ; TYPE command. Define USELUX = YES to avoid this problem. This forces ; the minimum TPA buffering during file typeout (equivalent to defining ; TYPGS = 1), in both restricted and unrestricted versions. [Note that ; earlier versions of this overlay file solved this problem by altering ; the CCPSV definition. Unfortunately, that method depended upon the ; size of the LUX resident code, which is complicated by the recent ; introduction of different LUX releases by separate authors. This new ; method provides independence from the requirements of any particular ; version of LUX. Versions of UNARC which have been modified by this ; definition may be distributed with LUX, providing notice is given ; explaining that this modification may not be suitable for non-LUX ; environments and encouraging LUX users to upgrade to newer releases of ; UNARC as they become available.] ; BLKSZ EQU 0 ; Default disk allocation block size (K) ; ; This value provides the default disk allocation block size (as a ; multiple of 1K bytes) to use in calculating disk space requirements ; for the "Disk" column of archive directory listings (except during ; file extraction to disk, in which case the output drive's block size ; applies.) The default definition (BLKSZ = 0) indicates that the ; block size of the default (CCP) drive is to be used for this purpose. ; However, for restricted RCP/M versions, BLKSZ = 1 is assumed if the ; default is not changed. (Since 1K is the minimum disk block size in ; any CP/M system, this provides the widest applicability for all remote ; callers, independent of the RCP/M system's actual disk block size.) ; CPM68K EQU NO ; YES if BDOS function 31 unsupported ; ; UNARC uses BDOS function 31 (Get Address of Disk Parameter Block) to ; determine disk allocation block size (i.e. of the output drive when ; extracting files to disk, or of the default CCP drive at other times ; if BLKSZ = 0). However, this function is rarely used by application ; programs and is not supported by some non-standard implementations of ; CP/M (in particular, the 8080 CP/M 2.2 emulator for CP/M-68K). For ; such systems, define CPM68K = YES to inhibit use of BDOS function 31. ; In this case, the BLKSZ value will be assumed (1K, if BLKSZ = 0). ; HIDRV EQU 16 ; Highest input file drive (A=1,B=2,...) ; ; Specifies the highest allowable drive no. for archive files, where ; drive A is 1, drive B is 2, etc. The default definition (HIDRV = 16) ; is the maximum supported by CP/M. Most RCP/M systems need not alter ; this definition, since invalid drive accesses are normally intercepted ; elsewhere. If this is not the case, this value should be set to the ; number of available drives (assuming all sequential drives available, ; starting with drive A). Setting HIDRV = 0 restricts input to the ; default drive (i.e. disallows specification of a drive name for the ; archive file). ; HODRV EQU 16 ; Highest output file drive no. ; ; Specifies the highest allowable output drive no. for file extraction ; operations (specified as for HIDRV above). Setting HODRV = 0 will ; disallow any file extraction to disk (which is the obvious setting of ; importance for RCP/M systems). However, this is assumed in restricted ; versions, so this value need not be modified (except for local sysop ; use) if RCPM = YES. ; TYLPS EQU 23 ; No. typeout lines per screen (1-255) ; ; Specifies the number of lines between automatic pauses in console ; typeout. Should be set to one less than the number of display screen ; lines, to allow for the '[more]' message line. Setting TYLPS = 0 will ; inhibit all pauses (e.g. for hard-copy terminals), although this can ; also be specified by a trailing 'N' on the UNARC command line. ; BELLS EQU YES ; NO to inhibit error message bells ; ; By default (BELLS = YES), the terminal 'bell' (i.e. beeper) is sounded ; in all warning and fatal error messages, to bring operator attention ; to unusual conditions. Define BELLS = NO if you prefer solitude. ; ; (End of user-definable EQUates) ;======================================================================= ; (Start of program patches) ; ; Do not make any changes to this section. Additional user-definable ; options continue below the next double separator line. ; ORG 103H ; DB CCPSV ; 103H DB BLKSZ ; 104H DB HIDRV ; 105H ; IF USEWHL OR NOT RCPM PSWHL: DB HODRV ; 106H Pseudo wheel byte if not RCP/M ENDIF IF RCPM AND NOT USEWHL PSWHL: DB 0 ; 106H Pseudo wheel byte if weird RCP/M ENDIF ; DB TYFLG AND 0FFH ; 107H ; IF NOT USELUX DB TYPGS ; 108H ENDIF IF USELUX DB 1 ; 108H ENDIF ; DB TYLIM ; 109H ; IF RCPM AND USEWHL DW WHEEL ; 10AH ENDIF IF NOT RCPM OR NOT USEWHL DW PSWHL ; 10AH ENDIF ; DB TYLPS ; 10CH ; IF NOT CPM68K DB 0 ; 10DH ENDIF IF CPM68K AND BLKSZ DB BLKSZ ; 10DH ENDIF IF CPM68K AND NOT BLKSZ DB 1 ; 10DH ENDIF ; DB BELLS AND 0FFH ; 10EH ; ;======================================================================= ; (Additional user-definable patches continue here) ; ; The following is a table of filetypes (3-byte ASCII strings) which are ; assumed to contain binary data and are not allowed for file typeout. ; Question marks may be used as wildcards (will match any character). ; The table must terminate with a zero byte (room for 20 entries total). ; DB 'COM' ; CP/M-80 or MS-DOS binary object DB 'CM','D'+80H ; CP/M-86 binary object (or dBASE file) DB 'EXE' ; MS-DOS executable DB 'OBJ' ; Renamed COM DB 'OV?' ; Binary overlay DB 'REL' ; Relocatable object DB '?RL' ; Other relocatables (PRL, CRL, etc.) DB 'INT' ; Intermediate compiler code DB 'SYS' ; System file DB 'BAD' ; Bad disk block DB 'LBR' ; Library DB 'ARC' ; Archive (unlikely in an ARC) DB 'ARK' ; Alternate archive (ditto) DB '?Q?' ; Any SQueezed file (ditto) DB '?Z?' ; Any CRUNCHed (or ZOO'd) file (ditto) ; ; Additional filetypes may be added below. To remove one of the above ; filetypes without replacing it, simply set the msb in any byte (as ; above for .CMD, since that can be a readable dBASE command file). ; DB 0,0,0 DB 0,0,0 DB 0,0,0 DB 0,0,0 DB 0,0,0 DB 0 ; 14BH End of table (do not change) ; ;----------------------------------------------------------------------- ; ; The following 6 bytes specify the program name for self-referential ; use in the help display and abort message. If less than 6 name ; characters are desired, the remaining bytes must be padded with ; blanks. ; DB 'UNARC ' ; 14CH Author's preference, of course ;;; DB 'ADIR ' ; 14CH (But some sysops prefer this) ; ; Note: If you prefer to call this program 'ADIR' (Archive Directory), ; move the ';;;' up one line above. (We won't object too much, since ; we plan to release a program of that name in the near future.) ; ;======================================================================= ; LAST EQU $-1 ; 151H Last patch address ; ; Confirm that the symbol LAST has the value 151H, which is the highest ; program location which may be modified in UNARC.COM or UNARCA.COM! ; END