; LDCF.Z80 ; ; ZCNFG configuration module for LD.COM. The assembled version of ; this file must be named LDxx.CFG, where xx is the version number ; of LD, to be automatically recognized by ZCNFG. ; ; Version 1.2 -- February 7, 1992 -- Gene Pizzetta ; For LD 1.3. Added options A and O to first menu page and ; option O to second menu page. Changed help screens to match. ; ; Version 1.1 -- October 11, 1991 -- Gene Pizzetta ; For LD 1.1. Changed menu options D to 1, T to 2, S to 4, and ; Q to S. Added menu options X, D, Q, M, R, 3, and 5. Divided ; into 2 menu pages. ; ; Version 1.0 -- October 7, 1991 -- Gene Pizzetta ; For LD 1.0. ; ; Patch locations . . . ; SrtFlg equ 015h ; sort member names CmtFlg equ 016h ; embedded comments SumFlg equ 017h ; summary only PrfFlg equ 018h ; date preference PagFlg equ 019h ; screen paging LstFlg equ 01Ah ; printer echo FFFlag equ 01Bh ; form feed OutFlg equ 01Ch ; file output XFlag equ 01Dh ; alternate display QtFlag equ 01Eh ; quiet mode MemFlg equ 01Fh ; store to memory OutDir equ 020h ; file output directory MemReg equ 021h ; message registers DatFlg equ 022h ; date format TimFlg equ 023h ; time format EmbChr equ 024h ; date stamp flag character MaxLns equ 025h ; screen lines WhlAdr equ 026h ; wheel address (2 bytes) ; ; 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 ; Entry for menu A MenuB: dw MenuA, MenuA, ScrnB, CaseB, HelpB ; Entry for menu B ; ; Case table section . . . ; ; 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 below. ; ; First menu screen ; CaseA: db (CaseAX-CaseA1)/(CaseA2-CaseA1) ; number of cases db CaseA2-CaseA1 ; length of each record ; CaseA1: CASE A, ToglTF, SrtFlg, 1 ScrnA0, YesNo CaseA2: CASE C, ToglTF, CmtFlg, 1, ScrnA1, YesNo CASE X, ToglTF, XFlag, 1, ScrnA2, YesNo CASE D, ToglTF, PrfFlg, 1, ScrnA3, YesNo CASE S, ToglTF, SumFlg, 1, ScrnA4, YesNo CASE P, ToglTF, PagFlg, 1, ScrnA5, YesNo CASE Q, ToglTF, QtFlag, 1, ScrnA6, YesNo CASE M, ToglTF, MemFlg, 1, ScrnA7, YesNo CASE L, ToglTF, LstFlg, 1, ScrnA8, YesNo CASE F, ToglTF, FFFlag, 1, ScrnA9, YesNo CASE O, ToglTF, OutFlg, 1, ScrnAA, YesNo CaseAX: ; for calculation of list length ; ; Second menu screen ; CaseB: db (CaseBX-CaseB1)/(CaseB2-CaseB1) ; number of cases db CaseB2-CaseB1 ; length of each record ; CaseB1: CASE O, ToglTF, OutDir, 1, ScrnB0, DftTgt CaseB2: CASE R, DecRad, MemReg, 1 ScrnB1, RegRng CASE D, ToglTF, DatFlg, 1, ScrnB2, AmrEur CASE T, ToglTF, TimFlg, 1, ScrnB3, CivMil CASE F, TextLC, EmbChr, 1, ScrnB4, 0 CASE S, DecRad, MaxLns, 1, ScrnB5, ScnRng CASE W, HexRad, WhlAdr, 2, ScrnB6, WhlRng CaseBX: ; for calculation of list length ; ; Case table support . . . ; YesNo: db 'Yes',0 ; displayed if value is FFh (ToglTF) db ' No',0 ; displayed if value is 00h (ToglTF) AmrEur: db 'European',0 db 'American',0 CivMil: db 'Military',0 db 'Civilian',0 DftTgt: db 'Target',0 db 'Logged',0 RegRng: dw 0 ; minimum register number dw 28 ; maximum ScnRng: dw 1 ; minimum screen lines dw 255 ; maximum WhlRng: dw 0000h ; minimum address dw 0FFFFh ; maximum ; ; Screen image section . . . ; ; First menu screen ; ScrnA: db cr,lf,tab,tab,tab,' LD Configuration Menu' db cr,lf,tab,tab,tab,1,' (Screen 1 of 2)',2 db cr,lf,lf,tab,tab,tab,' Command Line Defaults' db cr,lf,lf ; db tab,tab,'(A) ',1,'Sort member names alphabetically? . . ',2 ScrnA0: db ' ' ; current value db cr,lf ; db tab,tab,'(C) ',1,'Print embedded comments by default? . ',2 ScrnA1: db ' ' ; current value db cr,lf ; db tab,tab,'(X) ',1,'Print CRC''s and indexes by default? . ',2 ScrnA2: db ' ' ; current value db cr,lf ; db tab,tab,'(D) ',1,'Prefer crunched file embedded date . ',2 ScrnA3: db ' ' ; current value db cr,lf ; db tab,tab,'(S) ',1,'Default to summary only? . . . . . . ',2 ScrnA4: db ' ' ; current value db cr,lf ; db tab,tab,'(P) ',1,'Page screen by default? . . . . . . . ',2 ScrnA5: db ' ' ; current value db cr,lf ; db tab,tab,'(Q) ',1,'Default to quiet mode? . . . . . . . ',2 ScrnA6: db ' ' ; current value db cr,lf ; db tab,tab,'(M) ',1,'Store to registers by default? . . . ',2 ScrnA7: db ' ' ; current value db cr,lf ; db tab,tab,'(L) ',1,'Echo to printer by default? . . . . . ',2 ScrnA8: db ' ' ; current value db cr,lf ; db tab,tab,'(F) ',1,'Final form feed by default? . . . . . ',2 ScrnA9: db ' ' ; current value db cr,lf ; db tab,tab,'(O) ',1,'Output member names to file? . . . . ',2 ScrnAA: db ' ' ; current value db cr,lf ; db lf ; fill rest of screen ; db 0 ; terminator ; ; Second menu screen ; ScrnB: db cr,lf,tab,tab,tab,' LD Configuration Menu' db cr,lf,tab,tab,tab,1,' (Screen 2 of 2)',2 db cr,lf,lf,tab,tab,tab,' Permanent Options' db cr,lf,lf ; db tab,tab,'(O) ',1,'Output directory for DIR file . . ',2 ScrnB0: db ' ' ; current value db cr,lf db tab,tab,'(R) ',1,'First message register to use . . . . ',2 ScrnB1: db ' ' ; current value db cr,lf ; db tab,tab,'(D) ',1,'Date format . . . . . . . . . . .',2 ScrnB2: db ' ' ; current value db cr,lf ; db tab,tab,'(T) ',1,'Time format . . . . . . . . . . .',2 ScrnB3: db ' ' ; current value db cr,lf ; db tab,tab,'(F) ',1,'Flag character for embedded dates . . . ',2 ScrnB4: db ' ' ; current value db cr,lf ; db cr,lf,tab,tab,tab,' For Non-ZCPR3 Systems' db cr,lf,lf ; db tab,tab,'(S) ',1,'Number of screen lines . . . . . . . ',2 ScrnB5: db ' ' ; current value db cr,lf ; db tab,tab,'(W) ',1,'Wheel byte address . . . . . . . . ',2 ScrnB6: db ' h' ; current value db cr,lf ; db lf,lf,lf ; fill rest of screen ; db 0 ; terminator ; ; Help screen section . . . ; HelpA: db CR,LF,LF ; db 'COMMAND LINE DEFAULTS: All command line options are ' db 'toggles. The A, C, X,',CR,LF db 'S, D, P, Q, M, L, F, and O configuration options can ' db 'be toggled on or off',CR,LF db 'by the corresponding command line options, depending ' db ' on the defaults',CR,LF db 'chosen. Most options are probably not desirable as ' db 'defaults, but they''re',CR,LF db 'here just in case.' db CR,LF,LF ; db HON,'Option A -- Alphabetic sort.',HOF,' If you would ' db ' prefer member files to be',CR,LF db 'displayed in the order they appear in the library, select ' db '"No". Otherwise,',CR,LF db 'the display (and the output file, if any) will be sorted ' db ' alphabetically by',CR,LF db 'default.' db CR,LF,LF ; db HON,'Option C -- Embedded comments.',HOF,' Some crunched ' db ' files have a text comment',CR,LF db 'embedded in their headers. The vast majority of ' db 'embedded comments are',CR,LF db 'insignificant at best, so most people will not want to ' db 'see them except when',CR,LF db 'requested with the command line "C" option. Nevertheless, ' db 'if you want to',CR,LF db 'see the comments by default choose "Yes" here.' db CR,LF ; db ':',CR,LF db 'COMMAND LINE DEFAULTS (continued):' db CR,LF,LF ; db HON,'Option X -- Alternate display.',HOF,' If "Yes" ' db ' is selected, two library member',CR,LF db 'filenames will be displayed per line with their CRC''s ' db 'and indexes. If "No"',CR,LF db 'is selected, each line displays a single member with ' db ' its date stamps,',CR,LF db 'uncompressed name, and (optionally) its embedded comment.' db CR,LF,LF ; db HON,'Option D -- Date stamp preference.',HOF,' LD ' db 'normally looks first for a date',CR,LF db 'stamp in the library''s directory. If no stamp is found ' db ' there, it checks',CR,LF db 'the headers of crunched files to see if there is an ' db 'embedded date stamp.',CR,LF db 'If "Yes" is selected here, LD will check for an embedded ' db 'date stamp first',CR,LF db 'and will use the directory stamp only if no embedded ' db 'stamp is found or if',CR,LF db 'the member file is not crunched.' db CR,LF,LF ; db HON,'Option S -- Summary only.',HOF,' This option ' db 'determines whether LD defaults to',CR,LF db 'printing only the final summary line. That can ' db 'be quite useful, but',CR,LF db 'probably not as the default.' db CR,LF ; db ':',CR,LF db 'COMMAND LINE DEFAULTS (continued):' db CR,LF,LF ; db HON,'Option P -- Screen paging.',HOF,' If you want ' db 'LD to pause each time the screen',CR,LF db 'fills, set this option to "Yes". If you''re an Evelyn ' db 'Wood alumnus, on the',CR,LF db 'other hand, you might want to select "No" so continuous ' db 'scrolling is the',CR,LF db 'default. With continuous scrolling you can still pause ' db 'the screen with ^S',CR,LF db 'or by using the command line "P" option. (Screen ' db 'paging is always off',CR,LF db 'during printer output and quiet mode.)' db CR,LF,LF ; db HON,'Option Q -- Quiet mode.',HOF,' This option determine' db 's whether LD will be in',CR,LF db 'verbose or quiet mode by default. (Yes, LD has a quiet ' db ' mode!) In quiet',CR,LF db 'mode only error messages are displayed, which is sometimes ' db 'useful with the',CR,LF db 'M and L options, but nobody would want quiet mode ' db 'as the default. If',CR,LF db 'you''re nobody, select "Yes".' db CR,LF,LF ; db HON,'Option M -- Store results to memory.',HOF,' LD ' db ' can store the number of matching',CR,LF db 'member files and the number of free library directory ' db ' entries to message',CR,LF db 'registers. A "Yes" makes this the default; otherwise, ' db 'the command line "M"',CR,LF db 'option is required.' db CR,LF ; db ':',CR,LF db 'COMMAND LINE DEFAULTS (continued):' db CR,LF,LF ; db HON,'Option L -- Printer echo.',HOF,' Printer (LST:) ' db ' output is only allowed if the',CR,LF db 'wheel byte is on. Normally you won''t want this as ' db 'the default, but it''s',CR,LF db 'here just in case.' db CR,LF,LF ; db HON,'Option F -- Form feed printer.',HOF,' LD can be ' db 'configured to always send a form',CR,LF db 'feed by default after a library directory is sent to ' db 'the printer if "Yes"',CR,LF db 'is selected. A "No" means that a final form feed ' db 'will only be output if',CR,LF db 'the command line "F" option is used.' db CR,LF,LF ; db HON,'Option O -- File output.',HOF,' "Yes" means that ' db ' matching member names will be',CR,LF db 'output to a disk file by default. Unless you have some ' db 'special need, this',CR,LF db 'selection should normally be "No".' db CR,LF db 0 ; terminator ; HelpB: 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 O -- File output directory.',HOF,' LD will ' db ' write its library DIR file to',CR,LF db 'the currently logged (default) directory or to the ' db 'target directory (the',CR,LF db 'one containing the library file), 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 R -- Message registers.',HOF,' When storing ' db 'the results to memory, LD uses',CR,LF db 'four consecutive message registers. The available registers ' db 'are numbered 0',CR,LF db 'to 31. The register selected here will be the lowest ' db 'one used, so the',CR,LF db 'highest register number available is 28, which will ' db ' use through register',CR,LF db '31. Other programs (notably ZDE) use message registers,' db ' so make your',CR,LF db 'selection based on register usage by other programs you ' db 'commonly run.' db CR,LF,LF ; db HON,'Option D -- Date format.',HOF,' The created and ' db 'modified dates of libraries and',CR,LF db 'their member files can be displayed in either "American" ' db ' (mm/dd/yy) or',CR,LF db '"European" (dd.mm.yy) formats. It''s your choice.' db CR,LF ; db ':',CR,LF db 'PERMANENT OPTIONS (continued):' db CR,LF,LF ; db HON,'Option T -- Time format.',HOF,' The created and ' db 'modified times of libraries and',CR,LF db 'their member files can be displayed in either "Civilian" ' db ' format (12-hour',CR,LF db 'time, e.g., "3:21p") or "Military" format (24-hour ' db 'time, e.g., "15:21"),',CR,LF db 'whichever you prefer.' db CR,LF,LF ; db HON,'Option F -- Embedded date flag character.',HOF,' ' db ' The flag character selected here',CR,LF db 'is printed between the date and time if it came from ' db 'an embedded stamp in',CR,LF db 'the header of a crunched file. Any printable character ' db ' can be selected,',CR,LF db 'such as "-", "=", "*", "^", or "~". If you do not want ' db 'a flag displayed at',CR,LF db 'all, enter a space character.' db CR,LF ; db ':',CR,LF db 'FOR NON-ZCPR3 SYSTEMS: The following permanent options ' db 'are ignored when',CR,LF db 'running under ZCPR3.' db CR,LF,LF ; db HON,'Option S -- Number of screen lines.',HOF,' Enter ' db ' the number of lines on your',CR,LF db 'screen. You can enter any decimal number from 1 to ' db ' 255. This option is',CR,LF db 'only for vanilla CP/M systems. Under ZCPR3 the number ' db 'of screen lines is',CR,LF db 'obtained from the environment.' db CR,LF,LF ; db HON,'Option W -- Wheel byte address.',HOF,' For vanilla ' db ' CP/M remote systems that',CR,LF db 'maintain a wheel byte, enter the address of that ' db ' byte here as four',CR,LF db 'hexadecimal characters. If a wheel byte is not maintaine' db 'd, the address',CR,LF db 'should be "0000". Under ZCPR3 the address of the ' db 'wheel byte is obtained',CR,LF db 'from the environment.' db CR,LF ; db 0 ; terminator ; end