home *** CD-ROM | disk | FTP | other *** search
- ; CPDCF.Z80
- ;
- ; ZCNFG configuration module for CPD.COM. The assembled version of
- ; this file must be named CPDxx.CFG, where xx is the version number
- ; of CPD, to be automatically recognized by ZCNFG.
- ;
- ; Version 1.3 -- January 12, 1992 -- Gene Pizzetta
- ; For CPD 1.4. Added FLdu and OutFn configuration options.
- ;
- ; Version 1.2 -- December 27, 1991 -- Gene Pizzetta
- ; For CPD 1.2. Added FLDir configuration option.
- ;
- ; Version 1.1 -- December 21, 1991 -- Gene Pizzetta
- ; For CPD 1.1. Added CasFlg, ConDiv, and LstDiv options.
- ;
- ; Version 1.0 -- August 10, 1991 -- Gene Pizzetta
- ; For CPD 1.0.
- ;
- ; Patch locations . . .
- ;
- SysFlg equ 015h ; system files
- BthFlg equ 016h ; duplicated files
- NotFlg equ 017h ; missing files
- ArcFlg equ 018h ; archiving
- PagFlg equ 019h ; screen paging
- FFFlag equ 01Ah ; form feed
- FLdu equ 01Bh ; include DU's in file
- FLDir equ 01Ch ; file output directory
- CasFlg equ 01Dh ; case flag
- AbtFlg equ 01Eh ; abort error flag
- ConDiv equ 01Fh ; console column divider
- LstDiv equ 020h ; printer column divider
- OutFn equ 022h ; filename for listfile
- ;
- ; ZCNFG function definitions . . .
- ;
- Switch equ 0 ; toggle bit n in a byte (n is specified)
- Text equ 1 ; edit text with UC conversion
- DUSpec equ 2 ; replace a ZCPR style DU spec (NOT DIR:!)
- HexRad equ 3 ; edit byte/word using HEX radix
- DecRad equ 4 ; edit byte/word using DECIMAL radix
- TextLC equ 5 ; edit text, both UC and LC
- FileSp equ 6 ; edit a Z3 filespec or filespec fragment
- Togl3 equ 7 ; toggle one of three options: 001B, 010B, 100B
- ToglTF equ 8 ; toggle a byte between 0ffh and 0
- ASCIIC equ 9 ; replace any ASCII byte with a keystroke
-
- ;
- ; ASCII characters . . .
- ;
- HON equ 1 ; highlight on
- HOF equ 2 ; highlight off
- TAB equ 9 ; tab
- LF equ 10 ; linefeed
- CR equ 13 ; carriage return
- ;
- ; Macro definitions
- ; C = character to identify menu item
- ; OFFSET = offset in program's configuration block
- ; FUNC = ZCNFG function
- ; SCRN = screen location for data
- ; DATA = function data address (if required)
- ;
- CASE macro c,func,offset,bytes,scrn,data
- db '&C'
- dw func, offset
- db bytes
- dw scrn, data
- endm
- ;
- ; Code . . .
- ;
- rst 0 ; for safety, so .CFG file won't execute
- ;
- dw MenuA ; for relocation of addresses, this
- ; ..points to the NEXT location.
- ;
- ; Menu list section . . .
- ;
- MenuA: dw MenuA, MenuA, ScrnA, CaseA, HelpA ; single menu
- ;
- ; Case table section . . .
- ;
- CaseA: db (CaseAX-CaseA1)/(CaseA2-CaseA1) ; number of cases
- db CaseA2-CaseA1 ; length of each record
- ;
- ; Macro name
- ; | Single char menu selector
- ; | | Function (see above)
- ; | | | Offset in config block
- ; | | | | Number of bytes
- ; | | | | | Screen location
- ; | | | | | |
- ;Case1: CASE 0, ToglTF, Loc1, 1, ScrnA1, NoYes
- ; |
- ; Address of data used by function
- ;
- ; The first two entries in table are labeled for calculation at CaseA:.
- ;
- CaseA1: CASE B, ToglTF, BthFlg, 1, ScrnA1, YesNo
- CaseA2: CASE N, ToglTF, NotFlg, 1, ScrnA2, YesNo
- CASE A, ToglTF, ArcFlg, 1, ScrnA3, YesNo
- CASE S, ToglTF, SysFlg, 1, ScrnA4, YesNo
- CASE P, ToglTF, PagFlg, 1, ScrnA5, NoYes
- CASE F, ToglTF, FFFlag, 1, ScrnA6, YesNo
- CASE D, ToglTF, FLdu, 1, ScrnA7, YesNo
- CASE O, ToglTF, FLDir, 1, ScrnA8, DftTgt
- CASE C, ToglTF, CasFlg, 1, ScrnA9, UpLow
- CASE X, ToglTF, AbtFlg, 1, ScrnA0, YesNo
- CASE 1, HexRad, ConDiv, 1, ScrnAA, DivRge
- CASE 2, HexRad, LstDiv, 1, ScrnAB, DivRge
- CASE 3, FileSp, OutFn, 0, ScrnAC, 0
- CaseAX: ; for calculation of list length
- ;
- ; Case table support . . .
- ;
- YesNo: db 'Yes',0 ; displayed if value is FFh (ToglTF)
- NoYes: db ' No',0 ; displayed if value is 00h (ToglTF)
- db 'Yes',0
- DftTgt: db 'Target',0
- db 'Logged',0
- UpLow: db 'Lower',0
- db 'Upper',0
- DivRge: dw 20h,0FFh
- ;
- ; Screen image section . . .
- ;
- ScrnA: db cr,lf,lf,tab,tab,tab,' CPD Configuration Menu'
- db cr,lf,lf
- ;
- db tab,' (B) ',1,'Show only duplicated files by default? . ',2
- ScrnA1: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (N) ',1,'Show only missing files by default? . . ',2
- ScrnA2: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (A) ',1,'Archive duplicated files by default? . . ',2
- ScrnA3: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (S) ',1,'Include system files by default? . . . . ',2
- ScrnA4: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (P) ',1,'Page screen by default? . . . . . . . . ',2
- ScrnA5: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (F) ',1,'Send final form feed by default? . . . . ',2
- ScrnA6: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (D) ',1,'Include DU''s in CPDLIST file? . . . . . ',2
- ScrnA7: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (O) ',1,'Output directory for CPDLIST . . . . ',2
- ScrnA8: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (C) ',1,'Case for filename display . . . . . . ',2
- ScrnA9: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (X) ',1,'Invoke error handler for user abort? . . ',2
- ScrnA0: db ' ' ; current value
- db cr,lf
- ;
- db tab,' (1) ',1,'Column divider character for console . . ',2
- ScrnAA: db ' h' ; current value
- db cr,lf
- ;
- db tab,' (2) ',1,'Column divider character for printer . . ',2
- ScrnAB: db ' h' ; current value
- db cr,lf
- ;
- db tab,' (3) ',1,'Filename for file list . . . . .',2
- ScrnAC: db ' ' ; current value
- db cr,lf
- ;
- db lf ; fill rest of screen
- ;
- db 0 ; terminator
- ;
- ; Help screen section . . .
- ;
- ; Sample help screen for Menu A. The following, up to the terminating
- ; binary 00, appears as-is when the user types "?" or "/" for help while
- ; ZCNFG is displaying the initial patch menu.
- ;
- HelpA: db CR,LF
- ;
- db HON,'Option B -- Display only duplicated files.',HOF
- db ' With this option set to "Yes"',CR,LF
- db 'CPD defaults to displaying only files which exist in '
- db 'both directories. The',CR,LF
- db 'default may be toggled with the command line "B" option. '
- db ' If this option is',CR,LF
- db '"Yes", make sure the N option is "No"; otherwise, you '
- db ' will not like the',CR,LF
- db 'result.'
- db CR,LF,LF
- ;
- db HON,'Option N -- Display only missing files.',HOF,' '
- db 'If this option is "Yes", CPD will',CR,LF
- db 'by default display only files in the first directory '
- db 'that do not appear in',CR,LF
- db 'the second directory. The default may be toggled by '
- db 'using the command line',CR,LF
- db '"N" option. If this option is "Yes", make sure option '
- db 'B is "No". Take my',CR,LF
- db 'word for it.'
- db CR,LF,LF
- ;
- db HON,'Option A -- Set archive attribute.',HOF,' "Yes" '
- db ' makes CPD default to setting the',CR,LF
- db 'archive attribute of files in the first directory that '
- db ' are duplicated in',CR,LF
- db 'the second directory. I can''t imagine anyone wanting '
- db 'to make this the',CR,LF
- db 'default mode of operation, but here it is if you have '
- db 'a need for it. The',CR,LF
- db 'configured default can be toggled with the command line '
- db '"A" option.'
- db CR,LF
- ;
- db ':',CR,LF
- db HON,'Option S -- Include system files.',HOF,' As distribute'
- db 'd CPD defaults to finding',CR,LF
- db 'only non-system (directory) files. A "Yes" allows CPD '
- db 'to always find all',CR,LF
- db 'files, including system files. The default set here '
- db 'can be toggled with',CR,LF
- db 'the command line "S" option.'
- db CR,LF,LF
- ;
- db HON,'Option P -- Screen paging.',HOF,' CPD pauses, '
- db 'waiting for a keypress, each time',CR,LF
- db 'the screen fills, if "Yes" is selected. "No" makes the '
- db ' default continuous',CR,LF
- db 'scrolling, which can be paused with ^S. The number of '
- db 'lines on the console',CR,LF
- db 'screen is obtained from the environment. The chosen '
- db 'default can be toggled',CR,LF
- db 'with the command line "P" option.'
- db CR,LF,LF
- ;
- db HON,'Option F -- Form feed printer.',HOF,' Choose here '
- db ' whether you want CPD to send a',CR,LF
- db 'form feed to the printer after it prints the file display. '
- db ' The option has',CR,LF
- db 'no effect unless the command line "L" (echo to printer) '
- db 'option is used.',CR,LF
- db 'The form feed default can be toggled with the command '
- db 'line "F" option.'
- db CR,LF,LF
- ;
- db HON,'Option D -- Include DU specifications.',HOF,' '
- db 'CPD can include DU specifications',CR,LF
- db 'in the CPDLIST file with each filename. Choosing "Yes" '
- db 'will make that the',CR,LF
- db 'default. The default here can be toggled with '
- db 'the "D" option on the',CR,LF
- db 'command line.'
- db CR,LF
- ;
- db ':',CR,LF
- db HON,'Option O -- File output directory.',HOF,' CPD will '
- db 'write its CPDLIST file to the',CR,LF
- db 'currently logged (default) directory or to the target '
- db 'directory (the first',CR,LF
- db 'one given on the command line), depending on what '
- db 'you select here. Make',CR,LF
- db 'your choice based on your usual working habits.'
- db CR,LF,LF
- ;
- db HON,'Option C -- Case of filename display.',HOF,' CPD '
- db 'can display filenames in upper-',CR,LF
- db 'or lower-case, whichever you prefer. (Actually, if '
- db 'lower-case is chosen,',CR,LF
- db 'the case of filenames is actually reversed and any lower-case'
- db ' filename will',CR,LF
- db 'be displayed in upper-case.'
- db CR,LF,LF
- ;
- db HON,'Option X -- Error for user abort.',HOF,' Select '
- db ' "Yes" if you want the error',CR,LF
- db 'handler invoked when CPD is aborted with ^C. This will '
- db 'allow also aborting',CR,LF
- db 'a ZEX or SUB batch operation. While that can be very '
- db ' useful, some people',CR,LF
- db 'might find the feature irritating.'
- db CR,LF,LF
- ;
- db HON,'Option 1 -- Console column divider.',HOF,' By '
- db ' default CPD uses a vertical bar',CR,LF
- db '("|", 7Ch) between each column of the filename display. '
- db ' You can change the',CR,LF
- db 'column divider to any printable character, such as a '
- db 'space (20h) or even a',CR,LF
- db 'graphic character if your terminal uses 8-bit business '
- db 'graphics.'
- db CR,LF
- ;
- db ':',CR,LF
- db HON,'Option 2 -- Printer column divider.',HOF,' A vertical '
- db ' bar ("|", 7Ch) is used by',CR,LF
- db 'default, but any other printable character can be chosen. '
- db ' This option is',CR,LF
- db 'provided primarily because a character chosen for the '
- db 'console display may',CR,LF
- db 'not be appropriate for printer output.'
- db CR,LF,LF
- ;
- db HON,'Option 3 -- Filename for file list.',HOF,' As '
- db ' distributed, CPD names the file',CR,LF
- db 'list CPDLIST (with no filetype, making it easy to '
- db ' spot in a directory',CR,LF
- db 'display). If you would prefer another name, you can '
- db 'enter it here.'
- db CR,LF
- ;
- db 0 ; Terminator
- ;
- end