Star Micronics NB-15 LPRINT CHR$27“%l”CHR$O 20 LPRINTCHR$60CHR$61, LPRINTCHR$27“$O”CHR$O 40 END

Models: NB-15

1 114
Download 114 pages 4.7 Kb
Page 107
Image 107
10LPRINT CHR$(27);“%l”;CHR$(O)

99

When you run this program, it looks like nothing happens. That’s OK. We’ll see why in just a moment. Save this program. We’ll need it again shortly.

PRINTING DOWNLOAD CHARACTERS

You’ve now defined and sent two characters to your printer. But how do you know that? If you try printing those characters now you don’t get a car and telephone. Instead you get.. ( =. That’s because the download characters are stored in a different part of the printer’s memory. To tell it to look in download character RAM instead of standard character ROM it requires another command:

(ESC) “%” CHR$(n) CHR$(O)

This command is used to select the download character set (if n = 49) or to select the standard character set (if n = 48). Let’s try it out. Enter this program:

10LPRINT CHR$(27);“%l”;CHR$(O)

20 LPRINTCHR$(60);CHR$(61);

30 LPRINTCHR$(27);“$O”;CHR$(O)

40 END

Voila!Itshouldhaveprintedoutthetwocharacterswe defin- ed.Yourprintoutshouldlooklikethis:

(If it doesn’t, check the last program we ran for errors, then rerun it.)

Let’s find out if there are any other characters in the download RAM. Try this program:

10LPRINTCHR$(27);“%1”;CHR$(O)

20FOR I=32TO 126

30LPRINTCHR$(I);

40NEXT I

Page 107
Image 107
Star Micronics NB-15 user manual LPRINT CHR$27“%l”CHR$O 20 LPRINTCHR$60CHR$61, LPRINTCHR$27“$O”CHR$O 40 END