10/10/03

See the following example for programming examples using patterns.

Pattern example

 

10

WIDTH "LPT1:", 255

 

20

ESC$ = CHR$(27)

 

30

REM --- RESET PRINTER ---

 

40

LPRINT ESC$; "E";

 

50

REM --- SET SOURCE=TRANSPARENT ---

60

REM --- SET PATTERN=OPAQUE ---

70

LPRINT ESC$; "*v0n1O";

 

80

REM --- BACKGROUND ---

 

90

LPRINT ESC$; "*c80G"; ESC$;

"*v2T";

100

LPRINT ESC$; "*p100x100Y";

ESC$; "*c1000a300b2P";

110

REM --- PATTERN ---

 

120

LPRINT ESC$; "*p150x300Y";

 

130

LPRINT ESC$; "(s1p48v0s0b4101T";

140

LPRINT ESC$; "*c1G"; ESC$;

"*v3T"; : LPRINT "P";

150

LPRINT ESC$; "*c2G"; ESC$;

"*v3T"; : LPRINT "A";

160

LPRINT ESC$; "*c6G"; ESC$;

"*v3T"; : LPRINT "T";

170

LPRINT ESC$; "*c4G"; ESC$; "*v3T"; : LPRINT "T";

180

LPRINT ESC$; "*c5G"; ESC$;

"*v3T"; : LPRINT "E";

190

LPRINT ESC$; "*c3G"; ESC$;

"*v3T"; : LPRINT "R";

200

LPRINT ESC$; "*c1G"; ESC$;

"*v3T"; : LPRINT "N";

210

REM --- PAPER EJECT ---

 

220

LPRINT CHR$(12);

 

230END

<Sample file 6>

CHAPTER 2 "PCL" - 73

Page 91
Image 91
Homelite HL-1450, HL-P2500, HL-1660E, HL-2400CE, HL-1050, HL-1250, HL-1470N, HL-1070, 2060 Pattern example, REM --- Background