Star Micronics SR-10/I5 user manual NEW Lprint Testing RUN

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 39
Image 39

L.

:i.

L-..

L.

L,‘-

L.

hr.

h.

L.

‘-

L

L

L

i

b...

L

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

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

nEstablishing communications

We’ve learned something about communicating with our 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

10 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 SR- 10/l 5. SR-lo/15 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

10 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”.

29

Page 39
Image 39
Star Micronics SR-10/I5 user manual NEW Lprint Testing RUN