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 / ENTERPRS / CPM / UTILS / S / V.LBR / V.DOC < prev   
Text File  |  1986-04-03  |  7KB  |  266 lines

  1. v.doc    vers. 0.6   4/12/90    Bridger Mitchell (Plu*Perfect Systems)
  2.  
  3.     V -- quad-directional Z-System file viewer
  4.  
  5.  
  6. V now supports multiple files, with usage:
  7.  
  8.     V filespec1 ... filespecN
  9.  
  10. A filespec is an ambiguous filename and type, preceded by an optional
  11. DU: or DIR: specification.  Some valid filespecs are:
  12.  
  13.     *.DOC
  14.     WORK:MENU??.TXT
  15.     A15:*.*
  16.     FOO.BAR
  17.     
  18. V maintains a ring of all matching files.  ^X will move to the
  19. next file; ^R moves back to the previous file.  ^C exits the
  20. program. Because the ring is virtual, V should work on any size
  21. disk, regardless of the number of directory entries.  (These and all
  22. other control commands may be rebound; see below).
  23.  
  24. A list of excluded filespecs is tested; files such as COM, REL, LBR,
  25. !!!TIME&.DAT, etc. will be skipped automatically.  You can extend this
  26. table by patching near the start of V.   
  27.  
  28. V uses an in-memory cache to make the most recently read sectors
  29. of a file available for re-viewing without additional disk reads.
  30. This allows  reverse viewing of crunched files, up to the limit
  31. of available memory.  If, when going in reverse, the cache is
  32. exhausted, V will automatically restart the uncrunching process
  33. from the beginning of the file and display the first lines.
  34.  
  35. Viewing of adjacent lines/screens is rapid for both ascii and
  36. crunched files.  Going to the End is also quick in ascii, but
  37. results in some delay uncrunching a large file -- the entire
  38. file must be uncrunched first.
  39.  
  40.  
  41.               TERMCAP requirements
  42.  
  43. The termcap requirement is the addition of three strings to the
  44. standard Z-System termcap.  These definitions are already setup
  45. in files of type ".NZT" (New Z-System Termcap), available on
  46. major Z-Nodes.  If your terminal isn't already there, you can add
  47. definitions following the initialization and deinitialization
  48. strings.
  49.  
  50. NOTE:  This uses the STANDARD termcap specification (not the
  51. one in experimental use in early 1989 by J. W. Wright).
  52.  
  53. Here's an example for the Wyse-50.
  54.  
  55.     DEFB    'TERMINALNAME'    ; 13 bytes
  56.     db    0        ; reserved
  57.  
  58.     [ ... next part of termcap omitted...]
  59.  
  60.     DEFB    ESC,')',0    ; SO - Standout on string
  61.     DEFB    ESC,'(',0    ; SE - Standout end string
  62.     DEFB    0        ; TI - Terminal init string
  63.     DEFB    0        ; TE - Terminal de-init string
  64. ;
  65. ; 3 extensions to standard TCAP follow immediately after "TE"
  66. ;
  67.     DEFB    ESC,'R',0    ; DL - Line Delete
  68.     DEFB    ESC,'E',0    ; IL - Line Insert
  69.     DEFB    ESC,'Y',0    ; CD - Clear to End of Screen String
  70. ;
  71. ; ... the rest of the termcap ...
  72.  
  73.  
  74.               CONFIGURATION
  75.  
  76. You can change the keys that control V by assembling a modified
  77. version of the code below and 
  78.  
  79. ;
  80. ; offsets from 100h for configuration areas
  81. ;
  82. CONFIGBUF    equ    20h
  83. HELPBUF        equ    80h
  84. EXCLUDEBUF    equ    200h
  85.  
  86. SPACE    equ    20h
  87. TAB    equ    09h
  88. CR    equ    0dh
  89. LF    equ    0ah
  90.  
  91. ; 1. These are the bindings that control the V screen.  In addition
  92. ; to the one to three keys for each command, V automatically
  93. ; picks up the cursor-control keys ("arrow" keys) from the
  94. ; Z-System tcap and uses them, in addition to the bindings in
  95. ; these tables.
  96. ;
  97. ; 2.  To change the bindings, set the equates for your preferences,
  98. ; reassemble this file to HEX, and overlay onto V.COM.  
  99. ;
  100. ; 3. Enter exactly 3 bytes for each binding. Use uppercase for all
  101. ; keys.  V automatically converts a  typed lower case key to upper case.
  102. ; Use a nul to indicate the absence of a binding.
  103. ;
  104. ; 4. Edit the help screen to match your choice of bindings.
  105. ;
  106. K_up1    equ    ','
  107. K_up2    equ    'P'-'@'    
  108. K_up3    equ    0
  109. ; and, automatically, Z3TCP's left arrow key
  110. ;
  111. k_pgup1    equ    '<'
  112. K_pgup2    equ    TAB
  113. K_pgup3    equ    'Z'-'@'
  114. ; and, automatically, Z3TCP's left arrow key
  115.  
  116. K_dn1    equ    '.'
  117. K_dn2    equ    SPACE
  118. K_dn3    equ    'N'-'@'
  119. ; and, automatically, Z3TCP's up arrow key
  120.  
  121. K_pgdn1    equ    '>'
  122. K_pgdn2    equ    CR
  123. K_pgdn3    equ    'V'-'@'
  124. ; and, automatically, Z3TCP's down arrow key
  125. ;
  126. K_left1    equ    'L'
  127. K_left2    equ    'A'-'@'
  128. K_left3    equ    0
  129. ;
  130. K_rt1 equ    'R'
  131. K_rt2 equ    'E'-'@'
  132. K_rt3 equ    0
  133. ;
  134. K_beg1    equ    'B'
  135. K_beg2    equ    0
  136. K_beg3    equ    0
  137. ;
  138. K_end1    equ    'E'
  139. K_end2    equ    0
  140. K_end3    equ    0
  141. ;
  142. K_goto1    equ    'G'
  143. K_goto2    equ    'S'
  144. K_goto3    equ    0
  145. ;
  146. K_nxtf1    equ    'X'-'@'
  147. K_nxtf2    equ    0
  148. K_nxtf3    equ    0
  149. ;
  150. K_prvf1    equ    'R'-'@'
  151. K_prvf2    equ    0
  152. K_prvf3    equ    0
  153. ;
  154. K_exit1    equ    'C'-'@'
  155. K_exit2    equ    0
  156. K_exit3    equ    0
  157. ;
  158. ;
  159. subttl    '---------- KEY BINDINGS ----------'
  160. ;
  161. ; Each V function has three possible key values.
  162. ; V ignores case.
  163. ; If you use fewer than three keys, use nulls for the remainder.
  164. ;
  165. ;;    org    CONFIGBUF
  166. ;
  167. beginconfig:
  168. ;
  169.     db '__UP:'    
  170. k.up:    db    K_up1,K_up2,K_up3    ; Scroll one line up    
  171. ;
  172.     db 'PGUP:'
  173. k.pgup:db    K_pgup1,K_pgup2,K_pgup3    ; Scroll one page (screen) up    
  174. ;
  175.     db '__DN:'
  176. k.down:    db    K_dn1,K_dn2,K_dn3    ; Scroll one line down
  177. ;
  178.     db 'PGDN:'
  179. k.pgdown:db    K_pgdn1,K_pgdn2,K_pgdn3    ; Scroll one page (screen) down
  180. ;
  181.     db 'LEFT:'
  182. k.left:    db    K_left1,K_left2,K_left3    ; Scroll to left
  183. ;
  184.     db 'RGHT:'
  185. k.right:db    K_rt1,K_rt2,K_rt3    ; Scroll to right
  186. ;
  187.     db 'BEGN:'
  188. k.begin:db    K_beg1,K_beg2,K_beg3    ; Display beginning of file
  189. ;
  190.     db '_END:'     
  191. k.end:    db    K_end1,K_end2,K_end3    ; Display end of file
  192. ;
  193.     db 'GOTO:'
  194. k.goto:    db    K_goto1,K_goto2,K_goto3    ; Goto (search) for string 
  195. ;
  196.     db 'NXTF:'
  197. k.nextfile:db    K_nxtf1,K_nxtf2,K_nxtf3    ; View next file
  198. ;
  199.     db 'PRVF:'
  200. k.prevfile:db    K_prvf1,K_prvf2,K_prvf3    ; View previous file
  201. ;
  202.     db 'EXIT:'
  203. k.exit:db    K_exit1,K_exit2,K_exit3    ; Exit from V.
  204. ;
  205. .list
  206. configlen    equ    $-beginconfig
  207. ;
  208. test0 equ     HELPBUF-CONFIGBUF-configlen
  209.     ds    HELPBUF-CONFIGBUF-configlen    
  210. .xlist
  211.  
  212. subttl    '---------- HELP AND USAGE ----------'
  213. ;
  214. ;;    org    HELPBUF
  215. ;
  216. ; Edit the message to correspond to the key bindings.
  217. ;
  218. helpmessage:
  219. ;
  220. db 'V  commands (in addition to Z-System arrow keys):',cr,lf
  221. db lf
  222. db '1 line down  .  SP ^N       1 line up   , ^P',cr,lf
  223. db '1 page down  >  CR ^V       1 page up   < ^Z',cr,lf
  224. db 'n pages      digit          n pages     digit',cr,lf
  225. db lf
  226. db 'right        R              left        L',cr,lf
  227. db 'beginning    B              end         E',cr,lf
  228. db 'next file    ^X             prev. file  ^R',cr,lf
  229. db 'goto/search  G              exit        ^C',cr,lf
  230. db 0
  231.  
  232. ;
  233. helpmsglen equ $-helpmessage
  234. .list
  235. ;!!! ERROR -- help message is too long.
  236.  
  237. test2 equ     EXCLUDEBUF-HELPBUF-helpmsglen
  238.     ds    EXCLUDEBUF-HELPBUF-helpmsglen
  239. ;
  240. .xlist
  241. subttl    '---------- FILE EXCLUSION LIST ----------'
  242. ;
  243. ;
  244. exclude_cnt:
  245.     db    ??excnt        ;; number of items in list
  246. .xlist
  247. exclude_tbl:
  248. ; ruler:    '--11 bytes-'
  249.     db    '!!!TIME&DAT'
  250.     db    '????????SWP'
  251.     db    '????????BIN'
  252.     db    '????????C?M'
  253.     db    '????????R?L'
  254.     db    '????????Z?L'
  255.     db    '?????????Y?'
  256.     db    '????????LBR'
  257.     db    '????????BSX'
  258.     db    '????????RSX'
  259.     rept    5*11        ;; space for more
  260.     db    0FFh        ;; list terminator
  261.     endm
  262. ??excnt equ ($-exclude_tbl)/11
  263.     db    0
  264. ;
  265. ; end vkeys.lib
  266.    1 line up