Star Micronics NB-15 user manual n First, some terminology

Models: NB-15

1 114
Download 114 pages 4.7 Kb
Page 36
Image 36
nFirst, some terminology

28

need to know to use your printer as a regular printer. But this printer isn’t just a regular printer. Your printer has many capabilities that your commercial software isn’t aware of. A lit- tle later we will see what it takes to use some of your printer’s advanced features with commercial software.

nFirst, some terminology

Your printer knows what to print because it knows how to in- terpret the codes that the computer sends to it. These codes are numbers that the computer sends to your printer. Both the com- puter and the printer know the meaning of these codes because they are a set of standard codes used by almost all microcom- puters. This set of codes is the American Standard Code for Infor- mation Interchange, which is usually referred to as ASCII (pro- nounced ask-key). There are ASCII codes for all the letters of the alphabet, both lower case and capital, the numbers from 0 to 9, most punctuation marks, and some (but not all) of the printer’s functions.

ASCII codes are referred to in several different ways, de- pending on the way they are used. Sometimes these codes are treated as regular numbers. For example, the letter “A” is represented by the number 65 in ASCII. Appendix B shows all of the ASCII codes.

In BASIC, ASCII codes are used in the CHR$ function. This function is used to print the character that is represented by the number in the CHR$( ) function. The BASIC statement PRINT CHR$(65) will print an “A” on the terminal.

In some other programming languages, ASCII codes are refer- red to by their hex value. “Hex” is short for hexadecimal which is a base-16 number system (our usual numbers are base-lo).

Since hex needs 16 digits, it uses the numbers 0 through 9 and then it uses the letters A through F for digits. The ASCII code for the letter “A” is 41 in hex.

Of course, most of the time we don’t even need to think about this code system. Our computers are smart enough to know that when we press the “A” key on our keyboard we want to print the letter “A”. The computer takes care of all the rest.

But there are a number of ASCII codes that don’t have keys on the keyboard. The most important of these codes are the codes that ASCII values below 32. These codes control many of this printer’s functions. Even though there aren’t keys for these codes, most keyboards can send these codes. It’s done by holding down the “control” key (many times marked CTRL) and

Page 36
Image 36
Star Micronics NB-15 user manual n First, some terminology