; CCOUNTCF.Z80 ; ; ZCNFG configuration module for CCOUNT.COM. The assembled version of ; this file must be named CCOUNTxx.CFG, where xx is the version number ; of CCOUNT, to be automatically recognized by ZCNFG. ; ; Version 1.0 -- March 2, 1991 -- Gene Pizzetta ; For CCOUNT 1.0. ; ; Patch locations . . . ; AllFlg equ 015h ; count all characters HiFlg equ 016h ; high bits significant PagFlg equ 017h ; screen paging AbtFlg equ 018h ; error on abort CRTLns equ 019h ; console lines ; ; ZCNFG function definitions . . . ; Switch equ 0 ; toggle bit n in a byte (n is specified in BDATA) Text equ 1 ; edit text with UC conversion DUSpec equ 2 ; replace a ZCPR style DU specification (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 to one of n options defined by mask in BDATA 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 A, ToglTF, AllFlg, 1, ScrnA1, YesNo CaseA2: CASE H, ToglTF, HiFlg, 1, ScrnA2, NoYes CASE P, ToglTF, PagFlg, 1, ScrnA3, NoYes CASE C, ToglTF, AbtFlg, 1, ScrnA4, YesNo CASE L, DecRad, CRTLns, 1, ScrnA5, LnsRge 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 LnsRge: dw 3 ; Minimum lines dw 255 ; Maximum lines ; ; Screen image section . . . ; ScrnA: db cr,lf,lf,tab,tab,tab,' CCOUNT Configuration Menu' db cr,lf,lf,lf ; db tab,tab,'(A) ',1,'Count all characters by default? . . ',2 ScrnA1: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(H) ',1,'Ignore high bits by default? . . . . ',2 ScrnA2: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(P) ',1,'Page screen by default? . . . . . . . ',2 ScrnA3: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(C) ',1,'User abort (^C) is an error? . . . . ',2 ScrnA4: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(L) ',1,'Maximum console lines (CP/M only) . . ',2 ScrnA5: db ' ' ; current value db cr,lf ; db lf,lf,lf,lf ; fill rest of screen ; db 0 ; terminator ; ; Help screen section . . . ; HelpA: db CR,LF ; db HON,'Option A -- Count all characters.',HOF,' Normally ' db 'CCOUNT counts and displays the',CR,LF db 'totals only for those characters given on the command ' db ' line. If "Yes" is',CR,LF db 'selected, all characters in the file will be counted ' db 'and displayed by',CR,LF db 'default. The default can be toggled with the command ' db 'line "A" option.' db CR,LF,LF ; db HON,'Option H -- Ignore high bits.',HOF,' As distributed, ' db ' CCOUNT ignores high bits',CR,LF db 'when counting characters in a file. Selecting "No" causes ' db 'characters which',CR,LF db 'have their high bit set to be considered by default as ' db 'different from those',CR,LF db 'which do not. The command line "H" option will toggle ' db 'the default chosen.' db CR,LF,LF ; db HON,'Option P -- Screen paging.',HOF,' A "Yes" will ' db 'make CCOUNT pause and wait for a',CR,LF db 'key to be pressed each time the screen fills. "No" ' db 'causes the screen to',CR,LF db 'scroll continuously. This configured default can ' db ' be toggled with the',CR,LF db 'command line "P" option.' db CR,LF,LF ; db HON,'Option C -- Error on user abort.',HOF,' Pick "Yes" ' db 'if you want the program error',CR,LF db 'flag set when CCOUNT is aborted via a ^C from the console. ' db ' In that case',CR,LF db 'the error handler will be invoked (if one is installed), ' db 'allowing the user',CR,LF db 'to also abort a running SUB or ZEX batch job. That can ' db 'be very useful. If',CR,LF db 'you would rather not have the aggravation, however, ' db ' select "No" and an',CR,LF db 'abort will not be considered an error.' db CR,LF ; db ':',CR,LF db HON,'Option L -- Screen lines.',HOF,' Enter the maximum ' db ' number of lines that can be',CR,LF db 'displayed on your console. This parameter is only used ' db ' under CP/M. Under',CR,LF db 'Z-System the number of screen lines is obtained from ' db 'the environment.' db CR,LF ; db 0 ; terminator ; end