home *** CD-ROM | disk | FTP | other *** search
- ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- ; * *
- ; * S C A N *
- ; * *
- ; * A ZCPR3 Buffered Bi-directional *
- ; * Video-oriented Text File Display Utility *
- ; * For Text and Library Member Files *
- ; * *
- ; * Copyright (c) 1988-91 *
- ; * by *
- ; * Terry Hazen *
- ; * 21460 Bear Creek Road *
- ; * Los Gatos, CA 95030 *
- ; * *
- ; * Voice.......... (408) 354-7188 *
- ; * Zee-Machine.... (408) 245-1420 *
- ; * Ladera Znode... (213) 670-9465 *
- ; * *
- ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- ;
- ;
- ; Latest Revision
- ; ---------------
- ;
- ; Version 2.5 - 08/28/91 See SCAN25.Z80 for revision details.
- ;
- ;================================================================
- ;
- ; Equates
- ;
- off equ 0
- on equ 0ffh
-
- bs equ 8 ; Backspace character
- tab equ 9 ; Tab character
- cr equ 13 ; Carriage return character
- esc equ 27 ; Escape character
- space equ 32 ; Space character
-
-
- ;=================================================================
- ;
- ; SCAN has several locations near the beginning of the program
- ; that can be patched using ZP, ZPATCH, PATCH, DDT, DDTZ, etc,
- ; to alter the operation of the program to suit the user. The
- ; following tables list these patch locations and their
- ; distribution defaults.
- ;
- ; There are also several other ways to configure SCAN. Some of
- ; SCAN.COM's more common user-configurable settings may be
- ; changed by using ZCNFG.COM and the configuration file SCAN.CFG.
- ;
- ; The syntax is:
- ;
- ; ZCNFG comfile[.COM]] [configfile[.CFG]]
- ;
- ; This file, SCAN.PAT, may also be used as the source code for an
- ; overlay file. It may be renamed to OVERLAY.Z80, for example,
- ; edited to configure your copy of SCAN.COM the way you want it,
- ; assembled to OVERLAY.HEX and then overlaid on SCAN.COM using
- ; MLOAD or MYLOAD:
- ;
- ; A0>MLOAD NEW.COM=SCAN.COM,OVERLAY.HEX
- ;
- ;================================================================
- ;
- ; Terminal Lines and Columns
- ; --------------------------
- ;
- ; SCAN provides internal locations for the number of lines and
- ; columns your terminal displays. SCAN will look first for the
- ; value in the internal location and if a non-zero value is found,
- ; SCAN will take that value. If the internal value is zero, SCAN
- ; will take the value from the ZCPR3 environment.
- ;
- ; Since terminals and terminal setups vary widely, the new
- ; VLIB4D+ extended Z3TCAP also includes two terminal configuration
- ; bytes that define such things as whether the terminal is set to
- ; automatically wrap lines when a character is displayed in the
- ; last column and whether the terminal is set to automatically
- ; scroll the display up one line when a character is displayed in
- ; the last column of the last line. The value of these bytes
- ; will depend not only on your type of terminal, but on how you
- ; have it set up.
- ;
- ; To help avoid problems with terminals doing autowrap and
- ; creating unwanted extra lines in the SCAN display, SCAN checks
- ; the second terminal configuration byte and won't place
- ; characters in the last column position in its displays if it
- ; finds that the terminal either automatically wraps or scrolls.
- ;
- org 010bh ; Patch area
- ;
- ; Default Location Purpose
- ;================================================================
- db 0 ; 010Bh ; Number of display lines.
- db 0 ; 010Ch ; Number of display columns.
-
- ;
- ; Screen Overlap
- ; --------------
- ;
- ; You may specify the number of lines from a previous screen
- ; displayed on a new screen when paging the display by screens.
- ; The overlap helps you orient yourself when you move to a new
- ; display screen. For example, WordStar 3.0 uses an overlap of
- ; 5 lines and WordStar 4.0 uses an overlap of 3 lines.
- ;
- org 0116h
- ;
- ; Default Location Purpose
- ;================================================================
- db 5 ; 0116h ; The number of lines from previous
- ; screen displayed on new screen.
- ;
- ; Video Display Modes
- ; -------------------
- ;
- ; You may select the default video display mode. Set the display
- ; mode flag to 01h to select the WordStar mode, to 02h to select
- ; the ZCPR3 mode, or to 04h to select the basic vanilla ASCII mode.
- ;
- ; Default Location Purpose
- ;================================================================
- db 01h ; 0117h ; Default to WordStar display mode.
- ;db 02h ; 0117h ; Default to ZCPR3 display mode.
- ;db 04h ; 0117h ; Default to ASCII display mode.
-
- ;
- ; Found String Display Line
- ; -------------------------
- ;
- ; You may specify the line on which SCAN displays the search
- ; string when it is found. SCAN's default is line 13, the same
- ; as WordStar 3.0 and 4.0.
- ;
- ; Default Location Purpose
- ;================================================================
- db 13 ; 0118h ; Found string displayed on line 13 (0Dh)
-
- ;
- ; Wildcard String Search Character
- ; --------------------------------
- ;
- ; Like WordStar, SCAN recognizes a wildcard character in the
- ; search string, matching any single character in the text. The
- ; default wildcard character is WordStar's wildcard character ^A
- ; (01h). This means that you can't search for the ^A (01H)
- ; character in the text, which is used in some ZCPR3 files to
- ; turn on video highlighting. You may patch a different wildcard
- ; character in the location below. Pick a character not usually
- ; found in the text you normally search. The tilde (~) character
- ; is one suggestion.
- ;
- ; Default Location Purpose
- ;================================================================
- db 'A'-40h ; 0119h ; Default is WordStar character (^A=01h)
-
- ;
- ; Printer Initialization String
- ; -----------------------------
- ;
- ; If you wish to set your printer to a specific type face or mode
- ; whenever you send it text from SCAN, you may patch in a printer
- ; initialization string (6 bytes maximum). Note that this string
- ; is sent to the printer each time printer output is selected.
- ; The first byte is the length of the string.
- ;
- ; Default Location Purpose
- ;================================================================
- db 0 ; 011Ah ; Length of printer initialization string
- db 0,0,0,0,0,0 ; 011Bh ; Printer initialization string.
- ; - 6 bytes maximum
-
- ;
- ; Library Fence Character
- ; -----------------------
- ;
- ; Although not usually patched, you may also customize the
- ; library file display fence character.
- ;
- ; Default Location Purpose
- ;================================================================
- db ' ' ; 0121h ; Leading space.
- db '| ' ; 0122h ; Library display fence character
- ; and trailing space.
-
- ;
- ; Command Customization
- ; ---------------------
- ;
- ; SCAN supports the ZPATCH commands 'T'=top of file, 'B'=bottom
- ; of file, '>'=forward one page and '<'=back one page, as
- ; well as the extensions '.'=forward one line and ','=back one
- ; line as an alternate command set.
- ;
- ; For users prefering the BGii TYPE command set, the library
- ; SCAN25G.LBR contains SCAN25BG.COM and SCAN25BG.Z80 (an overlay
- ; file) that modify SCAN to make SCAN's alternate commands more
- ; BGii-compatible.
- ;
- ; For those users who hate WordStar commands and want to use a
- ; different command set, a limited degree of command
- ; customization is provided. Many WordStar commands are two-
- ; character commands and not easily changed to one-character
- ; commands, so command customization patching is limited to
- ; several of the one-character commands. For example, SCAN uses
- ; <RET> to move the display ahead one line and SPACE to move the
- ; display ahead one page (for easier 'tapping' when casually
- ; viewing files.) Some users, however, may prefer to reverse
- ; these commands and use <RET> to move ahead one page and SPACE
- ; to move ahead one line.
- ;
- ; SCAN automatically capitalizes command characters when they are
- ; entered. If entered commands are characters between A and Z,
- ; they are also made into control characters by subtracting 40h
- ; from them ('A'-40h = 01h, 'Z'-40h = 1Ah.) Therefore, all
- ; letter commands patched at the locations below must be patched
- ; as the capital letter - 40h. All other command characters are
- ; used exactly as entered.
- ;
- ; Since a command letter may be entered with or without the
- ; control key being pressed, patching a command to 'E'-40h (^E
- ; or 05h) means, for example, that entering e, E or ^E gives the
- ; same result.
- ;
- ; When SCAN gets a command, it tries to match it with the command
- ; list, beginning at the bottom of the list (out of the patch
- ; area), in reverse order. If you change a command to one that
- ; also appears lower in the list, the earlier use of the command
- ; will be automatically preempted, as the command search will end
- ; with the first match. For example, attempting to use TAB to
- ; back up one page (at 0202h) will be preempted by its original
- ; use to scroll the screen right (at 0213h).
- ;
- ; Several functions have alternates commands. The second of these
- ; commands to be displayed in the help screen are marked
- ; (alternate-3chr). If you patch these commands to be SPACE,
- ; TAB, ESC ; CR, BS, etc, which will generate 2-3 characters in the
- ; help screen display, they must appear as the second command to
- ; avoid overwriting the display of the first command, which is
- ; assumed to be displayed as one character.
- ;
- org 01fdh ; Command table patch area
- ;
- ; Default Location Purpose
- ;================================================================
- ;
- ; WordStar default commands not appearing in help screen:
- ;
- db 'W'-40h ; 01FDh ; Up (back) one line (WordStar)
- db 'E'-40h ; 01FEh ; Up (back) one line (WordStar alternate)
- db 'Z'-40h ; 01FFh ; Down one line (WordStar)
- db 'X'-40h ; 0200h ; Down one line (WordStar alternate)
- db 'S'-40h ; 0201h ; Display left (WordStar)
- db 'D'-40h ; 0202h ; Display right (WordStar)
- db 'C'-40h ; 0203h ; Down one page (WordStar)
- db 'R'-40h ; 0204h ; Up (back) one page (WordStar)
- ;
- ; Single-character commands automatically appearing in help screen:
- ;
- db 'T'-40h ; 0205h ; Top of file
- db 'F'-40h ; 0206h ; Find string
- db 'B'-40h ; 0207h ; Bottom of file
- db 'L'-40h ; 0208h ; Find again
- db 'U'-40h ; 0209h ; Cancel commands
- db '<' ; 020Ah ; Up (back) one page
- db '>' ; 020Bh ; Down (forward) one page
- db space ; 020Ch ; Down (forward) one page (alternate-3chr)
- db '/' ; 020Dh ; Help/text toggle
- db '?' ; 020Eh ; Help/text toggle (alternate-3chr)
- db ',' ; 020Fh ; Up (back) one line
- db 'V'-40h ; 0210h ; Video mode toggle
- db '.' ; 0211h ; Down (forward) one line
- db cr ; 0212h ; Down (forward) one line (alternate-3chr)
- db 'P'-40h ; 0213h ; Printer toggle
- db bs ; 0214h ; Scroll display left
- db tab ; 0215h ; Scroll display right
- db esc ; 0216h ; Exit
-
- ;================================================================
- end ; Patch area