Star Micronics SB-15 user manual NEW Lprint Testing RUN

Models: SB-15

1 128
Download 128 pages 39.39 Kb
Page 39
Image 39

LLIST it (or however your computer does it). We’ve crossed the

first major hurdle-learning how to list programs on SD- 10/15. Now we are ready to jump into the world of programming with SD-lo/l 5. But first, there are a few fundamentals that we need to cover.

i

n Establishing communications

 

 

We’ve learned something

about communicating

with our

I.

printer. Now we need to adapt what we know to printing in a

BASIC program. Generally, computers use about the same

 

 

procedure for printing in a program as they do to list a program.

 

Let’s try what we learned. Type the following:

NEW

L18 LPRINT "TESTING"

RUN

Remember-we use LPRINT; you may have to use something else!

At any rate, you should have the word “TESTING” on your printer. Quite an achievement, isn’t it? Let’s get done with this simple stuff so that we can go on to something interesting.

nThe CHR$ function

We mentioned CHR$ in Chapter 3 as one way to express ASCII

codes. We are going to use it a lot in communicating with SD-lo/l 5. SD-lo/l 5 uses many of the ASCII code that don’t represent letters and numbers. The CHR$ function gives us an easy way to send these codes to the printer. Try this to see how the CHR$ function works:

NEW

18 LPRINT CHR$(83)

RUN

That should print an “S” for Star. If you check the chart in Appendix B you will see that 83 is the ASCII code for “S”.

31

Page 39
Image 39
Star Micronics SB-15 user manual NEW Lprint Testing RUN