User-defined Characters

The following character definition program should help make this clear:

100 LPRINT CHR$(27);"X";CRR$(O); llOLPRINTCHR$(27);"&";CHR$(O); 120 LPRINT ";;";

130 LPRINT c11~$(128); l40FORI=lTO11

150 READ A: LPRINT CHR$(A);

160 NEXT I

170 LPRINT ";;;;;"

180 LPRINT CHR$(27);"%";CHR$(l);

190 LPRINT "ii;;;"

200LPRINTCHR$(27);"%";CHR$(O); 210 LPRINT ";;;;;"

220END

In line 100, the ESC x 0 command selects draft printing. The two semicolons (;) in line 120 are n1 and n2, the range of characters being defined (in this case, a range of one). Line 130 contains a1, which in this case specifies to use the top eight pins of the print head.

Line 180 selects the user-defined character set, and line 200 switches back to the normal character set. The actual character design information (contained in the DATA statement in line 230) is sent to the printer in the loop between lines 140 and 160.

Printing user-defined characters

If you entered the example program above, you defined a heart and placed it in the RAM location for decimal code 59 (replacing the semicolon). You can now print out a three-line sample of your work. The first and third lines (printed by lines 170 and 210 of the program) print the normal semicolon; the second line (line 190) prints the heart that you defined.

4-24Software and Graphics