home *** CD-ROM | disk | FTP | other *** search
- ; CRUNCHCF.Z80
- ;
- ; ZCNFG configuration module for CRUNCH.COM and UNCR.COM. The assembled
- ; version of this file must be named CRUNCHxx.CFG, where xx is the version
- ; number of CRUNCH and UNCR, to be automatically recognized by ZCNFG.
- ;
- ; Version 1.0 -- March 16, 1991 -- Gene Pizzetta
- ; For CRUNCH/UNCR 2.5.
- ;
- ; The help screens were prepared as a CRUNCHCF.TXT text file, justified
- ; to 75 columns using Irv Hoff's JUS, and converted to code with TEXT2DB.
- ;
- ; Patch locations . . .
- ;
- Archiv equ 015h ; archive mode (CRUNCH)
- QuiFl equ 016h ; quiet mode
- NProFl equ 017h ; overwrite prompt flag
- TrboFl equ 018h ; multisector flag
- CnfrFl equ 019h ; tag mode
- WrmFlg equ 01Ah ; warm boot flag
- BigFlg equ 01Bh ; bigger file prompt flag (CRUNCH)
- MaxUsr equ 01Ch ; { maximum user
- MaxDrv equ 01Dh ; { maximum drive
- SysFl equ 01Eh ; system file inclusion flag
- TypFl equ 01Fh ; default filetype (UNCR)
- ;
- ExTbl0 equ 020h ; filetype exclusion table (CRUNCH)
- ExTbl1 equ 023h
- ExTbl2 equ 026h
- ExTbl3 equ 029h
- ExTbl4 equ 02Ch
- ExTbl5 equ 02Fh
- ExTbl6 equ 032h
- ExTbl7 equ 035h
- ExTbl8 equ 038h
- ExTbl9 equ 03Bh
- ;
- ; 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 ; single menu
- MenuB: dw MenuA, MenuA, ScrnB, CaseB, HelpB
- ;
- ; 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, QtFlag, 1, ScrnA1, NoYes
- ; |
- ; Address of data used by function
- ;
- ; The first two entries in table are labeled for calculation at CaseA:.
- ;
- CaseA1: CASE 1, ToglTF, QuiFl, 1, ScrnA1, YesNo
- CaseA2: CASE 2, ToglTF, SysFl, 1, ScrnA2, YesNo
- CASE 3, ToglTF, NProFl, 1, ScrnA3, YesNo
- CASE 4, ToglTF, BigFlg, 1, ScrnA4, YesNo
- CASE 5, ToglTF, CnfrFl, 1, ScrnA5, YesNo
- CASE 6, ToglTF, Archiv, 1, ScrnA6, YesNo
- CASE 7, ToglTF, WrmFlg, 1, ScrnA7, YesNo
- CASE 8, ToglTF, TrboFl, 1, ScrnA8, YesNo
- CASE D, DuSpec, MaxUsr, 1, ScrnAD, 0
- CASE T, Text, TypFl, 1, ScrnAT, 0
- ;
- CaseAX: ; for calculation of list length
- ;
- CaseB: db (CaseBX-CaseB1)/(CaseB2-CaseB1) ; number of cases
- db CaseB2-CaseB1 ; length of each record
- ;
- CaseB1: CASE A, Text, ExTbl0, 3, ScrnBA, 0
- CaseB2: CASE B, Text, ExTbl1, 3, ScrnBB, 0
- CASE C, Text, ExTbl2, 3, ScrnBC, 0
- CASE D, Text, ExTbl3, 3, ScrnBD, 0
- CASE E, Text, ExTbl4, 3, ScrnBE, 0
- CASE F, Text, ExTbl5, 3, ScrnBF, 0
- CASE G, Text, ExTbl6, 3, ScrnBG, 0
- CASE H, Text, ExTbl7, 3, ScrnBH, 0
- CASE I, Text, ExTbl8, 3, ScrnBI, 0
- CASE J, Text, ExTbl9, 3, ScrnBJ, 0
- ;
- CaseBX:
- ;
- ; Case table support . . .
- ;
- YesNo: db 'YES',0 ; displayed if value is FFh (ToglTF)
- db ' NO',0 ; displayed if value is 00h (ToglTF)
- ;
- ; Screen image section . . .
- ;
- ScrnA: db cr,lf,lf,tab,tab,tab,'CRUNCH/UNCR Installation Menu'
- db cr,lf
- db tab,tab,tab,tab,1,'(Page 1 of 2)',2
- db cr,lf,lf
- ;
- db tab,tab,'(1) ',1,'Default to quiet mode? . . . . . . . ',2
- ScrnA1: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(2) ',1,'Include System files? . . . . . . . . ',2
- ScrnA2: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(3) ',1,'Erase existing files without asking? ',2
- ScrnA3: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(4) ',1,'Keep larger files without asking? . . ',2
- ScrnA4: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(5) ',1,'Default to Tag mode? . . . . . . . . ',2
- ScrnA5: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(6) ',1,'Default to Archive mode? . . . . . . ',2
- ScrnA6: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(7) ',1,'Warm boot on exit? . . . . . . . . . ',2
- ScrnA7: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(8) ',1,'Suppress multi-sector disk I/O? . . . ',2
- ScrnA8: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(D) ',1,'Maximum drive and user (DU) . . . . . ',2
- ScrnAD: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,'(T) ',1,'Default filetype (Z, Y, or Q) . . . . ?',2
- ScrnAT: db ' ',1,'?',2 ; current value
- db cr,lf
- ;
- db lf,lf,lf ; fill rest of screen
- ;
- db 0 ; terminator
- ;
- ScrnB: db cr,lf,lf,tab,tab,' CRUNCH Filetype Exclusion List'
- db cr,lf
- db tab,tab,tab,1,' (Page 2 of 2)',2
- db cr,lf,lf
- ;
- db tab,tab,tab,'(A)',1,' . . . . . . . . . . ',2
- ScrnBA: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(B)',1,' . . . . . . . . . . ',2
- ScrnBB: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(C)',1,' . . . . . . . . . . ',2
- ScrnBC: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(D)',1,' . . . . . . . . . . ',2
- ScrnBD: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(E)',1,' . . . . . . . . . . ',2
- ScrnBE: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(F)',1,' . . . . . . . . . . ',2
- ScrnBF: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(G)',1,' . . . . . . . . . . ',2
- ScrnBG: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(H)',1,' . . . . . . . . . . ',2
- ScrnBH: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(I)',1,' . . . . . . . . . . ',2
- ScrnBI: db ' ' ; current value
- db cr,lf
- ;
- db tab,tab,tab,'(J)',1,' . . . . . . . . . . ',2
- ScrnBJ: db ' ' ; current value
- db cr,lf
- ;
- db lf,lf
- ;
- db 0 ; terminator
- ;
- ; Help screen section . . .
- ;
- HelpA: db CR,LF
- ;
- db HON,'Option 1',HOF,' -- Quiet mode. "YES" causes CRUNCH '
- db 'and UNCR to default to quiet',CR,LF
- db 'mode, with only the filenames displayed as the file '
- db 'is uncrunched or',CR,LF
- db 'crunched. The Q command line option toggles the default '
- db 'mode chosen here.'
- db CR,LF,LF
- ;
- db HON,'Option 2',HOF,' -- Include System files. "NO" causes '
- db ' CRUNCH and UNCR to filter',CR,LF
- db 'out system (hidden) files as it reads the directory. If "YES" '
- db 'is selected,',CR,LF
- db 'system files will be included. The default can be toggled '
- db ' with the S',CR,LF
- db 'command line option.'
- db CR,LF,LF
- ;
- db HON,'Option 3',HOF,' -- Overwrite without prompt. "YES" causes '
- db 'existing files with the',CR,LF
- db 'same name in the destination directory to be erased and overwritten '
- db 'without',CR,LF
- db 'notice by CRUNCH and UNCR. If "NO" is chosen, you will be '
- db 'prompted before',CR,LF
- db 'files are erased. The E command line option toggles the default.'
- db CR,LF,LF
- ;
- db HON,'Option 4',HOF,' -- Bigger File. "NO" will cause CRUNCH '
- db 'to ask "Result file larger',CR,LF
- db 'than original, keep it anyway?". If "YES" is selected, '
- db 'the question will',CR,LF
- db 'not be asked and the resulting file will always be kept. '
- db 'This question is',CR,LF
- db 'asked only when the source and destination directories are '
- db 'the same. This',CR,LF
- db 'configuration option has no effect on UNCR.'
- db CR,LF,LF,LF,LF
- ;
- db HON,'Option 5',HOF,' -- Inspect (Tag) mode. "YES" causes CRUNCH '
- db 'and UNCR to default to',CR,LF
- db 'Tag mode. The default is toggled by the I and T command line '
- db 'options.'
- db CR,LF,LF
- ;
- db HON,'Option 6',HOF,' -- Archive mode. "YES" causes CRUNCH '
- db ' to default to Archive',CR,LF
- db '"backup" mode. The default can be toggled by the A command '
- db ' line option.',CR,LF
- db 'This configuration option has no effect on UNCR.'
- db CR,LF,LF
- ;
- db HON,'Option 7',HOF,' -- Warm boot. "NO" is the correct selection '
- db 'in most cases. "YES"',CR,LF
- db 'causes a warm boot each time CRUNCH and UNCR exit to the '
- db 'operating system,',CR,LF
- db 'and is included for systems which do not allow the CCP to '
- db ' remain resident.'
- db CR,LF,LF
- ;
- db HON,'Option 8',HOF,' -- Turbo-DOS. "YES" turns off multi-sector '
- db 'disk I/O for CP/M 3.0-',CR,LF
- db 'compatible systems, like TurboDOS, which don''t support that '
- db 'method. Multi-',CR,LF
- db 'sector I/O is never used under CP/M 2.2, so this configuration '
- db 'option is',CR,LF
- db 'not significant.'
- db CR,LF,LF,LF,LF,LF,LF,LF,LF
- ;
- db HON,'Option D',HOF,' -- Maximum drive and user allowed. '
- db 'This configuration option is',CR,LF
- db 'only effective under vanilla CP/M systems and for user '
- db ' areas under 15.',CR,LF
- db 'User areas above 15 cannot be accessed when CRUNCH and UNCR '
- db 'are run under',CR,LF
- db 'CP/M. Under ZCPR3 all 32 user areas are available and the '
- db 'CPR is used to',CR,LF
- db 'parse the file specifications, so this option has no effect. '
- db ' If you wish,',CR,LF
- db 'you can enter a DU specification here, which will become the '
- db ' maximum drive',CR,LF
- db 'and user available under CP/M.'
- db CR,LF,LF
- ;
- db HON,'Option T',HOF,' -- Default filetype. This UNCR option '
- db 'is used only when files are',CR,LF
- db 'uncrunched or unsqueezed to and from the same drive and user. '
- db ' In that case',CR,LF
- db 'a wildcard filetype ("*") will default to files with the '
- db 'character entered',CR,LF
- db 'here as the middle character of their filetype. Normally, '
- db ' for crunched',CR,LF
- db 'files this option should be "Z". If you use UNCR more often '
- db 'to decompress',CR,LF
- db 'squeezed or LZH-encoded files, enter "Q" or "Y". This option '
- db 'is not used',CR,LF
- db 'by CRUNCH.'
- db CR,LF
- ;
- db 0 ; Terminator
- ;
- HelpB: db CR,LF
- ;
- db ' ',HON,'FILETYPE EXCLUSION LIST',HOF,CR,LF
- db ' (For CRUNCH only)'
- db CR,LF,LF
- ;
- db 'You may enter up to 10 three-letter filetypes to be ignored '
- db 'by CRUNCH.',CR,LF
- db 'When these filetypes are encountered, no attempt will be made '
- db 'to crunch the',CR,LF
- db 'files unless they are explicitly specified on the command '
- db 'line. Instead',CR,LF
- db 'they will be copied (if the destination is a different '
- db 'directory) or',CR,LF
- db 'ignored (if the source and destination directories are '
- db 'the same). The',CR,LF
- db 'defaults already installed are "ARC", "ARK", "LBR", and "FOR".'
- db CR,LF,LF
- ;
- db 'It is not necessary to add ?Z? or ?Q? to the list because '
- db 'CRUNCH will',CR,LF
- db 'recognize squeezed and crunched files automatically '
- db 'by reading their',CR,LF
- db 'headers.'
- db CR,LF,LF
- ;
- db 'All the filetypes must be filled in. To eliminate a '
- db 'filetype from the',CR,LF
- db 'list, simply overwrite it with a repeat of one of the '
- db ' others, such as',CR,LF
- db '"ARK", that you don''t want crunched.'
- db CR,LF,LF
- ;
- db 'UNCR does not use this exclusion list.'
- db CR,LF
- ;
- db 0 ; Terminator
- ;
- end