; ; REMCFG.Z80 - JTH 05/11/91 ; (from ZCNFGCFG.SRC) ; ;--------------------------------------------------------- vers equ 12 ;remind version number ; REMIND Patch offsets rflag equ 0bh ;upcoming reminder flag margin equ 0ch ;printer left margin cfg equ 0dh ;cfg file name datafil equ 16h ;datafile name bakfil equ 27h ;backup file name ptrchk equ 34h ;do bios listst check pinit equ 35h ;printer init sequence useff equ 3ch ;use ff after printing today's reminders ;--------------------------------------------------------- ;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 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 ht equ 9 ;horizontal tab lf equ 10 ;line 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 for REMIND, 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, text, datafil, 16, ascrb, 0 vector C, text, bakfil, 12, ascrc, 0 vector D, togltf, rflag, 1, ascrd, yndata vector E, togltf, useff, 1, ascre, yndata vector F, togltf, ptrchk, 1, ascrf, yndata vector G, decrad, margin, 1, ascrg, decrang vector H, decrad, pinit, 1, ascrh, 0 vector 1, hexrad, pinit+1, 1, ascr1, 0 vector 2, hexrad, pinit+2, 1, ascr2, 0 vector 3, hexrad, pinit+3, 1, ascr3, 0 vector 4, hexrad, pinit+4, 1, ascr4, 0 vector 5, hexrad, pinit+5, 1, ascr5, 0 vector 6, hexrad, pinit+6, 1, ascr6, 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 ht,ht,1,' REMIND VERS ',VERS/10+'0','.',VERS MOD 10+'0' db ' DEFAULTS ',2 db cr,lf,lf db 'Default CFG filename (FILENAME)............. A) ' ascra: db ' ' db cr,lf db 'Default datafile filename ([DU:]FN.FT)...... B) ' ascrb: db ' ' db cr,lf db 'Default backup file filename (FILENAME.TYP). C) ' ascrc: db ' ' db cr,lf,lf db 'Display upcoming reminders as default....... D) ' ascrd: db ' ',cr,lf db 'Form feed after printing today''s reminders.. E) ' ascre: db ' ',cr,lf,lf db 'Do BIOS LISTST printer check................ F) ' ascrf: db ' ' db cr,lf db 'Printer left margin......................... G) ' ascrg: db ' ',cr,lf Š db 'Length of printer initialization string..... H) ' ascrh: db ' ',cr,lf db 'Printer initialization string (HEX): ' db ' 1 2 3 4 5 6',cr,lf db ' ' ascr1: db ' h, ' ascr2: db ' h, ' ascr3: db ' h, ' ascr4: db ' h, ' ascr5: db ' h, ' ascr6: db ' h',cr,lf,lf 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: defz 'YES' defz ' NO' ;========================================================= ahelp: ;help screen for menu A DB CR,LF DB ht,ht,1,' REMIND VERS ' DB VERS/10+'0','.',VERS MOD 10+'0' DB ' DEFAULTS ',2 DB CR,LF,LF DB 'DEFAULT CFG FILENAME:',CR,LF DB 'Enter the desired default CFG filename in the form ' DB "'FILENAME'.",CR,LF DB 'Up to 8 characters may be used.',CR,LF,LF DB 'DEFAULT DATAFILE FILENAME:',CR,LF DB 'Enter the default datafile filename in the form ' DB "'DU:FN.FT'.",CR,LF DB 'Any part is optional. Up to 16 characters may be entered.' DB CR,LF,LF DB 'DEFAULT BACKUP FILE FILENAME:',CR,LF DB 'Enter the default backup file filename in the form ' DB "'FILENAME.TYP'.",CR,LF DB 'Any part is optional. Up to 16 characters may be entered.' DB CR,LF,LF,LF,LF,LF,LF,LF,LF,LF,LF DB 'BIOS LISTST PRINTER CHECK:',CR,LF Š DB 'Set to NO if you don''t want REMIND to use the BIOS ' DB 'LISTST printer check.',CR,LF DB 'The default is to check to avoid hanging on an ' DB 'off-line printer.',CR,LF,LF DB 'PRINTER INITIALIZATION STRING:',CR,LF DB 'Enter the length of the initialization string first, ' DB 'followed by up to',CR,LF DB 'six individually entered printer initialization hex ' DB 'bytes.',CR,LF,LF DB 'PRINTER LEFT MARGIN:',CR,LF DB 'Enter the number of characters desired for the printer ' DB 'left margin.',CR,LF,LF,LF,LF,LF,LF,LF,LF,LF,LF,LF,LF,LF DB 'DISPLAY UPCOMING REMINDERS AS DEFAULT:',CR,LF DB 'Set to ON to display upcoming reminders as default.',CR,LF DB 'Set to OFF to not display upcoming reminders as default.' DB CR,LF,LF DB 'FORM FEED AFTER PRINTING TODAY''S REMINDERS:',CR,LF DB 'Set to ON to send form feed after printing today''s ' DB 'reminders.',CR,LF DB 'Set to OFF to print upcoming reminders right after ' DB 'today''s reminders.' DB 0 ;========================================================= ; db cr,lf,lf,lf ;ensure clean top of screen ; db ht,ht,ht,'HELP SCREEN NOT IMPLEMENTED',cr,lf,lf,0 ;=========================================================