;configuration data source file for PRINT V2.1 ;--------------------------------------------------------- ;offsets to option data locations in PRINT21 program ;symbolic: numeric: description, typical default: dlnumf equ 16h ;line number flag dpnumf equ 17h ;page number flag dexact equ 18h ;exact print flag dfnpfl equ 19h ;file name print flag dtimfl equ 1ah ;time print flag dmultf equ 1bh ;multiple run flag dinsp equ 1ch ;inspect files doffst equ 1dh ;default column offset dlwid equ 1eh ;width of line dltpp equ 1fh ;lines of text per page dlspp equ 20h ;lines to skip per page dlff equ 21h ;form feed flag (0=no) ;note: dltpp + dlspp + 2 (header size) = total lines per page on printer ;--------------------------------------------------------- ;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 ;same as function text, but lower case is OK filesp equ 6 ;change all or part of a filespec DU:FN.FT togl3 equ 7 ;toggle to one of three options: 001B, 010B, 100B togltf equ 8 ;toggle a byte between 0ffh and 0 ;see ZCNFG.WS (or .DOC) for a full definition of these functions. ;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 10 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 ;************************************************************ ;FROM HERE ON, THE ORDER IN WHICH DATA STRUCTURES OCCUR ;IS NOT IMPORTANT. ;bmenu: dw amenu,amenu,bscrn,bcase,bhelp ;MENU B ;========================================================= ;The case table used for PRINT21 ;========================================================= 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 dependant data ; | | | | | .screen location ; | | | | | | acase1: vector 0, togltf, dlnumf, 1, sloc0, yndata ; / ; address of data structure used by function.| ; \ acase2: vector 1, togltf, dpnumf, 1, sloc1, yndata ;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. vector 2, togltf, dexact, 1, sloc2, yndata vector 3, togltf, dfnpfl, 1, sloc3, yndata vector 4, togltf, dtimfl, 1, sloc4, yndata vector 5, togltf, dmultf, 1, sloc5, yndata vector 6, togltf, dinsp, 1, sloc6, yndata vector 7, decrad, doffst, 1, sloc7, 0 vector 8, decrad, dlwid, 1, sloc8, 0 vector 9, decrad, dltpp, 1, sloc9, 0 vector A, decrad, dlspp, 1, slocA, 0 vector B, togltf, dlff, 1, slocB, yndata ;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,lf ;ensure clean top of screen ;Title line db ht,ht,ht,'PRINT V2.1 DEFAULT OPTIONS',cr,lf db lf,lf ;blank lines for screen format db cr,lf db ' 0) Number lines ' sloc0: db ' ' db cr,lf db ' 1) Number pages ' sloc1: db ' ' db cr,lf db ' 2) Print exact ' sloc2: db ' ' db cr,lf db ' 3) File name in heading ' sloc3: db ' ' db cr,lf db ' 4) Date/Time in heading ' sloc4: db ' ' db cr,lf db ' 5) Multiple print ' sloc5: db ' ' db cr,lf db ' 6) Inspect before print ' sloc6: db ' ' db cr,lf db ' 7) Default Left Margin ' sloc7: db ' ' db cr,lf db ' 8) Default Line length ' sloc8: db ' ' db cr,lf db ' 9) Text lines/page ' sloc9: db ' ' db cr,lf db ' A) Blank lines/page ' slocA: db ' ' db cr,lf db ' B) Use form feed? ' slocB: db ' ' db cr,lf ;scroll to top of screen (not needed if only one screen) ; db lf,lf,lf,lf,lf,lf ; db cr,lf db cr,lf,lf db 0 ;terminator ;----------------------------------- ; TYPICAL SCREEN DATA LIST ; (handy, but only need be here if referenced) ;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'. yndata: dz 'YES' ;for 1=yes dz ' NO' ;========================================================= ahelp: ;help screen for menu A db cr,lf ;ensure clean top of screen db ht,'HELP SCREEN IS NOT IMPLEMENTED',cr,lf,lf db 0 ;========================================================= ;bhelp: ;help screen for menu B ; db cr,lf ;ensure clean top of screen ; db ht,'HELP SCREEN IS NOT IMPLEMENTED',cr,lf,lf ; db 0 ;=========================================================