Star Micronics NB-15 user manual Controlling With Basic, CHAPTfiR, Subjects we’ll cover in include

Models: NB-15

1 114
Download 114 pages 4.7 Kb
Page 41
Image 41
CHAPTfiR 4

CHAPTfiR 4

CONTROLLING

WITH BASIC

Subjects we’ll cover in Chapter 4 include-

*Listing BASIC programs on the printer; Printing from BASIC;

CHR$ function;

Command syntax; Problem codes.

In this chapter we will be teaching you how to use your printer’s features using the BASIC programming language. It is easy to communicate with your printer from BASIC and, though it has its detrators, BASIC is the nearest thing to a universal language among users of personal computers. But remember that it’s not the only way to communicate with your printer, as we have already seen.

SOME BASICS ABOUT BASIC

H First steps

The first things that a beginner learns to do are to list a pro- gram and to print a character string. Certainly these are the easiest operations one can do, but even they may depend on what computer you have. In Microsoft BASIC, we can list all the steps in a program by entering LIST. This lists them on the CRT screen; if we want to print them on a printer, we prefix the command with an L (enter LLIST).

The Microsoft BASIC command for outputting information is PRINT. Like the LIST command, this displays the information on the CRT screen so we have to add an L (+ LPRINT) if we want to use the printer. Just put whatever you want to print be- tween quotes and after LPRINT (anything enclosed in quotes is called a character string). For example, we would use LPRINT “Hello!” to output “Hello!” to the printer. We’ll see later how to

Page 41
Image 41
Star Micronics NB-15 user manual Controlling With Basic, CHAPTfiR, Subjects we’ll cover in include