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

2

Press Start/Stop. The test stops after a complete line of characters has printed.

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, ’<’, followed by an ’x’. The ’xmay be either upper or lower case. The closing delimiter is a greater-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:

<x

 

 

1B36

-

select character set 2

1B5B0400000001B5

-

select code page 437

1B5B640100A0

-

set print quality to letter quality

1B5B4905000055007801

-

set font global to Courier 12

>

 

 

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

Page 18
Image 18
Lexmark 249X, 248X manual Programming Examples