; UNARCZOV.ASM ; ; Overlay File for UNARCZ -- ZCPR3 Archive File Extractor -- Version 1.0 ; ; The file was modified from the overlay file for UNARC version 1.6, which ; is copyright (C) 1987 by Robert A. Freed. All rights reserved. ; ; This file may be used to customize the UNARCZ 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 UNARCZ version indicated above. ; ; The distributed program files are suitable for the majority of users ; with standard ZCPR3 or Z3PLUS operating environments. ; ;======================================================================= ; ; To use, simply follow these three steps: ; ; 1) Edit this UNARCZOV.ASM file for desired options. ; 2) Assemble to create an UNARCZOV.HEX file. ; 3) Merge with the distributed UNARCZ.COM program file. ; ; ASM, the assembler supplied with CP/M 2.2, or MAC, the assembler supplied ; with CP/M Plus, may be used for assembly. Likewise, DDT or SID 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 UNARCZ.COM,UNARCZOV ; ;======================================================================= ; NO EQU 0 YES EQU NOT NO ; ; Most UNARCZ 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 ; ; RCPM -- Define RCPM = YES to generate a restricted version of UNARCZ 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 number of lines (see TYLIM), and the default interpretation of ; certain other parameters is modified (see TYPGS and BLKSZ). ; ; WHEEL -- As of UNARCZ 1.7, the WHEEL byte is always checked. The address ; of the wheel byte is obtained from the Environment Descriptor. It is no ; longer necessary to configure UNARCZ to check the wheel byte or to patch in ; the address. ; ; USEWHL EQU YES ; YES to use wheel byte ; WHEEL EQU 003EH ; Wheel byte address ; ; If the wheel byte is reset (0) the same version of UNARCZ may be utilized ; for restricted use by remote callers as is used by the sysop when the ; wheel byte is set. Subsequent references to the "restricted" version of ; UNARCZ below apply only when the wheel byte is zero; when the wheel byte ; is set, operation of UNARCZ is identical to that obtained by defining ; defining RCPM = NO above. ; ; 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) ; ; TYFLG and TYLIM -- Define TYFLG = NO to disallow file typeout operations on ; RCP/M systems. In this case, UNARCZ 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) ; ; CCPSV -- UNARCZ 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 CPR area at the top of the TPA, and ; it returns directly to the CPR 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 CPR size in standard ZCPR3 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 on systems with very small ; TPA's, but it may be desirable with CP/M 3.0, XBIOS on the SB180, or with ; any system with a permanently-resident CPR. Some non-standard systems ; may require may require the CCPSV = 9, etc. ; TYPGS EQU 0 ; No. buffer pages for typeout (0=max) ; ; TYPGS -- 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). The TYPGS definition may ; be overridden by the USELUX equate following: ; USELUX EQU NO ; *YES if UNARCZ will be used by LUX ; ; USELUX -- Some versions of the LUX library/archive utility program fail to ; properly protect the resident code which LUX relocates to high memory before ; calling UNARCZ. This may be due to a problem of interaction between LUX and ; the BYE5 RCP/M monitor program. The result can be 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. Versions of UNARCZ 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 environ- ; ments and encouraging LUX users to upgrade to newer releases of UNARCZ as ; they become available. ; BLKSZ EQU 0 ; Default disk allocation block size (in K) ; ; BLKSZ -- 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 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-compatible 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 not supported ; ; CPM68K -- UNARCZ 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 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). (This option probably ; had no application on ZCPR3 systems.) ; HIDRV EQU 'P'-'@' ; Highest input file drive (A=1, B=2, ...) ; ; HIDRV -- Specifies the highest accessible drive for archive file input, ; where drive A is 1, drive B is 2, etc. The default definition of 16 ; ('P'-'@') is the maximum supported by CP/M-compatible systems. Most RCP/M ; systems need not alter this definition, 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 drives are available in sequence from drive A). Setting HIDRV = 0 ; restricts input to the default drive (i.e., disallows specification of a ; drive for the archive file). ; HIUSR EQU 15 ; Highest input user area (1..31 or 0) ; ; HIUSR -- Specifies the highest accessible user area for archive file input. ; The default is 15, but it may be set as high as 31. HIUSR = 0 does not ; make users 1-31 inaccessible, it merely restricts the archive file to the ; currently logged user area. This feature is primarily for RCP/M's, which ; will restrict access to specific user areas by other methods. ; HODRV EQU 'P'-'@' ; Highest file output drive ; ; HODRV -- Specifies the highest allowable output drive no. for file extrac- ; tion (similar to HIDRV above). Setting HODRV = 0 will disallow any file ; extraction to disk, which is the obvious setting of importance for RCP/M ; systems. Restricted versions restrict file output anyway, when the WHEEL ; byte is zero, so this value need not be modified, except for local use, ; if RCPM = YES above. ; HOUSR EQU 15 ; Highest file output user ; ; HOUSR -- Specifies the highest accessible user area for archive member file ; extraction and works just like HIUSR. The default is 15, but it may be set ; as high as 31. HOUSR = 0 does not make users 1-31 inaccessible, it merely ; restricts the archive file to the currently logged user area. This feature ; is primarily for RCP/M's, which will restrict access to specific user areas ; by other methods. ; TYLPS EQU 23 ; Number of screen lines before pause (1-255) ; ; TYLPS -- Specifies the number of lines between automatic pauses during ; 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" option on the UNARCZ command line. ; BELLS EQU YES ; NO to inhibit bell on error ; ; BELLS -- By default (BELLS = YES), the terminal "bell" (i.e., beeper) is ; sounded as warning and fatal error messages are printer, 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 108H ; DB CCPSV ; 10BH DB BLKSZ ; 10CH DB HIDRV ; 10DH DB HIUSR ; 10EH DB HODRV ; 10FH DB HOUSR ; 110H ; DB TYFLG AND 0FFH ; 111H ; IF NOT USELUX DB TYPGS ; 112H ENDIF IF USELUX DB 1 ; 112H ENDIF ; DB TYLIM ; 113H ; DB TYLPS ; 114H ; IF NOT CPM68K DB 0 ; 115H ENDIF IF CPM68K AND BLKSZ DB BLKSZ ; 115H ENDIF IF CPM68K AND NOT BLKSZ DB 1 ; 115H ENDIF ; DB BELLS AND 0FFH ; 116H ; ;======================================================================= ; (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 117H 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 file ; types without replacing it, simply set the MSB in any byte (as above for ; CMD, since that can be a readable ALIAS script file or dBASE command file). ; DB 0,0,0 144H DB 0,0,0 DB 0,0,0 DB 0,0,0 DB 0,0,0 DB 0 ; End of table (do not change) 153H ; ; 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 'UNARCZ' ; Author's preference 154H ; DB 'ADIR ' ; (But some sysops may prefer this) ; ; If you prefer to call this program "ADIR" (Archive Directory), move the ";" ; up one line above. ; ;======================================================================= ; LAST EQU $-1 ; 160H Last patch address ; ; Confirm that the symbol LAST has the value 160H, which is the highest ; program location which may be modified in UNARCZ.COM. ; END