411
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 infor-
mation 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 between 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 LPRINT more than just character strings.
We started with Microsoft BASIC because it is the most
widely used version of BASIC. The programs in this manual
are written in Microsoft BASIC so they should run on most
computers. But if strange things happen when you try to run
a program, check the BASIC manual that came with your
computer.
Let’s consider Apple II computers for a minute. These po-
pular computers use their own brand of BASIC. To use an
Apple II, enter the following -
PR#l PRPl
LIST PRINT “He1 lo!
PR#O PRtO
The PR#l tells the Apple to send everything to the printer,
the LIST or PRINT command sends it, and the PR#O returns
output to the screen. -
Now that we know how to address the printer, let’s try listing
a BASIC program. We will load a program into memory ready
to program printer operation -just as soon as we learn a little
bit about the ASCII codes.
n ASCII codes and the CHRS function
You can talk to your computer in BASIC, but your computer
and your printer talk to each other in what are known as ASCII
codes. In the ASCII code, each number from 0 to 255 has a
particular meaning - 36, for example, makes the printer print