; ; PRNTXTCF.Z80 - JTH 10/05/91 ; (from ZCNFGCFG.SRC) ; ;--------------------------------------------------------- vers equ 16 ;version number ; Patch offsets lstchk equ 3 ; BIOS list stat flag control equ 4 ; Control character flag printer equ 5 ; Printer switch flag page equ 6 ; Paging flag maxline equ 7 ; Maximum lines/screen pchr equ 8 ; Parameter character casesw equ 9 ; Case switch lcsw equ 0ah ; Lower case switch ucsw equ 0bh ; Upper case switch cfg equ 0dh ; ZCNFG default filename ;--------------------------------------------------------- ;DATA FOR CNFG PROGRAM LINKAGE ;function definitions - **needed for CASE Table entries** switch equ 0 ;toggle bit n in a byte (n is specified) text equ 1 ;replace a text string of specified length 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 string in upper or lower case togl3 equ 7 ;toggle to one of three options: 001B, 010B, 100B togltf equ 8 ;toggle a byte between 0ffh and 0 filesp equ 9 ;change d, du, fn.ft, or du:fn.ft ;ASCII definitions ;these are convenient, but only required if you wish ;to use them in text or data fields (including HELP) ctlc equ 3 bs equ 8 ;backspace tab equ 9 ;horizontal tab lf equ 10 ;line feed ff equ 12 ;form feed cr equ 13 ;carriage return spc equ 20h ;space char ;========================================================= ; MACRO DEFINITIONS ;You don't HAVE to use the macros. But it does make it ;easier to fill in the tables! ;this macro is used for creating a CASE table ;entry which specifies toggling or setting a ;single bit (0..7) in a configuration data byte. ;It is useful when the 'switch' function is named. bitmap macro a,sub,off,bit,scr,dat db '&A' dw sub,off db 1 shl bit ;;make a mask byte dw scr,dat endm ;========================================================= ;macro parameter definitions ; A = the character used in the screen for a menu item ; off = byte offset in config block ; sub = subroutine for translation to screen ; scr = screen location ; dat = extra data word if required. Normally 0 ;produces a record which is 8 bytes long ;========================================================= ;this macro is used to create a case table entry ;which contains a byte of data required by the function ;to be performed. (see table of function definitions above) vector macro a,sub,off,byte,scr,dat db '&A' dw sub,off db byte ;;a byte of data dw scr,dat endm ;************************************************************ ; START OF OVERLAY CODE ;************************************************************ ;The next 13 bytes must remain in this location. rst 0 ;for safety - file won't execute dw amenu ;for relocation of addresses, this ;points to the NEXT location. ;first MENU list must be here. All names are local. amenu: dw amenu,amenu,ascrn,acase,ahelp ;MENU A ;========================================================= ;Case table used, first menu & screen: ;========================================================= acase: db (acasex-acase1)/(acase2-acase1) ;number of cases db acase2-acase1 ;length of each record ; macro .single char menu selector ; | | .function (see above) ; | | | .offset in cnfg block ; | | | | .function dependent data ; | | | | | .screen location ; | | | | | | ;acse1: bitmap 0, switch, obyte0, crtflg, ascrl0, yndata ; | ; address of data structure used by function._| ; ;The first two entries in the case table must be labeled to ;provide data for the calculation at ACASE:. Subsequent ;entries (one for each menu selection) need not be labeled. acase1: vector a, text, cfg, 8, ascra, 0 acase2: vector b, togltf, lstchk, 1, ascrb, yndata vector c, decrad, maxline, 1, ascrc, decrang vector d, text, control, 1, ascrd, 0 vector e, text, printer, 1, ascre, 0 vector f, text, page, 1, ascrf, 0 vector g, text, pchr, 1, ascrg, 0 vector h, text, casesw, 1, ascrh, 0 vector i, text, lcsw, 1, ascri, 0 vector j, text, ucsw, 1, ascrj, 0 ;the next entry is a label which terminates the list. ;It is required for use in the calculation at ACASE: acasex: ;label used to calc number of entries ;========================================================= ascrn: ;screen image for first screen ;db cr,lf ;ensure clean top of screen ;Title line db cr,lf db tab,tab,tab,1,' PRNTXT VERS ',vers/10+'0','.',vers mod 10+'0' db ' DEFAULTS ',2 db cr,lf,lf db tab,tab db 'Default CFG filename (FILENAME).... A) ' ascra: db ' ' db cr,lf,tab,tab db 'Do BIOS LISTST printer check....... B) ' ascrb: db ' ',cr,lf,tab,tab db 'Number of lines per screen page.... C)' ascrc: db ' ',cr,lf,lf,tab,tab db 'Message characters used as flags:',cr,lf,tab,tab db '======================================' db cr,lf,tab,tab db 'Control character flag............. D) ' ascrd: db ' ',cr,lf,tab,tab db 'Printer/text toggle................ E) ' ascre: db ' ',cr,lf,tab,tab db 'Page the screen display............ F) ' ascrf: db ' ',cr,lf,tab,tab db 'Include a command line token....... G) ' ascrg: db ' ',cr,lf,tab,tab db 'Text case change flag.............. H) ' ascrh: db ' ',cr,lf,tab,tab db ' Change text to lower case........ I) ' ascri: db ' ',cr,lf,tab,tab db ' Change text to upper case........ J) ' ascrj: db ' ' db 0 ;terminator ;----------------------------------- ; FUNCTION DATA LIST ;data pair for representing bit values in screen image ;Can also be used for function 8 display (True/False) ;these are null terminated strings. Note the 'DZ'. decrang: dw 0,99 ;min/max margin yndata: db 'YES',0 db 'NO ',0 ;========================================================= ahelp: ;help screen for menu A db cr,lf db tab,tab,01h,' PRNTXT VERS ' db vers/10+'0','.',vers mod 10+'0' db 'DEFAULTS ',02h,cr,lf,lf db 01h,'DEFAULT CFG FILENAME:',02h,cr,lf db 'Enter the desired default CFG filename in the form ''FILENAME''' db '. Up to 8 ',cr,lf db 'characters may be used.',cr,lf,lf db 01h,'BIOS LIST STATUS PRINTER CHECK:',02h,cr,lf db 'Set to YES to perform the check to avoid hanging on an ' db 'off-line printer.',cr,lf db 'Set to NO if you don''t want PRNTXT to use the BIOS LISTST ' db 'printer check. ',cr,lf,lf db 01h,'NUMBER OF LINES PER SCREEN PAGE:',02h,cr,lf db 'PRNTXT will pause the text after this number of lines has ' db 'been displayed.' db cr,lf,ff db cr,lf db 01h,'CONTROL CHARACTER FLAG:',02h,cr,lf db 'When PRNTXT encounters this character is the message or ' db 'command line text, ',cr,lf db 'it will convert the next character to a control character.' db cr,lf,lf db 01h,'PRINTER/TEXT TOGGLE:',02h,cr,lf db 'When PRNTXT encounters this character in the message or ' db 'command line text, ',cr,lf db 'it will toggle the destination of the text between the ' db 'console and the ',cr,lf db 'printer. The default is the console.',cr,lf,lf db 01h,'PAGE SCREEN DISPLAY:',02h,' ',cr,lf db 'When PRNTXT encounters this character in the message or ' db 'command line text, ',cr,lf db 'it will pause the screen display.',cr,lf,lf db 01h,'INCLUDE A COMMAND LINE TOKEN:',02h,cr,lf db 'When PRNTXT encounters this character in the message text, ' db 'it will ',cr,lf db 'substitute the selected token (a number of characters ending ' db 'in a space) ',cr,lf db 'from the command line. Assuming the character is ''$'':',cr,lf db ' $ - The entire command line tail',cr,lf db ' $1 - The first command line token',cr,lf db ' $-1 - The command line after the first token' db cr,lf,ff db cr,lf db 01h,'CHANGE TEXT CASE:',02h,cr,lf db 'When PRNTXT enounters this character in the command line ' db 'message, it ',cr,lf db 'will check the next character to see if it is one of the ' db 'following case ',cr,lf db 'change flag characters:''',cr,lf,lf db ' ',01h,'CHANGE TEXT TO LOWER CASE:',02h,cr,lf db ' This flag, preceeded by the text case change flag ' db 'character, will ',cr,lf db ' change the command line message display to lower case.' db cr,lf,lf db ' ',01h,'CHANGE TEXT TO UPPER CASE:',02h,cr,lf db ' This flag, preceeded by the text case change flag ' db 'character, will ',cr,lf db ' change the command line message display to upper case.' db 0 ;=========================================================