; JUSTCF.Z80 ; ; ZCNFG configuration module for JUSTIFY.COM. The assembled version of ; this file must be named JUSTxx.CFG, where xx is the version number ; of JUSTIFY, to be automatically recognized by ZCNFG. ; ; Version 1.1 -- September 30, 1991 -- Gene Pizzetta ; For JUSTIFY 1.3, added progress report option. ; ; Version 1.0 -- August 31, 1991 -- Gene Pizzetta ; For JUSTIFY 1.1. ; ; Patch locations . . . ; ColDft equ 015h ; line width SpcFlg equ 016h ; lines beginning with space LngFlg equ 017h ; lines regardless of length FFFlag equ 018h ; retain embedded form feeds QtFlag equ 019h ; quiet mode LinFlg equ 01Ah ; progress reports ; ; 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 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 C, DecRad, ColDft, 1, ScrnA1, ColRge CaseA2: CASE S, ToglTF, SpcFlg, 1, ScrnA2, YesNo CASE L, ToglTF, LngFlg, 1, ScrnA3, YesNo CASE F, ToglTF, FFFlag, 1, ScrnA4, YesNo CASE Q, ToglTF, QtFlag, 1, ScrnA5, YesNo CASE P, ToglTF, LinFlg, 1, ScrnA6, NoYes 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 ColRge: dw 0 ; Min dw 255 ; Max ; ; Screen image section . . . ; ScrnA: db cr,lf,lf,tab,tab,tab,' JUSTIFY Installation Menu' db cr,lf,lf,lf ; db tab,tab,'(C) ',1,'Default right margin column . . . . . ',2 ScrnA1: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(S) ',1,'Justify lines starting with space? . ',2 ScrnA2: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(L) ',1,'Justify lines regardless of length? . ',2 ScrnA3: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(F) ',1,'Retain form feeds? . . . . . . . . . ',2 ScrnA4: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(Q) ',1,'Default to quiet mode? . . . . . . . ',2 ScrnA5: db ' ' ; current value db cr,lf,lf ; db tab,tab,'(P) ',1,'Show line count progress reports? . . ',2 ScrnA6: db ' ' ; current value db cr,lf ; db lf,lf ; fill rest of screen ; db 0 ; terminator ; ; Help screen section . . . ; HelpA: db CR,LF ; db HON,'Option C',HOF,' -- Right margin column. This is the ' db 'column number that JUSTIFY',CR,LF db 'will use when filling a line with spaces. The value entered ' db 'can be changed',CR,LF db 'on the command line.' db CR,LF,LF ; db HON,'Option S',HOF,' -- Justify lines beginning with a space. ' db ' Setting this option to',CR,LF db '"Yes" allows justification of indented paragraphs without ' db ' using the "]"',CR,LF db 'special character in the text file. The default selected ' db 'can be changed',CR,LF db 'with the command line "S" option.' db CR,LF,LF ; db HON,'Option L',HOF,' -- Justify lines regardless of length. ' db ' Normally lines are filled',CR,LF db 'only if they can be justified using two spaces or less between ' db ' each word.',CR,LF db 'If you want all lines filled, regardless of the number of ' db 'spaces it takes,',CR,LF db 'enter "Yes" here. The default selected can be changed ' db 'with the command',CR,LF db 'line "L" option.' db CR,LF,LF ; db HON,'Option F',HOF,' -- Retain form feeds. If this option ' db 'is "No", form feeds will be',CR,LF db 'removed from the file just like any other control character. ' db ' If you want',CR,LF db 'form feeds preserved, set this option to "Yes". The default ' db 'selected can',CR,LF db 'be changed with the command line "F" option.' db CR,LF,LF ; db ':',CR,LF db HON,'Option Q',HOF,' -- Quiet mode. This option determines ' db 'whether JUSTIFY will be in',CR,LF db 'verbose or quiet mode by default (that is, if the quiet flag ' db 'is off -- the',CR,LF db 'quiet flag is always observed). The default, including the ' db 'quiet flag, may',CR,LF db 'be toggled by using the command line "Q" option.' db CR,LF,LF ; db HON,'Option P',HOF,' -- Progress Reports. Normally JUSTIFY ' db ' displays a running line',CR,LF db 'count while it is working. This report can be suppressed ' db ' by selecting',CR,LF db '"No".' db CR,LF ; db 0 ; Terminator ; end