home *** CD-ROM | disk | FTP | other *** search
/ Brotikasten / BROTCD01.iso / exoten / msx / arkunarc.pma / UNARC11.DIF < prev    next >
Text File  |  1993-10-27  |  6KB  |  181 lines

  1. <---- UNARC10.Z80
  2. ----> UNARC11.Z80
  3. 4c4
  4. <     DB    'UNARC  1.0  03 May 86'
  5. -----
  6. >     DB    'UNARC  1.1  24 May 86'
  7. 58a59,74
  8. > 1.1    24 May 86  (RAF)
  9. > Minor change to allow file typeout without the "T:" syntax (which 
  10. > didn't work with almost ANY CCP replacement)...  File will be typed if 
  11. > it:  (1) has no disk drive name, (2) is a single (UNambiguous) file, 
  12. > and (3) is not an excluded filetype.  (Else, file will simply be listed 
  13. > with no error message.)  This change was suggested by Irv Hoff's mod to 
  14. > UNARC10, which he called ADIR.  (Previous "T:" method can still be 
  15. > enabled, but it is now undocumented since we will probably drop it 
  16. > altogether in future.)
  17. > Also shortened on-line help message, so that COM file size is now 
  18. > reduced to 4K.  (For RCPM systems, if HODRV = 0 and/or TYDRV = 0, the 
  19. > help information relating to disk extraction and/or file typeout, 
  20. > respectively, is automatically removed.)
  21. 63a80,83
  22. > \
  23. >     PAGE
  24. >     .COMMENT \
  25. 202,206c222
  26. < ; Note:    If following is changed, also change two occurrences of "T:"
  27. < ;    in usage message which follows.
  28. < TYDRV:    DB    'T'-'@'        ; Typeout "drive" (ok with CP/M 2.2 CCP)
  29. < ;TYDRV:    DB    'P'-'@'        ; E.g. if (non-std) CCP won't parse T:
  30. -----
  31. > TYDRV:    DB    0FFH        ; This enables single file typeout
  32. 208a225,233
  33. > ; Note:    Following for compatibility with UNARC 1.0.  This will work with
  34. > ;    the standard CCP in CP/M 2.2, but with virtually NO other CCP
  35. > ;    replacement in common usage (e.g. DEC Rainbow CP/M-86/80, ZCMD,
  36. > ;    ZCPR).  Use of a pseudo typeout "drive" is no longer necessary,
  37. > ;    and its use is discouraged.
  38. > ;TYDRV:    DB    'T'-'@'        ; Typeout "drive" (ok with CP/M 2.2 CCP)
  39. > ;TYDRV:    DB    'P'-'@'        ; E.g. if (non-std) CCP won't parse T:
  40. 248,273c273,306
  41. < USAGE:
  42. <     IDENT            ; Program version identification first
  43. < DB CR,LF,'Archive File Extractor for Z80 CP/M Systems'
  44. < DB CR
  45. < DB LF,LF,'Usage:  UNARC arcfile [d:][afn]'
  46. < DB CR
  47. < DB LF,LF,'First parameter (required) specifies an archive file (default'
  48. < DB CR,LF,'filetype .'
  49. < ARCTYP:    DB         'ARC).  Second parameter (optional) specifies the'
  50. < DB CR,LF,'output drive and/or selects the component file(s) to process.'
  51. < DB CR,LF,'The file selection [afn] may be ambiguous (defaults to *.*).'
  52. < DB CR,LF,'Drive [d:] must be specified to extract files, else only the'
  53. < DB CR,LF,'directory listing is displayed.  Use the pseudo drive T: to'
  54. < DB CR,LF,'typeout a single (non-ambiguous) file at the console instead'
  55. < DB CR,LF,'of extracting to disk.  For example:'
  56. < DB CR
  57. < DB LF,LF,'  A>UNARC A:SAVE.ARC *.*     ; List all files in A:SAVE.ARC'
  58. < DB CR,LF,'  A>UNARC SAVE               ; Same as above'
  59. < DB CR,LF,'  A>UNARC SAVE A:            ; Extract all files to drive A'
  60. < DB CR,LF,'  A>UNARC SAVE B:*.DOC       ; Extract .DOC files to drive B'
  61. < DB CR,LF,'  A>UNARC SAVE T:READ.ME     ; Typeout the file READ.ME'
  62. < DB CR
  63. < DB LF,LF
  64. -----
  65. > USAGE:    IDENT            ; Program version identification first
  66. >     DB    CR,LF
  67. >     DB    'Archive File Extractor for Z80 CP/M Systems',CR,LF,LF
  68. >     DB    'Usage:',HT,'UNARC arcfile '
  69. > USE1:    DB    '[d:]'
  70. > USE1L    EQU    $-USE1        ; Above cleared if HODRV = 0
  71. >     DB    '[afn]',CR,LF,LF
  72. >     DB    'Examples:',CR,LF,LF
  73. >     DB    'B>UNARC A:SAVE.'
  74. > ARCTYP:    DB    'ARC'        ; Default filetype for archive files
  75. >     DB    ' *.*',HT
  76. >     DB    '; List all files in archive SAVE on drive A',CR,LF
  77. >     DB    'A>UNARC SAVE',HT,HT
  78. >     DB    '; Same as above',CR,LF
  79. >     DB    'A>UNARC SAVE *.DOC',HT
  80. >     DB    '; List just .DOC files',CR,LF
  81. > USE2:    DB    'A>UNARC SAVE READ.ME',HT
  82. >     DB    '; Typeout the file READ.ME',CR,LF
  83. > USE2L    EQU    $-USE2        ; Above cleared if TYDRV = 0
  84. > USE3:    DB    'A>UNARC SAVE A:',HT,HT
  85. >     DB    '; Extract all files to drive A',CR,LF
  86. >     DB    'A>UNARC SAVE B:*.DOC',HT
  87. >     DB    '; Extract .DOC files to drive B',CR,LF
  88. >     DB    'A>UNARC SAVE C:READ.ME',HT
  89. >     DB    '; Extract file READ.ME to drive C',CR,LF
  90. > USE3L    EQU    $-USE3        ; Above cleared if HODRV = 0
  91. >     DB    LF
  92. 438,439c471
  93. <     LD    DE,USAGE    ; No, just print usage message
  94. <     JR    Z,PEXIT        ;  and exit
  95. -----
  96. >     JR    Z,HELP        ; No, go show on-line help
  97. 455d486
  98. <     PAGE
  99. 461a493,495
  100. >     PAGE
  101. > ; Open archive file
  102. 492a527,546
  103. > ; Display program usage help message
  104. > HELP:    LD    A,(HODRV)    ; File extraction allowed?
  105. >     OR    A
  106. >     LD    HL,USE1
  107. >     LD    BC,256*USE1L+80H
  108. >     CALL    Z,FILL        ; No, clear out usage examples
  109. >     LD    HL,USE3
  110. >     LD    B,USE3L
  111. >     CALL    Z,FILL        ; (Two places)
  112. >     LD    A,(TYDRV)    ; File typeout allowed?
  113. >     OR    A
  114. >     LD    HL,USE2
  115. >     LD    B,USE2L
  116. >     CALL    Z,FILL        ; No, clear out usage example
  117. >     LD    DE,USAGE    ; Just print usage message
  118. >     JP    PEXIT        ;  and exit
  119. 763,769c817,824
  120. < OUTSET:    LD    A,(OFCB)    ; Any output drive?
  121. <     OR    A
  122. <     RET    Z        ; No, return
  123. <     LD    HL,TYDRV    ; Is it the pseudo drive for
  124. <     CP    (HL)        ;  typing files?
  125. <     JR    Z,CKTYP        ; Yes, skip to check file name
  126. -----
  127. > OUTSET:    LD    DE,OFCB        ; Point to output drive
  128. >     LD    HL,TYDRV    ; Point to typeout flag (or "drive")
  129. >     LD    A,(DE)        ; Any output drive?
  130. >     OR    A
  131. >     JR    Z,CKTYP        ; No, go see if filename permits typeout
  132. >     CP    (HL)        ; But is it the pseudo typeout drive?
  133. >     JR    Z,CKTYP0    ; Yes, skip to type file (if permitted)
  134. 847c902,904
  135. < CKTYP:    CALL    TAMBIG        ; Ambiguous output file name?
  136. -----
  137. > CKTYP:    LDI            ; Assume typeout allowed (TYDRV -> OFCB)
  138. > CKTYP0:    CALL    TAMBIG        ; Ambiguous output file name?
  139. 872,873c929,931
  140. < CKTYP5:    LD    DE,BADTYP    ; All matched (or ambiguous name),
  141. <     JP    PABORT        ; Abort due to invalid name for typeout
  142. -----
  143. > CKTYP5:    XOR    A        ; All matched (or ambiguous name),
  144. >     LD    (OFCB),A    ;  disable typeout of file
  145. >     RET            ; Return (will just list file)
  146. 1056c1114
  147. < the archive header, or a tree link to the root node (which indicates a 
  148. -----
  149. > the archive header), or a tree link to the root node (which indicates a 
  150. 2199c2257
  151. <     CALL    PCHAR
  152. -----
  153. >     CALL    P,PCHAR        ; (But ignore chars with MSB set)
  154. 2703d2760
  155. < BADTYP:    DB    'Invalid file name for typeout',0
  156.