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 / LUX80.ARK / UNARCOVL.ASM < prev    next >
Assembly Source File  |  1987-03-04  |  13KB  |  308 lines

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