24.01.2015 Views

1 Turn off the power of the printer. - Van Mechelen

1 Turn off the power of the printer. - Van Mechelen

1 Turn off the power of the printer. - Van Mechelen

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.2.1 Example <strong>of</strong> <strong>the</strong> Use <strong>of</strong> PAGE MODE<br />

The following explains specific uses <strong>of</strong> PAGE MODE.<br />

When in PAGE MODE, <strong>the</strong> commands are typically sent from <strong>the</strong> host to <strong>the</strong> <strong>printer</strong><br />

in <strong>the</strong> following sequence:<br />

(1) An ESC L puts <strong>the</strong> <strong>printer</strong> in PAGE MODE.<br />

(2) An ESC W specifies <strong>the</strong> print area.<br />

(3) An ESC T specifies <strong>the</strong> print direction.<br />

(4) Print data is sent.<br />

(5) An FF instructs <strong>the</strong> <strong>printer</strong> to print <strong>the</strong> print data in a batch.<br />

(6) After printing, <strong>the</strong> <strong>printer</strong> returns to STANDARD MODE.<br />

<br />

LPRINT CHR$(&H1B) + “L”;<br />

LPRINT CHR$(&H1B) + “W”+ CHR$(0) + CHR$(0) + CHR$(0) + CHR$(0);<br />

LPRINT CHR$(200) +CHR$(0) + CHR$(144) + CHR$(1);<br />

LPRINT CHR$(&H1B) +“T”+ CHR$(0);<br />

LPRINT “Page Mode lesson Test1”;<br />

LPRINT CHR$(&HC);<br />

END<br />

The program in Example 1 reserves a print area <strong>of</strong> 200 × 400 pitches extending<br />

from <strong>the</strong> start point (0, 0), and <strong>the</strong>n prints <strong>the</strong> text “Page Mode lesson Test 1” on<br />

<strong>the</strong> first line <strong>of</strong> <strong>the</strong> print area as shown in Figure 1-1.<br />

(0,0) 200<br />

Page Mode lesson<br />

Test 1<br />

Paper<br />

400<br />

Print Area<br />

Figure 1-1<br />

—157 —

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!