Program BARCODE.COM Copyright (C) 1985 by G. S. Patton This is the documentation for the CP/M .COM program "BARCODE.COM", giving explanation of its purpose, function, and use. Refer to the source listing (Turbo Pascal) following the text of this document. This program is intended for the public domain, to be used for other than commercial purposes only. All I ask is that proper credit be given me, and my copyright notice not be removed in later modifications. The program was written for an Epson LX-80 (or compatible printers with Epson-code graphics) as the primary list device lst:. It will print a standard 3 of 9 barcode for a string of no more than 15 characters (due to string length constraints - later versions will obviate this restriction) in any selected print density. Input string MUST be entered in CAPITAL letters, and must be in the list 0 - 9, A - Z, '*', '-', '.', and space. (These are the only characters supported by standard 3 of 9 code. Extended versions of the code may support other characters.) The Epson printer has 4 graphics densities: "K" - low density "L" - double density "z" - quad density "y" - high, 2x speed "L" is the only density that produces a usable bar code, so is installed as the only supported density. The 3 of 9 barcode is the code specified by the U.S. Department of Defense for use in tracking products purchased on DOD contract, in an attempt to trace costs and avoid $900 hammers and $12,000 ashtrays. It is NOT the code used on retail goods and read by grocery store scanners (the Jewel checkout line won't make sense of it!) Several parameters are required wnen entering data: Input string (Lower case will be translated to upper case, within the listed characters), density (K or L suggested), spaces between codes (for aligning on pin-feed labels), and left margin (same reason). When a code is printed, it prints the input string in ASCII characters below it, so the contents of the code may be read without a scanner. Translation of an ASCII string to barcode format is simple. The proper bit-patterns for the 3 of 9 code are placed in an array C3of9, array elements selected by ASCII code. This is set up by declaring the data type CODES as the values from space to "Z", and the array C3of9 as an array, subscripted as CODES, entries composed of 16 character strings. A loop selects each character in order from the input string (bcr), and the appropriate element of array C3of9 concatenated in another string variable bcr2. Once the string is translated into equivalent bit patterns (#0 is a blank dot, "@" is a dot.), the printer is initialized for graphics mode, and bcr2 is sent to lst:. The codes in bcr2 translate to pin firings and form the code. The program may be run in interactive mode by typing >barcode at the ccp prompt. The program will prompt for the information it needs. To run the program from the command line, it is necessary to remember one thing when entering parameters: when entering the input string, use underscores (_) between words instead of ASCII spaces. This prevents the separate words from being parsed as parameters, which will bomb out the program. The underscores will be removed by a recursive replacement routine before the code is printed. The input string may be as long as desired, limited to 256 characters. The code will be 16 dots wide per character plus 32 dots for stop and start. The width of the paper or label will determine the maximum input string size. Syntax: >barcode input_string n1 n2 n3 where: input_string is any string within the limits of 3 of 9 code, separated with underscores instead of spaces n1 is the number of copies desired (for labels) n2 is the number of lines between copies n3 is the left margin in spaces. All parameters are required. Omission of one or more parameters, or using spaces in the input string will bomb the program. Control-C will break out of the program at any point.