Star Micronics NB-15 user manual Read MM LPRINTCHR$MM Next M Next N Lprint

Page 106

!

98

You’ll probably recognize dl d2 .... dx from the top of our layout grid. That’s right, each column is described by three bytes. Now we’ve got everything we need to download one character to the printer. The complete command for our car character is shown below:

CHR$(27);CHR$(38);CHR$(O);CHR$(6O):CHR$(6O):

CHR$(l);CHR$(9);CHR$(2);CHR$(l);CHR$(24O);CHR$(O):

CHR$(6);CHR$(8);CHR$(O);CHR$(8);CHR$(lOO);CHR$(O);

CHR$(O);CHR$(O);~$(O);CHR$(24);CHR$(99);CHR$(l28):

CHR$(O);CHR$(O);CHR$(O);CHRS(3l):CHR$(255);CHR$(l92~;

CHR$(O);CHR$(O);CHR$(O);CHR$(6);CHR$(3);CHR$(O)

Now let’s send the information to the printer. The following

program will send the character definitions for all two characters to the printer. Before you enter the program, turn off the printer and set the DIP switch 2-3 off. Otherwise, your printer will ignore your download definitions.

After you set the DIP switch correctly, enter the program and run it.

10 LPRINTCHR$(27);"xO";

20LPRINTCHR$(27);'*&";CHR$(O);CHR$(6O):CHR$(6l);

30FOR N=60 TO 61

40FOR M=l TO 30

50READ MM

60LPRINTCHR$(MM);

70NEXT M

80NEXT N

90LPRINT

100 END

110 DATA 1, 9, 2, 1,240, 0, 6, 8, 0, 8, 100, 0

120 DATA 0, 0, 0, 24, 99,128, 0, 0, 0, 31, 255,192

130 DATA 0, 0, 0, 6, 3, 0

140 DATA 1, 9, 2, 14, 0, 0, 0, 31,192,18, 96, 0

150 DATA 4,132,64, 16, 10, 0, 4,132,64, 18, 96, 0

160 DATA 0, 31,192,14, 0, 0

Image 106
Contents USER’S MANUAli Tatement Special Message to the New Owner Table of Contents Chapter Controlling with Basic CHR$Chapter Special Features of the Printer Functions of the Connector Signals Appendix G Serial Interface Specifications TRS-80 BasicSetting UP Your Printer Page Tion and movement for both removing and replacing the cover Page Print head Printer Slide the I/F board into the slot Page Getting to Know Your Printer Page Page Page Selecting and Loading Paper ‘igure 2-4. Raise the paper guide for loading single sheets You can insert a sheet of paper by using the release lever To align paper that is not in straight Sprocket cover You can raise While trrnirrgon the power Self-test DIP switch 2-2 on Efgh!jklmnopqr¶tuvwxyz~ ?lSS&‘ TOF During normal operation Connecting the Printer Page Memo Using Commercial Software Page Ascii Using Your Printer with Word Processors Page Memo Controlling With Basic PR#O ListNEW Lprint Testing RUN ESC W Lprint CHR$27WCHR$l Lprint CHR$27WCHR$49 Lprint CHRS27Wl Memo Printing Text Lprint CHR$27 xl ESC Lprint Undelined OFF ESCLprint Overlined Boldface on Escso When you run this program you should get this Demonstration Condensed Here’s what you should get from this program OFF Elite mint Summary notes Memo Formatting Text This is what you will get This Line Spacing is SET to Run the program again. Now the results will look like this Here is what your printer will produce Line Number Lprint CHRS12IOI ESCNCHR$n Lprint this is LINE1 Next This is Line Return TWO Three Four ONE This command sets the horizontal tab to every eight columns Next Try thisprogram tosee how this works Lprint CHR$11 First TAB Lprint CHR$llFIFTH TAB CHR$O Lprint 2ND TAB of CHANNEL’ Memo Special Features Printer Lprint CHR$7 ESCVCHR$O Here is what this program will print Lprint CHR$27il Printing direction commands Function Control code Next Lprint Lprint Eighth bit controls Next J 129 LPRINTCHR$27 LPRINTCHR$27= Lprintlprint Double This is Double Sized Printing Next Lprint Lprint CHR$IPage Creating Your OWN Characters Print Matrix Defining Your OWN Characters Usethisgridoronesimilartoittodefineyourown draftcharacters Wrong 128 Assigningavalueofcharacterspace Characterdesignsforthetwographsymbols Page Read MM LPRINTCHR$MM Next M Next N Lprint LPRINTCHR$I Next Lprint Lprint CHR$I NextLprint LPRINTGERMANYCHR$9 Lprintscales Data 1, 9, 2, 31,253,64, 32, 1,128,80 Read MM Lprint CHR$MM Next MMO+ml +m2 105 106