; CONCATCF.Z80 ; ; ZCNFG configuration module for CONCAT.COM. The assembled version of ; this file must be named CONCATxx.CFG, where xx is the version number ; of CONCAT, to be automatically recognized by ZCNFG. ; ; Version 1.3 -- September 8, 1993 -- Gene Pizzetta ; For CONCAT 1.7. Changed DatFmt option to support three date ; formats. Also minor changes in menu and help screens. ; ; Version 1.2 -- November 3, 1991 -- Gene Pizzetta ; For CONCAT 1.5. Added FltFlg, PagFlg, LFFlag, and AbtErr ; configuration options. Added string configurations for ; TmStr1, TmStr3, and DivStr. Now requires ZCNFG 2.1 or higher. ; ; Version 1.1 -- February 23, 1991 -- Gene Pizzetta ; For CONCAT 1.3 ; ; Version 1.0 -- January 16, 1991 -- Gene Pizzetta ; For CONCAT 1.1. ; ; Patch locations . . . ; QtFlag equ 015h ; quiet flag AppFlg equ 016h ; concat or append default ObjFlg equ 017h ; text or object file default SpcFlg equ 018h ; space checking default StpFlg equ 019h ; file stamping default FltFlg equ 01Ah ; filter PagFlg equ 01Bh ; screen and printer paging DatFmt equ 01Ch ; American, European, or Japanese date format TimFmt equ 01Dh ; civilian or military time format ECFlag equ 01Eh ; divider string case default LFFlag equ 01Fh ; line feed after carriage return AbtErr equ 020h ; abort error AuxEOF equ 021h ; AUX end-of-file character TmStr1 equ 022h ; date/time prefix TmStr3 equ 037h ; date/time suffix DivStr equ 04Ch ; divider string ; ; 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 ; ; 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 MenuB, MenuB, ScrnA, CaseA, HelpA ; two menus MenuB: dw MenuA, MenuA, ScrnB, CaseB, HelpB ; ; Case table section . . . ; ; Case table for menu A ; 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, QtFlag, 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, AppFlg, 1, ScrnA1, ConApp CaseA2: CASE O, ToglTF, ObjFlg, 1, ScrnA2, TxtBin CASE S, ToglTF, SpcFlg, 1, ScrnA3, NoYes CASE F, ToglTF, StpFlg, 1, ScrnA4, NoYes CASE H, ToglTF, FltFlg, 1, ScrnA5, YesNo CASE Q, ToglTF, QtFlag, 1, ScrnA6, YesNo CASE P, ToglTF, PagFlg, 1, ScrnA7, NoYes CASE D, Togl3, DatFmt, 7, ScrnA8, AmrEur CASE T, ToglTF, TimFmt, 1, ScrnA9, CivMil CASE C, ToglTF, ECFlag, 1, ScrnAA, UpLow CASE L, ToglTF, LFFlag, 1, ScrnAB, YesNo CASE E, ToglTF, AbtErr, 1, ScrnAC, YesNo CASE Z, HexRad, AuxEOF, 1, ScrnAD, AuxRge CaseAX: ; for calculation of list length ; ; Case table for menu B ; CaseB: db (CaseBX-CaseB1)/(CaseB2-CaseB1) ; number of cases db CaseB2-CaseB1 ; length of each record ; CaseB1: CASE P, TextLC, TmStr1, 20, ScrnB1, NulDlm CaseB2: CASE S, TextLC, TmStr3, 20, ScrnB2, NulDlm CASE I, TextLC, DivStr, 76, ScrnB3, NulDlm CaseBX: ; 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 ConApp: db 'Append',0 db 'Concat',0 TxtBin: db 'Binary',0 db ' Text',0 AmrEur: db 'American',0 db 'European',0 db 'Japanese',0 CivMil: db 'Military',0 db 'Civilian',0 UpLow: db 'Upper',0 db 'Lower',0 AuxRge: dw 0 dw 0FFh NulDlm: db 0 ; ; Screen image section . . . ; ; Screen for menu A ; ScrnA: db cr,lf,tab,tab,tab,' CONCAT Configuration Menu' db cr,lf,tab,tab,tab,' (Screen 1 of 2)' db cr,lf,lf ; db 'Command line defaults:' db tab,'(A) ',1,'Default operating mode . . . . . . .',2 ScrnA1: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(O) ',1,'Default file format . . . . . . . . .',2 ScrnA2: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(S) ',1,'Check for sufficient disk space? . . . ',2 ScrnA3: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(F) ',1,'Transfer file stamps? . . . . . . . . . ',2 ScrnA4: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(H) ',1,'Filter high bits and controls . . . . . ',2 ScrnA5: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(Q) ',1,'Default to quiet mode? . . . . . . . . ',2 ScrnA6: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(P) ',1,'Screen/printer paging (CON: or LST:) . ',2 ScrnA7: db ' ' ; current value db cr,lf ; db 'Permanent options:',tab db '(D) ',1,'Date format . . . . . . . . . . . .',2 ScrnA8: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(T) ',1,'Time format . . . . . . . . . . . .',2 ScrnA9: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(C) ',1,'Divider string default case . . . . . ',2 ScrnAA: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(L) ',1,'Line feed after return (CON: input) . . ',2 ScrnAB: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(E) ',1,'Error on user abort (^C, ^K, ^X) . . . ',2 ScrnAC: db ' ' ; current value db cr,lf ; db tab,tab,tab db '(Z) ',1,'End-of-file character for AUX: . . . . ',2 ScrnAD: db ' h' ; current value db cr,lf ; db lf ; fill rest of screen ; db 0 ; terminator ; ; Screen for menu B ; ScrnB: db cr,lf,tab,tab,tab,' CONCAT Configuration Menu' db cr,lf,tab,tab,tab,' (Screen 2 of 2)' db cr,lf,lf,tab,tab,tab,' Configurable Strings' db cr,lf,lf ; db '(P) ',1,'Date and time prefix:',2,' "' ScrnB1: db ' "' ; current value db cr,lf,lf ; db '(S) ',1,'Date and time suffix:',2,' "' ScrnB2: db ' "' ; current value db cr,lf,lf ; db '(I) ',1,'Default divider insert:',2 db cr,lf,lf,'"' ScrnB3: db ' ' ; current value db ' "' db cr,lf ; db lf,lf,lf ; fill rest of screen ; db 0 ; terminator ; ; Help screen section . . . ; ; Help for Menu A ; HelpA: db CR,LF ; db 'COMMAND LINE DEFAULTS: The command line option pairs ' db '"A"/"C" and "O"/"T"',CR,LF db 'can be configured to default when neither of a pair ' db 'is given. Some other',CR,LF db 'command line options are toggles ("S", "F", "H", "Q", ' db 'and "P") which can',CR,LF db 'turn a feature on or off depending on the defaults chosen.' db CR,LF,LF ; db HON,'Option A -- Operating mode.',HOF,' The two operating ' db 'modes are concatenation of',CR,LF db 'the source files into a new destination file, as the ' db ' name of the program',CR,LF db 'implies, and appending the source files to an already ' db 'existing destination',CR,LF db 'file. As released the default is "Concat". You ' db 'can make "Append" the',CR,LF db 'default, if you do more appending than concatenating. ' db ' The mode selected',CR,LF db 'can be changed with the command line options "C" and ' db '"A".' db CR,LF,LF ; db HON,'Option O -- File format mode.',HOF,' This option ' db 'determines how CONCAT joins the',CR,LF db 'files. In "Text" mode the files are joined wherever ' db ' the CP/M end-of-file',CR,LF db 'character is found, even in the middle of a sector. ' db ' In "Binary" (object)',CR,LF db 'mode the files are joined only on record boundaries ' db 'and the end-of-file',CR,LF db 'character is ignored. "Text" is the correct setting ' db 'for most uses, but if',CR,LF db 'you use CONCAT mostly for binary files (for some strange ' db 'reason!), you can',CR,LF db 'make that the default here. The format selected can ' db 'be changed with the',CR,LF db 'command line options "T" and "O".' db CR,LF ; db ':',CR,LF ; page 2 db HON,'Option S -- Disk space checking.',HOF,' As distributed ' db 'CONCAT checks for adequate',CR,LF db 'free space before doing any writing to disk. If you''re ' db 'courageous, you can',CR,LF db 'turn off this feature by toggling it to "No". Space ' db 'checking can then be',CR,LF db 'turned back on with the command line "S" option.' db CR,LF,LF ; db HON,'Option F -- File stamp transfer.',HOF,' In concatenat' db 'ion mode CONCAT transfers',CR,LF db 'the create date stamp of the first source file to the ' db ' new file. (If any',CR,LF db 'source file has the same name as the destination file, ' db 'its file stamp will',CR,LF db 'be used instead.) If you prefer, change this option ' db 'to "No" to turn this',CR,LF db 'feature off by default. It can then be turned back ' db ' on with the command',CR,LF db 'line "F" option. Under Z3Plus the F option is not available' db ' (always off).' db CR,LF,LF ; db HON,'Option H -- Filter high bits and control characters.',HOF db ' If "Yes" is selected,',CR,LF db 'CONCAT will, by default, reset high bits as they are ' db 'output and eliminate',CR,LF db 'control characters other than carriage return, line ' db 'feed, form feed, and',CR,LF db 'horizontal tab. This feature is useful for redirected ' db 'output to CON: or',CR,LF db 'LST:, but it is not always desirable otherwise. The ' db 'default selected can',CR,LF db 'be toggled with the command line "H" option.' db CR,LF ; db ':',CR,LF ; page 3 db HON,'Option Q -- Quiet mode.',HOF,' This option selects ' db ' whether CONCAT will be in',CR,LF db 'verbose or quiet mode by default. In quiet mode only ' db ' error messages are',CR,LF db 'displayed. The default may be toggled with the command ' db 'line "Q" option.' db CR,LF,LF ; db HON,'Option P -- Screen and printer paging.',HOF,' During ' db 'redirected output to CON: or',CR,LF db 'LST:, paging can be selected. When paging is in effect, ' db 'CON: output waits',CR,LF db 'for a keypress each time the screen fills, while LST: ' db 'output sends a form',CR,LF db 'feed at the end of each page to skip over the perforations. ' db ' Paging is not',CR,LF db 'available for disk file or AUX: output. The selected ' db ' default can be',CR,LF db 'toggled with the "P" option on the command line.' db CR,LF,LF ; db 'PERMANENT OPTIONS: The following options are permanent ' db 'configurations that',CR,LF db 'cannot be changed from the command line.' db CR,LF,LF ; db HON,'Option D -- Date format.',HOF,' If the "D" command ' db 'line option is used to insert',CR,LF db 'the current date and time into the destination file, ' db ' the date can be in',CR,LF db 'either "American" (December 13, 1990), "European" ' db '(13 December 1990), or',CR,LF db '"Japanese" (1990 December 13) format. It''s your choice.' db CR,LF ; db ':',CR,LF ; page 4 db HON,'Option T -- Time format.',HOF,' If the "D" command ' db 'line option is used to insert',CR,LF db 'the current date and time into the destination file, ' db ' the time can be in',CR,LF db '"Civilian" format (12-hour time, e.g., "3:21 pm") or ' db '"Military" format (24-',CR,LF db 'hour time, e.g., "15:21"), whichever your prefer.' db CR,LF,LF ; db HON,'Option C -- Default case.',HOF,' This option ' db 'selects the default case of the',CR,LF db 'divider string if it is entered from the command line. ' db ' It does not affect',CR,LF db 'the operation of the "%<" and "%>" escape sequences, ' db 'nor does it affect the',CR,LF db 'internally configured divider string.' db CR,LF,LF ; db HON,'Option L -- Line feed after carriage return.',HOF db ' During redirected input from',CR,LF db 'CON:, a line feed must ordinarily be typed after a carriage ' db 'return. If you',CR,LF db 'prefer that CONCAT output the line feed automatically, ' db ' select "Yes" here.' db CR,LF,LF ; db HON,'Option E -- Error on user abort.',HOF,' Choose ' db 'here whether you want the program',CR,LF db 'error flag set and the error handler invoked when CONCAT ' db 'is aborted with a',CR,LF db '^C, ^K, or ^X. Calling the error handler is sometimes ' db 'advantageous because',CR,LF db 'it allows cancelling a SUB or ZEX batch job, but some ' db 'people might not want',CR,LF db 'the aggravation.' db CR,LF ; db ':',CR,LF db HON,'Option Z -- End-of-file character for AUX:.',HOF,' ' db ' This byte tells CONCAT when it',CR,LF db 'has reached the end of auxiliary input. CONCAT also ' db 'sends this character',CR,LF db 'at the end of redirected auxiliary output. The default ' db ' is ^Z (1Ah), the',CR,LF db 'normal CP/M end-of-file character. If you have a special ' db 'need, any other',CR,LF db 'character from 00h to FFh can be entered here.' db CR,LF ; db 0 ; terminator ; ; Help for menu B ; HelpB: db CR,LF ; db 'CONFIGURABLE STRINGS: When changing the following ' db ' strings, a carriage',CR,LF db 'return ends input. To enter a carriage return and line ' db 'feed sequence into',CR,LF db 'the string, use the ECHO-type escape sequence ' db '"^M^J". Other control',CR,LF db 'characters can be entered the same way. A delete character ' db 'can be entered',CR,LF db 'with "%D", a carat with "%^", and a percent sign ' db 'with "%%". It is not',CR,LF db 'necessary to use the "%<" and "%>" sequences for ' db 'upper- and lower-case',CR,LF db 'because characters will be printed in the same case they ' db 'are entered.' db CR,LF,LF ; db HON,'Option P -- Date and time prefix.',HOF,' If the ' db 'command line "D" option is used,',CR,LF db 'this string is output just before the date and time. ' db ' Up to 20 characters',CR,LF db 'are accepted.' db CR,LF,LF ; db HON,'Option S -- Date and time suffix.',HOF,' If the ' db 'command line "D" option is used,',CR,LF db 'this string is output just after the date and time. ' db ' Up to 20 characters',CR,LF db 'are accepted.' db CR,LF,LF ; db HON,'Option I -- Default divider insert.',HOF,' If ' db ' the command line "I" option is',CR,LF db 'used, but it is not followed by a divider string, then ' db 'this default divider',CR,LF db 'string is output between each concatenated or appended ' db ' file. Up to 76',CR,LF db 'characters are accepted.' db CR,LF ; db 0 ; terminator ; end