home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C128CPM / SCAN25.LBR / SCAN25.PYT / SCAN25.PYT
Encoding:
Text File  |  1986-04-04  |  10.9 KB  |  283 lines

  1. ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2. ; *                                  *
  3. ; *                  S C A N                  *
  4. ; *                                  *
  5. ; *           A ZCPR3 Buffered Bi-directional          *
  6. ; *          Video-oriented Text File Display Utility          *
  7. ; *          For Text and Library Member Files          *
  8. ; *                                  *
  9. ; *            Copyright (c) 1988-91              *
  10. ; *                 by                  *
  11. ; *                 Terry Hazen              *
  12. ; *            21460 Bear Creek Road              *
  13. ; *             Los Gatos, CA 95030              *
  14. ; *                                  *
  15. ; *           Voice.......... (408) 354-7188          *
  16. ; *           Zee-Machine.... (408) 245-1420          *
  17. ; *           Ladera Znode... (213) 670-9465          *
  18. ; *                                  *
  19. ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  20. ;
  21. ;
  22. ; Latest Revision
  23. ; ---------------
  24. ;
  25. ; Version 2.5 - 08/28/91   See SCAN25.Z80 for revision details.
  26. ;
  27. ;================================================================
  28. ;
  29. ; Equates
  30. ;
  31. off    equ    0
  32. on    equ    0ffh
  33.  
  34. bs    equ    8    ; Backspace character
  35. tab    equ    9    ; Tab character
  36. cr    equ    13    ; Carriage return character
  37. esc    equ    27    ; Escape character
  38. space    equ    32    ; Space character
  39.  
  40.  
  41. ;=================================================================
  42. ;
  43. ; SCAN has several locations near the beginning of the program
  44. ; that can be patched using ZP, ZPATCH, PATCH, DDT, DDTZ, etc,
  45. ; to alter the operation of the program to suit the user.  The
  46. ; following tables list these patch locations and their
  47. ; distribution defaults.
  48. ;
  49. ; There are also several other ways to configure SCAN.    Some of
  50. ; SCAN.COM's more common user-configurable settings may be
  51. ; changed by using ZCNFG.COM and the configuration file SCAN.CFG.
  52. ;
  53. ; The syntax is:
  54. ;
  55. ;    ZCNFG comfile[.COM]] [configfile[.CFG]]
  56. ;
  57. ; This file, SCAN.PAT, may also be used as the source code for an
  58. ; overlay file.  It may be renamed to OVERLAY.Z80, for example,
  59. ; edited to configure your copy of SCAN.COM the way you want it, 
  60. ; assembled to OVERLAY.HEX and then overlaid on SCAN.COM using 
  61. ; MLOAD or MYLOAD:
  62. ;
  63. ;      A0>MLOAD NEW.COM=SCAN.COM,OVERLAY.HEX
  64. ;
  65. ;================================================================
  66. ;
  67. ; Terminal Lines and Columns
  68. ; --------------------------
  69. ;
  70. ; SCAN provides internal locations for the number of lines and
  71. ; columns your terminal displays.  SCAN will look first for the
  72. ; value in the internal location and if a non-zero value is found,
  73. ; SCAN will take that value.  If the internal value is zero, SCAN
  74. ; will take the value from the ZCPR3 environment.
  75. ;
  76. ; Since terminals and terminal setups vary widely, the new
  77. ; VLIB4D+ extended Z3TCAP also includes two terminal configuration
  78. ; bytes that define such things as whether the terminal is set to
  79. ; automatically wrap lines when a character is displayed in the
  80. ; last column and whether the terminal is set to automatically
  81. ; scroll the display up one line when a character is displayed in
  82. ; the last column of the last line.  The value of these bytes
  83. ; will depend not only on your type of terminal, but on how you
  84. ; have it set up.
  85. ;
  86. ; To help avoid problems with terminals doing autowrap and
  87. ; creating unwanted extra lines in the SCAN display, SCAN checks
  88. ; the second terminal configuration byte and won't place
  89. ; characters in the last column position in its displays if it
  90. ; finds that the terminal either automatically wraps or scrolls.
  91. ;
  92.     org    010bh    ; Patch area
  93. ;
  94. ;     Default    Location  Purpose
  95. ;================================================================
  96. db    0    ; 010Bh ; Number of display lines.
  97. db    0    ; 010Ch ; Number of display columns.
  98.  
  99. ;
  100. ; Screen Overlap
  101. ; --------------
  102. ;
  103. ; You may specify the number of lines from a previous screen
  104. ; displayed on a new screen when paging the display by screens.
  105. ; The overlap helps you orient yourself when you move to a new
  106. ; display screen.  For example, WordStar 3.0 uses an overlap of
  107. ; 5 lines and WordStar 4.0 uses an overlap of 3 lines.
  108. ;
  109.     org    0116h
  110. ;
  111. ;     Default    Location  Purpose
  112. ;================================================================
  113. db    5    ; 0116h ; The number of lines from previous
  114.             ; screen displayed on new screen.
  115. ;
  116. ; Video Display Modes
  117. ; -------------------
  118. ;
  119. ; You may select the default video display mode.  Set the display
  120. ; mode flag to 01h to select the WordStar mode, to 02h to select
  121. ; the ZCPR3 mode, or to 04h to select the basic vanilla ASCII mode.
  122. ;
  123. ;     Default    Location  Purpose
  124. ;================================================================
  125. db    01h    ; 0117h ; Default to WordStar display mode.
  126. ;db    02h    ; 0117h ; Default to ZCPR3 display mode.
  127. ;db    04h    ; 0117h ; Default to ASCII display mode.
  128.  
  129. ;
  130. ; Found String Display Line
  131. ; -------------------------
  132. ;
  133. ; You may specify the line on which SCAN displays the search
  134. ; string when it is found.  SCAN's default is line 13, the same
  135. ; as WordStar 3.0 and 4.0.
  136. ;
  137. ;     Default    Location  Purpose
  138. ;================================================================
  139. db    13    ; 0118h ; Found string displayed on line 13 (0Dh)
  140.  
  141. ;
  142. ; Wildcard String Search Character
  143. ; --------------------------------
  144. ;
  145. ; Like WordStar, SCAN recognizes a wildcard character in the
  146. ; search string, matching any single character in the text.  The
  147. ; default wildcard character is WordStar's wildcard character ^A
  148. ; (01h).  This means that you can't search for the ^A (01H)
  149. ; character in the text, which is used in some ZCPR3 files to
  150. ; turn on video highlighting.  You may patch a different wildcard
  151. ; character in the location below.  Pick a character not usually
  152. ; found in the text you normally search.  The tilde (~) character
  153. ; is one suggestion.
  154. ;
  155. ;     Default    Location  Purpose
  156. ;================================================================
  157. db    'A'-40h    ; 0119h ; Default is WordStar character (^A=01h)
  158.  
  159. ;
  160. ; Printer Initialization String
  161. ; -----------------------------
  162. ;
  163. ; If you wish to set your printer to a specific type face or mode
  164. ; whenever you send it text from SCAN, you may patch in a printer
  165. ; initialization string (6 bytes maximum).  Note that this string
  166. ; is sent to the printer each time printer output is selected.
  167. ; The first byte is the length of the string.
  168. ;
  169. ;     Default    Location  Purpose
  170. ;================================================================
  171. db  0        ; 011Ah ; Length of printer initialization string
  172. db  0,0,0,0,0,0    ; 011Bh ; Printer initialization string.
  173.             ;    - 6 bytes maximum
  174.  
  175. ;
  176. ; Library Fence Character
  177. ; -----------------------
  178. ;
  179. ; Although not usually patched, you may also customize the
  180. ; library file display fence character.
  181. ;
  182. ;     Default    Location  Purpose
  183. ;================================================================
  184. db    ' '    ; 0121h ; Leading space.
  185. db    '| '    ; 0122h ; Library display fence character
  186.             ; and trailing space.
  187.  
  188. ;
  189. ; Command Customization
  190. ; ---------------------
  191. ;
  192. ; SCAN supports the ZPATCH commands 'T'=top of file, 'B'=bottom
  193. ; of file, '>'=forward one page and '<'=back one page, as
  194. ; well as the extensions '.'=forward one line and ','=back one
  195. ; line as an alternate command set.
  196. ;
  197. ; For users prefering the BGii TYPE command set, the library
  198. ; SCAN25G.LBR contains SCAN25BG.COM and SCAN25BG.Z80 (an overlay
  199. ; file) that modify SCAN to make SCAN's alternate commands more
  200. ; BGii-compatible.
  201. ;
  202. ; For those users who hate WordStar commands and want to use a
  203. ; different command set, a limited degree of command
  204. ; customization is provided.  Many WordStar commands are two-
  205. ; character commands and not easily changed to one-character
  206. ; commands, so command customization patching is limited to
  207. ; several of the one-character commands.  For example, SCAN uses
  208. ; <RET> to move the display ahead one line and SPACE to move the
  209. ; display ahead one page (for easier 'tapping' when casually
  210. ; viewing files.)  Some users, however, may prefer to reverse
  211. ; these commands and use <RET> to move ahead one page and SPACE
  212. ; to move ahead one line.
  213. ;
  214. ; SCAN automatically capitalizes command characters when they are
  215. ; entered.  If entered commands are characters between A and Z,
  216. ; they are also made into control characters by subtracting 40h
  217. ; from them ('A'-40h = 01h, 'Z'-40h = 1Ah.)  Therefore, all
  218. ; letter commands patched at the locations below must be patched
  219. ; as the capital letter - 40h.    All other command characters are
  220. ; used exactly as entered.
  221. ;
  222. ; Since a command letter may be entered with or without the
  223. ; control key being pressed, patching a command to 'E'-40h (^E
  224. ; or 05h) means, for example, that entering e, E or ^E gives the
  225. ; same result.
  226. ;
  227. ; When SCAN gets a command, it tries to match it with the command
  228. ; list, beginning at the bottom of the list (out of the patch
  229. ; area), in reverse order.  If you change a command to one that
  230. ; also appears lower in the list, the earlier use of the command
  231. ; will be automatically preempted, as the command search will end
  232. ; with the first match.  For example, attempting to use TAB to
  233. ; back up one page (at 0202h) will be preempted by its original
  234. ; use to scroll the screen right (at 0213h).
  235. ;
  236. ; Several functions have alternates commands.  The second of these
  237. ; commands to be displayed in the help screen are marked
  238. ; (alternate-3chr).  If you patch these commands to be SPACE,
  239. ; TAB, ESC ; CR, BS, etc, which will generate 2-3 characters in the
  240. ; help screen display, they must appear as the second command to
  241. ; avoid overwriting the display of the first command, which is
  242. ; assumed to be displayed as one character.
  243. ;
  244.       org     01fdh    ; Command table patch area
  245. ;
  246. ;     Default    Location  Purpose
  247. ;================================================================
  248. ;
  249. ; WordStar default commands not appearing in help screen:
  250. ;
  251. db    'W'-40h    ; 01FDh ; Up (back) one line (WordStar)
  252. db    'E'-40h    ; 01FEh ; Up (back) one line (WordStar alternate)
  253. db    'Z'-40h    ; 01FFh ; Down one line (WordStar)
  254. db    'X'-40h    ; 0200h ; Down one line (WordStar alternate)
  255. db    'S'-40h    ; 0201h ; Display left (WordStar)
  256. db    'D'-40h    ; 0202h ; Display right (WordStar)
  257. db    'C'-40h    ; 0203h ; Down one page (WordStar)
  258. db    'R'-40h    ; 0204h ; Up (back) one page (WordStar)
  259. ;
  260. ; Single-character commands automatically appearing in help screen:
  261. ;
  262. db    'T'-40h    ; 0205h ; Top of file
  263. db    'F'-40h    ; 0206h ; Find string
  264. db    'B'-40h    ; 0207h ; Bottom of file
  265. db    'L'-40h    ; 0208h ; Find again
  266. db    'U'-40h    ; 0209h ; Cancel commands
  267. db    '<'    ; 020Ah ; Up (back) one page
  268. db    '>'    ; 020Bh ; Down (forward) one page
  269. db    space    ; 020Ch ; Down (forward) one page (alternate-3chr)
  270. db    '/'    ; 020Dh ; Help/text toggle
  271. db    '?'    ; 020Eh ; Help/text toggle (alternate-3chr)
  272. db    ','    ; 020Fh ; Up (back) one line
  273. db    'V'-40h    ; 0210h ; Video mode toggle
  274. db    '.'    ; 0211h ; Down (forward) one line
  275. db    cr    ; 0212h ; Down (forward) one line (alternate-3chr)
  276. db    'P'-40h    ; 0213h ; Printer toggle
  277. db    bs    ; 0214h ; Scroll display left
  278. db    tab    ; 0215h ; Scroll display right
  279. db    esc    ; 0216h ; Exit
  280.  
  281. ;================================================================
  282.     end    ; Patch area
  283.