; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ; * * ; * ZDB * ; * * ; * The Z-System Database * ; * Name/Address File Manager * ; * * ; * (C) 1990-1993 by Joseph I. Mortensen * ; * * ; * * ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ; ; ; Original Author: Joseph I. Mortensen ; 4214 Chelsea Ct. ; Midland, MI ; 517-835-6923 ; Compuserve 70037,3161 ; GEnie J.MORTENSEN3 ; ; Major Collaborator ; and Co-Author: Terry Hazen ; ; Assembler/Linker: ZMAC/ZML or Z80ASM/SLRNKP ; ; For revision history see ZDBxx.HIS ; For documentation see ZDBxx.HLP ; ;----------------------------------------------------------------------- ; ; NOTE: This overlay is for use with ZDB 2.2 or later ; ;----------------------------------------------------------------------- ; ; Equates ; vers equ 23 ; buflen equ 372 ; Barcode buffer length ; tab equ 09h lf equ 0ah ff equ 0ch cr equ 0dh esc equ 1bh off equ 00h no equ off on equ 0ffh yes equ on ;----------------------------------------------------------------------- ; ; ZDB has several locations near the beginning of the program that can ; be changed to alter the operation of the program to suit the user. ; ; You can use Al Hawley's ZCNFG.COM along with the configuration file ; ZDB.CFG to configure many of ZDB.COM's default settings. As long as ; you retain the default configuration file name at 010Dh, you may ; rename ZDB.COM as you wish, to ADDRESS.COM, for example, and ZCNFG ; will still find the proper overlay file. The ZCNFG syntax for this ; example would then be: ; ; A0>ZCNFG ADDRESS ; ; Another method is to edit this configuration overlay file, use your ; favorite assembler to assemble it to a HEX file and use MLOAD or ; MYLOAD to overlay it on ZDB.COM, creating your new working file ; (ADDRESS.COM, for example): ; ; A0>MLOAD ADDRESS.COM=ZDB.COM,ZDBxxOVL.HEX ; ; When you use this method, you can use the same configuration HEX ; overlay file to quickly configure future versions of ZDB. ; ;----------------------------------------------------------------------- org 010bh ; Start of patch area ;----------------------------------------------------------------------- ; ; Bios printer ready check flag. Normally set to on (0ffh) to call the ; bios list status routine to check for printer ready. If your system ; hangs on a call to the bios list status routine, set this flag to 0: ; pchkf: db on ; Set to 0 to skip bios printer check ; ; Character used to terminate data fields ; termf: db '<' ; Char to terminate fields, 00h if none ;----------------------------------------------------------------------- ; ; Default implied CFG filename at 010Dh for use with ZCFNG (8 characters): ; org 0116h ; Retain current default CFG filename ;----------------------------------------------------------------------- ; ; Default data file name (16 characters - fill unused positions with ; spaces): ; 'duu:filename.typ' deffn: db 'ZDB.DTA' ; Default data file name ; ds deffn+16-$,' ' ; Space for 16 bytes, space-filled db 0 ; Termination ; ; The barcode is composed of full bars and half bars. Full bars must be ; .115"-.135" (about 1/8") high. Half bars must be .04"-.06" (about 3/64") ; high. The barcode is printed in one or two graphics passes, depending on ; the type of printer you are using. ; ; The default graphics strings, below, produce conforming bars on the ; 9-pin Epson MX80 with Graftrax, which requires two passes to produce a ; 1/8" full bar. The following are the barcode character definitions for ; pass 1. Each bit represents a printer graphics dot. Pass 2 prints both ; characters as half bars to provide enough bottom barcode to make full and ; half bars the required height. ; ; Epson LQ-850-compatible 24-pin printers such as the Panasonic KX-P1123 and ; KX-P1124 can produce 1/8" full bars with one pass. When using a 24-pin ; printer, you may wish to change HBAR, below, to set the last 3 bits and ; change the SETLF length byte, below, to 0 to turn off the second graphics ; pass. ; fbar: db 11111111b ; Full bar character (top 8 bits) hbar: db 00000011b ; Half bar character (top 8 bits and ; ; bottom 2 bits) ; ; The following are length-prefixed printer strings. Each string begins ; with a length byte. Extra space is provided for longer printer codes. ; To eliminate any of these strings, make the first byte 0. The sample ; codes are for the Epson FX-85: ; ; Printer reset string, sent at start and end of each label/envelope ; printing session. 4 characters maximum: ; reset: db reset0-$-1 ; Length byte db esc,'@' ; Reset printer ; reset0: ds reset+5-$,0 ; Space for 4 bytes, 0-filled ; ; Set printer for printing return address. This string is sent to the ; printer after it is reset each time the return address is printed. ; 12 characters maximum: ; rin: db rin0-$-1 ; Length byte db 0fh ; Set condensed print db esc,'x',1 ; Set nlq mode db esc,'p',1 ; Set proportional print ; rin0: ds rin+13-$,0 ; Space for 12 bytes, 0-filled ; ; Set printer for printing main address. Cancel any return address ; settings that may require it. Do NOT use reset, as it will cancel ; the label form length. 12 characters maximum: ; ain: db ain0-$-1 ; Length byte db 12h ; Cancel condensed print db esc,'E' ; Set emphasized print db esc,'x',1 ; Set nlq mode db esc,'p',1 ; Set proportional print ; ain0: ds ain+13-$,0 ; Space for 12 bytes, 0-filled ; ; Set number of columns for envelope address left margin: ; lemarg: db 40 ; Start address at column 40 ; ; Labels must be at least 3.5" wide to print barcodes, 4" labels are best. ; With no return address: 15/16" high minimum (labln=6, llmarg=0) ; With 3-line return address: 1 7/16" high minimum (labln=9, llmarg=7) ; ; Set number of columns for label address left margin: ; llmarg: db 0 ; 0 for flush left ; ; Use return address in label (if labels are at least 4" x 1 7/16"): ; lra: db 0 ; 0 if no return address is desired ; ; Set number of lines per label. 8 characters maximum: ; labln: db labln0-$-1 ; Length byte db esc,'C',6 ; Set lines per label ; labln0: ds labln+9-$,0 ; Space for 8 bytes, 0-filled ; ; Use return address in envelope ; era: db on ; 0 if no return address is desired ; ; Return address flag character marks record as the default return ; address if it appears as the first character in the COMMENTS2 field. ; Any character not often used, such as !@#$%^&~+ is suitable. ; raflag: db '*' ; ; Space from return address to address. For normal business envelopes, ; the total number of line feeds in the return address and addrsp ; should be 14. If the number of line feeds in the return address is ; the normal 3, addrsp should be set to 10 lines: ; addrsp: db 10 ; ; The following string is used to configure your printer to print the ; postal barcode following the address. The printer must be set to ; print the next buflen (372) bytes in 960 dots/line (120 dots/inch) ; graphics. Set the length byte to 0 if you don't wish to print ; barcodes. 8 bytes maximum: ; setgraf:db setg0-$-1 ; Length byte db esc,'L' dw buflen ; Set graphics ; setg0: ds setgraf+9-$,0 ; Space for 8 bytes, 0-filled ; ; Most printers will require two passes to print a conforming height ; barcode (see the barcode module, ZDB.C, for barcode definitions.) The ; following strings are used to change the line spacing for graphics. ; The first pass prints the top 7 dots of the barcode. The following ; string sets the line spacing to 2 dots to move the paper just enough ; to print the bottom 2 dots. You might have to adjust it slightly for ; your printer to avoid gaps between dots or overlaps on the bottom of ; the barcode characters. If your printer will do an conforming barcode ; in one pass, set the following byte to 0 to skip the second pass. ; 8 bytes maximum: ; setlf: db setlf0-$-1 ; Length byte db esc,'3',5 ; Set linefeed for second pass ; setlf0: ds setlf+9-$,0 ; Space for 8 bytes, 0-filled ; ; The following string is used to restore the default line spacing of ; 6 lines/inch. 8 bytes maximum: ; deflf: db deflf0-$-1 ; Length byte db esc,'2' ; Restore default line spacing ; deflf0: ds deflf+9-$,0 ; Space for 8 bytes, 0-filled ; ; Number of strikes/pass for barcode printing. Normally 1, but can ; be increased if a darker barcode is required. 1-3 allowed: ; strikes:db 1 ; Number of strikes/pass (1-3) ; ; The USPS recommends but doesn't require that the address be printed ; in capital letters. Set to 0 to print the address in mixed case, just ; as entered into the database. Set to 1 to print the address in caps. ; The return address will always be printed in mixed case. ; adrcaps:db 0 ; 0=address in mixed case, 1=caps ; ; ZDB may be configured to clear the screen on exit. ; clr: db off ; Set to ON to clear screen on exit ; ; Display 12 or 24 hour time ; time: db off ; Set to OFF for 12 hr time ; Set to ON for 24 hr time end ; Patch overlay file