Send it a Message
Chapter 2
Send it a Message
The
Many instructions are sent to the printer. Every letter, number, and other character travels from the computer through the printer cable in the form of a code made up of numbers. We know it as the ASCII code (American Standard Code for Information Interchange), pronounced
Let’s take a quick glance at Appendix A to refresh our memory. The decimal number 65 stands for the letter A - etc.
The ASCII code numbers for upper case letters, numbers, and punctuation are pretty well standardized around the world. Unfortunately, the remaining code numbers are used in a variety of different ways, even among manufacturers within a single country.
Besides letters and numbers, we can also send “special” codes to make the
As we will see, each with his own computer, not all computers can send all code numbers. With printer technology advancing faster than computer technology, the computer has replaced the printer as the weak link in the system.
The Code CourierIn many cases, the easiest way to send these special codes is to “build” them into the computer program along with its “regular” codes for ordinary letters and numbers. We can do this easily using programs written in the BASIC (or another) computer language. Because of its simplicity and overwhelming popu- larity, we will do all our demonstrating and learning here in BASIC.
We can also send these special codes at some computers “command level” before running a program. A program may even contain codes to change earlier codes, allowing us to print things the way we want them, when we want them.
The route to success in BASIC is via CHR$ (pronounced Character String). Users with
13