Lexmark Dot Matrix Technical Reference - Page 18
Programming Examples
View all Lexmark Dot Matrix manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 18 highlights
To run the printer test, follow these steps: 1 Make sure the paper and ribbon are installed. 2 Turn the printer Off. 3 Press Line Feed while you turn the printer On. 4 After a few seconds, release Line Feed. To stop or interrupt the printer test: 1 Press Start/Stop. The test stops after a complete line of characters has printed. 2 Press Start/Stop to continue the printer test. Programming Examples Examples in this manual have been formatted to be processed by a simple BASIC program. The BASIC program reads an input file and writes data to an output file. Printer commands may be entered into the input file in a hexadecimal format and enclosed with opening and closing delimiters. The opening delimiter is a less-than symbol, ''. Within the delimiters, hexadecimal data must be presented in two-digit pairs. White space, blanks, carriage returns and line feeds may be used between the pairs. In addition, a comment may be added to the end of a line by using a minus sign, '-', at the start of the comment. All data after a minus sign is ignored until a carriage return or line feed is encountered. The example format used in this book is shown below: All of the examples use this encoding method and have been tested using the following BASIC program: 1000 INPUT "Enter file name to be printed"; FILENAME$ 1010 OPEN FILENAME$ FOR INPUT AS #1 1020 OPEN "prtrout.bin" FOR OUTPUT AS #2 1030 WHILE EOF(1) = 0 1040 I$ = INPUT$(1, #1) 16 Section 1: Introduction