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 / CPM / RCPM / LUXI80.LBR / UNARCOVL.AZM / UNARCOVL.ASM
Assembly Source File  |  2000-06-30  |  14KB  |  318 lines

  1. ; UNARCOVL.ASM
  2. ;
  3. ; Overlay File for UNARC
  4. ; CP/M Archive File Extractor
  5. ; Version 1.6  27 Mar 87
  6. ;
  7. ; Copyright (C) 1987 by Robert A. Freed
  8. ; All Rights Reserved
  9. ;
  10. ; This file may be used to customize the UNARC utility for specific
  11. ; non-universal requirements.  It is intended primarily for RCP/M
  12. ; system operators or technically-oriented users with specialized
  13. ; system requirements.  Use only with the UNARC program version
  14. ; indicated above.
  15. ;
  16. ; NOTE:  This file is intended for individual, private use only!
  17. ; Please DO NOT re-distribute versions of the UNARC.COM (Z80) or
  18. ; UNARCA.COM (8080/8085) program files which have been modified by use
  19. ; of this overlay (except as noted for the USELUX definition below).
  20. ; The distributed program files are suitable for the majority of users
  21. ; with standard CP/M 2.2 or CP/M 3.0 (CP/M Plus) operating environments.
  22. ;
  23. ;=======================================================================
  24. ;
  25. ; To use, simply follow these three steps:
  26. ;
  27. ; 1) Edit this UNARCOVL.ASM file for desired options.
  28. ; 2) Assemble to create an UNARCOVL.HEX file.
  29. ; 3) Merge with the distributed UNARC.COM or UNARCA.COM program files.
  30. ;
  31. ; The ASM.COM assembler supplied with CP/M 2.2 may be used for assembly.
  32. ; DDT.COM or SID.COM may be used for the final step (if you save the
  33. ; correct number of memory pages), but the publicly-distributed program
  34. ; MLOAD.COM (by Ron Fowler, Nightowl Software, Inc.) is recommended:
  35. ;
  36. ;    A>MLOAD UNARC.COM,UNARCOVL    (for the Z80-only version)
  37. ;    A>MLOAD UNARCA.COM,UNARCOVL    (for the 8080/8085 version)
  38. ;
  39. ;=======================================================================
  40. ;
  41. NO    EQU    0
  42. YES    EQU    NOT NO
  43. ;
  44. ; Most UNARC program options are specified by EQUate statements below.
  45. ; Each option is followed by a detailed description of its function.
  46. ; Most of these options are provided for RCP/M systems, and those most
  47. ; commonly changed are marked with an asterisk '*' in the comment field.
  48. ; (The other option defaults are suitable for the majority of systems.)
  49. ;
  50. RCPM    EQU    YES        ;*YES if remote CP/M system
  51. ;
  52. ; Define RCPM = YES to generate a restricted version of UNARC for secure
  53. ; use by callers of an RCP/M remote access system.  "Restricted" implies
  54. ; that no disk file extraction can be performed.  Also, the P (print)
  55. ; and C (check archive) command line options are ignored.  In addition,
  56. ; file typeout may be disallowed (see TYFLG) or limited to a maximum no.
  57. ; of lines (see TYLIM), and the default interpretation of certain other
  58. ; parameters is modified (see TYPGS and BLKSZ).
  59. ;
  60. ; The following two definitions apply only if RCPM = YES:
  61. ;
  62. USEWHL    EQU    yes        ; YES if RCP/M uses a wheel byte
  63. WHEEL    EQU    003EH        ;*Wheel byte address if USEWHL is YES
  64. ;
  65. ; Most RCP/M systems utilize a "wheel" byte in memory, to restrict
  66. ; access to privileged functions by remote callers and to provide
  67. ; greater flexibility for the sysop.  If such a byte is implemented
  68. ; (USEWHL = YES), a single version of UNARC may be utilized both for
  69. ; restricted use by remote callers (wheel byte zero) and unrestricted
  70. ; local use by the sysop (wheel byte non-zero).  Define WHEEL with the
  71. ; address of the wheel byte location in external memory.  (ZCPR3 users
  72. ; should specify the address of their Z3WHL byte, as determined by
  73. ; running SHOW.COM).  Note that all subsequent references to the
  74. ; "restricted" version of UNARC apply only when the wheel byte is zero;
  75. ; when the wheel byte is set, operation of UNARC is identical to that
  76. ; obtained by defining RCPM = NO.  For those few RCP/M systems which do
  77. ; not implement a wheel byte (USEWHL = NO), it will be necessary to
  78. ; maintain separate versions of UNARC for remote callers (RCPM = YES)
  79. ; and local sysop use (RCPM = NO).
  80. ;
  81. ; The following two definitions apply only in restricted versions:
  82. ;
  83. TYFLG    EQU    YES        ; NO to disallow RCP/M file typeout
  84. TYLIM    EQU    0        ;*Non-zero typeout line limit (1-255)
  85. ;
  86. ; Define TYFLG = NO to disallow file typeout operations on RCP/M
  87. ; systems.  In this case, UNARC may be used only to obtain directory
  88. ; listings of archive files.  (In which case, it may be more appropriate
  89. ; to rename the program 'ADIR' -- see program name patch at end of this
  90. ; file.)  If TYFLG = YES (the normal case), TYLIM may be defined as the
  91. ; non-zero limit (255 maximum) of the number of file lines which may be
  92. ; displayed.  This may be desired by some RCP/M sysops to discourage
  93. ; excess on-line "browsing" in favor of downloading of long files by
  94. ; callers.  If TYLIM = 0, unlimited file typeout is permitted as in
  95. ; unrestricted versions.
  96. ;
  97. CCPSV    EQU    8        ; No. high memory pages to save (8 = 2K)
  98. ;
  99. ; UNARC uses all available TPA space for buffering output files, which
  100. ; provides better performance in systems with larger memories.  However,
  101. ; by default the program preserves the (CP/M 2.2) CCP area at the top of
  102. ; the TPA, and it returns directly to the CCP instead of forcing a warm
  103. ; boot after execution.  CCPSV specifies the amount of memory (256-byte
  104. ; pages) to reserve for this purpose.  The default value (CCPSV = 8) is
  105. ; appropriate for the CCP size in standard CP/M 2.2 systems.  Setting
  106. ; CCPSV = 0 will yield an additional 2K bytes of buffer space, but it
  107. ; forces a warm boot return after each program execution.  This need be
  108. ; used only with very small CP/M 2.2 systems (but may be desirable with
  109. ; CP/M 3.0 or any non-standard system with a permanently-resident CCP).
  110. ; Certain non-standard CP/M implementations (TRS-80?) may require the
  111. ; definition CCPSV = 9.
  112. ;
  113. TYPGS    EQU    1        ; No. buffer pages for typeout (0=max)
  114. ;
  115. ; This value specifies the number of (256-byte) pages to buffer an
  116. ; extracted file during typeout operations.  The default definition
  117. ; (TYPGS = 0) provides the maximum possible buffering (the entire TPA
  118. ; space), but may cause a long delay at the start (and in the middle)
  119. ; of typeout of large files.  Defining TYPGS = 1 will minimize viewing
  120. ; waits, but may cause excessive start/stop of floppy disk drive motors
  121. ; on some systems (e.g. 1983 Kaypro models).  Since this is not a
  122. ; consideration for systems with hard disks, users of such systems may
  123. ; prefer TYPGS = 1.  For restricted RCP/M versions, TYPGS = 1 is assumed
  124. ; if the default (TYPGS = 0) is not changed (to minimize delays for
  125. ; remote users).
  126. ;
  127. ; Note that the TYPGS definition may be overridden by the following:
  128. ;
  129. USELUX    EQU    YES        ;*YES if UNARC will be used by LUX
  130. ;
  131. ; Some versions of the LUX library/archive utility program fail to
  132. ; properly protect the resident code which LUX relocates to high memory
  133. ; before calling UNARC.  (This may be due to a problem of interaction
  134. ; between LUX and the BYE5 RCP/M monitor program.)  This can result in
  135. ; a system crash during typeout of an archive member file with the LUX
  136. ; TYPE command.  Define USELUX = YES to avoid this problem.  This forces
  137. ; the minimum TPA buffering during file typeout (equivalent to defining
  138. ; TYPGS = 1), in both restricted and unrestricted versions.  [Note that
  139. ; earlier versions of this overlay file solved this problem by altering
  140. ; the CCPSV definition.  Unfortunately, that method depended upon the
  141. ; size of the LUX resident code, which is complicated by the recent
  142. ; introduction of different LUX releases by separate authors.  This new
  143. ; method provides independence from the requirements of any particular
  144. ; version of LUX.  Versions of UNARC which have been modified by this
  145. ; definition may be distributed with LUX, providing notice is given
  146. ; explaining that this modification may not be suitable for non-LUX
  147. ; environments and encouraging LUX users to upgrade to newer releases of
  148. ; UNARC as they become available.]
  149. ;
  150. BLKSZ    EQU    0        ; Default disk allocation block size (K)
  151. ;
  152. ; This value provides the default disk allocation block size (as a
  153. ; multiple of 1K bytes) to use in calculating disk space requirements
  154. ; for the "Disk" column of archive directory listings (except during
  155. ; file extraction to disk, in which case the output drive's block size
  156. ; applies.)  The default definition (BLKSZ = 0) indicates that the
  157. ; block size of the default (CCP) drive is to be used for this purpose.
  158. ; However, for restricted RCP/M versions, BLKSZ = 1 is assumed if the
  159. ; default is not changed.  (Since 1K is the minimum disk block size in
  160. ; any CP/M system, this provides the widest applicability for all remote
  161. ; callers, independent of the RCP/M system's actual disk block size.)
  162. ;
  163. CPM68K    EQU    NO        ; YES if BDOS function 31 unsupported
  164. ;
  165. ; UNARC uses BDOS function 31 (Get Address of Disk Parameter Block) to
  166. ; determine disk allocation block size (i.e. of the output drive when
  167. ; extracting files to disk, or of the default CCP drive at other times
  168. ; if BLKSZ = 0).  However, this function is rarely used by application
  169. ; programs and is not supported by some non-standard implementations of
  170. ; CP/M (in particular, the 8080 CP/M 2.2 emulator for CP/M-68K).  For
  171. ; such systems, define CPM68K = YES to inhibit use of BDOS function 31.
  172. ; In this case, the BLKSZ value will be assumed (1K, if BLKSZ = 0).
  173. ;
  174. HIDRV    EQU    16        ; Highest input file drive (A=1,B=2,...)
  175. ;
  176. ; Specifies the highest allowable drive no. for archive files, where
  177. ; drive A is 1, drive B is 2, etc.  The default definition (HIDRV = 16)
  178. ; is the maximum supported by CP/M.  Most RCP/M systems need not alter
  179. ; this definition, since invalid drive accesses are normally intercepted
  180. ; elsewhere.  If this is not the case, this value should be set to the
  181. ; number of available drives (assuming all sequential drives available,
  182. ; starting with drive A).  Setting HIDRV = 0 restricts input to the
  183. ; default drive (i.e. disallows specification of a drive name for the
  184. ; archive file).
  185. ;
  186. HODRV    EQU    16        ; Highest output file drive no.
  187. ;
  188. ; Specifies the highest allowable output drive no. for file extraction
  189. ; operations (specified as for HIDRV above).  Setting HODRV = 0 will
  190. ; disallow any file extraction to disk (which is the obvious setting of
  191. ; importance for RCP/M systems).  However, this is assumed in restricted
  192. ; versions, so this value need not be modified (except for local sysop
  193. ; use) if RCPM = YES.
  194. ;
  195. TYLPS    EQU    23        ; No. typeout lines per screen (1-255)
  196. ;
  197. ; Specifies the number of lines between automatic pauses in console
  198. ; typeout.  Should be set to one less than the number of display screen
  199. ; lines, to allow for the '[more]' message line.  Setting TYLPS = 0 will
  200. ; inhibit all pauses (e.g. for hard-copy terminals), although this can
  201. ; also be specified by a trailing 'N' on the UNARC command line.
  202. ;
  203. BELLS    EQU    YES        ; NO to inhibit error message bells
  204. ;
  205. ; By default (BELLS = YES), the terminal 'bell' (i.e. beeper) is sounded
  206. ; in all warning and fatal error messages, to bring operator attention
  207. ; to unusual conditions.  Define BELLS = NO if you prefer solitude.
  208. ;
  209. ;                    (End of user-definable EQUates)
  210. ;=======================================================================
  211. ;                      (Start of program patches)
  212. ;
  213. ; Do not make any changes to this section.  Additional user-definable
  214. ; options continue below the next double separator line.
  215. ;
  216.     ORG    103H
  217. ;
  218.     DB    CCPSV        ; 103H
  219.     DB    BLKSZ        ; 104H
  220.     DB    HIDRV        ; 105H
  221. ;
  222.      IF USEWHL OR NOT RCPM
  223. PSWHL:    DB    HODRV        ; 106H    Pseudo wheel byte if not RCP/M
  224.      ENDIF
  225.      IF RCPM AND NOT USEWHL
  226. PSWHL:    DB    0        ; 106H    Pseudo wheel byte if weird RCP/M
  227.      ENDIF
  228. ;
  229.     DB    TYFLG AND 0FFH    ; 107H
  230. ;
  231.      IF NOT USELUX
  232.     DB    TYPGS        ; 108H
  233.      ENDIF
  234.      IF USELUX
  235.     DB    1        ; 108H
  236.      ENDIF
  237. ;
  238.     DB    TYLIM        ; 109H
  239. ;
  240.      IF RCPM AND USEWHL
  241.     DW    WHEEL        ; 10AH
  242.      ENDIF
  243.      IF NOT RCPM OR NOT USEWHL
  244.     DW    PSWHL        ; 10AH
  245.      ENDIF
  246. ;
  247.     DB    TYLPS        ; 10CH
  248. ;
  249.      IF NOT CPM68K
  250.     DB    0        ; 10DH
  251.      ENDIF
  252.      IF CPM68K AND BLKSZ
  253.     DB    BLKSZ        ; 10DH
  254.      ENDIF
  255.      IF CPM68K AND NOT BLKSZ
  256.     DB    1        ; 10DH
  257.      ENDIF
  258. ;
  259.     DB    BELLS AND 0FFH    ; 10EH
  260. ;
  261. ;=======================================================================
  262. ;          (Additional user-definable patches continue here)
  263. ;
  264. ; The following is a table of filetypes (3-byte ASCII strings) which are
  265. ; assumed to contain binary data and are not allowed for file typeout.
  266. ; Question marks may be used as wildcards (will match any character).
  267. ; The table must terminate with a zero byte (room for 20 entries total).
  268. ;
  269.     DB    'COM'        ; CP/M-80 or MS-DOS binary object
  270.     DB    'CM','D'+80H    ; CP/M-86 binary object (or dBASE file)
  271.     DB    'EXE'        ; MS-DOS executable
  272.     DB    'OBJ'        ; Renamed COM
  273.     DB    'OV?'        ; Binary overlay
  274.     DB    'REL'        ; Relocatable object
  275.     DB    '?RL'        ; Other relocatables (PRL, CRL, etc.)
  276.     DB    'INT'        ; Intermediate compiler code
  277.     DB    'SYS'        ; System file
  278.     DB    'BAD'        ; Bad disk block
  279.     DB    'LBR'        ; Library
  280.     DB    'ARC'        ; Archive (unlikely in an ARC)
  281.     DB    'ARK'        ; Alternate archive (ditto)
  282.     DB    '?Q?'        ; Any SQueezed file (ditto)
  283.     DB    '?Z?'        ; Any CRUNCHed (or ZOO'd) file (ditto)
  284. ;
  285. ; Additional filetypes may be added below.  To remove one of the above
  286. ; filetypes without replacing it, simply set the msb in any byte (as
  287. ; above for .CMD, since that can be a readable dBASE command file).
  288. ;
  289.     DB    0,0,0
  290.     DB    0,0,0
  291.     DB    0,0,0
  292.     DB    0,0,0
  293.     DB    0,0,0
  294.     DB    0        ; 14BH    End of table (do not change)
  295. ;
  296. ;-----------------------------------------------------------------------
  297. ;
  298. ; The following 6 bytes specify the program name for self-referential
  299. ; use in the help display and abort message.  If less than 6 name
  300. ; characters are desired, the remaining bytes must be padded with
  301. ; blanks.
  302. ;
  303.     DB    'UNARC '    ; 14CH    Author's preference, of course
  304. ;;;    DB    'ADIR  '    ; 14CH    (But some sysops prefer this)
  305. ;
  306. ; Note:  If you prefer to call this program 'ADIR' (Archive Directory),
  307. ; move the ';;;' up one line above.  (We won't object too much, since
  308. ; we plan to release a program of that name in the near future.)
  309. ;
  310. ;=======================================================================
  311. ;
  312. LAST    EQU    $-1        ; 151H    Last patch address
  313. ;
  314. ; Confirm that the symbol LAST has the value 151H, which is the highest
  315. ; program location which may be modified in UNARC.COM or UNARCA.COM!
  316. ;
  317.     END
  318.