Star Micronics NX-15 user manual LPRINTCHR$27 “Q”CHR$40 20 LPRINTCHR$27 “a” CHR$2

Models: NX-15

1 210
Download 210 pages 57.72 Kb
Page 102
Image 102
10LPRINTCHR$(27); “Q”;CHR$(40);

I

This program will print one line using several printing features. Then it “calls” the macro in line 60. When line 80 prints the style is “plain vanilla” because the macro has reset it.

10LPRINTCHR$(27); “Q”;CHR$(40);

20 LPRINTCHR$(27); “a” ;CHR$(2);

30 LPRINTCHR$(27); “-l”;

40LPRINTCHR$(27); “h” ;CHR$(1) ;

50 LPRINT “TESTINGABCD”

60 LPRINTCHR$(27); “+’’; CHR$(1) ;

70LPRINT “TESTING ABCD”

80END

Reading a hex dump

The BASIC in some computers changes ASCII codes before they send them to the printer. If you run into problem because of this, try this hex dump to check the ASCII codes.

First turn off the printer. Hold down both the Paper Feed key and Mode key and turn on the printer, and run the following pro- gram.

10 FOR 1=0 TO 255

20LPRINTCHR$(I ) ;

30NEXT I

40LPRINT

50END

If your system passes the codes directly to the printer without qhanging them, you will get a printout like this. (You can print out the last remaining line in the print buffer by putting the printer off line with the On Line key.)

Page 102
Image 102
Star Micronics NX-15 user manual LPRINTCHR$27 “Q”CHR$40 20 LPRINTCHR$27 “a” CHR$2