Star Micronics SB-15 Printer User Manual


 
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 SD-10/15’s func-
tions.
ASCII codes are referred to in several different ways, depending
on the way they are used. Some times these codes are treated
as regular numbers. For example, the letter “A” is represented
by the number 65 in ASCII. Appendix F 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 re-
ferred to by their hex value.
“Hex” is short for hexadecimal which
is a base- 16 number system (our usual numbers are base- 10). 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 have ASCII values below 32. These codes control many of
SD-lo/l 5’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 si-
multaneously pressing a letter key. The particular letter key that
is pressed determines what code is sent. Control and A,sends
ASCII code 1, control and B sends ASCII code 2, and so on.
Because of the way they are created, these codes are often referred
to as “control-A” etc.
So there are four common ways of referring to the same set
of codes: the character or name of the code, the decimal ASCII
value, the hexadecimal ASCII value, and the “control-” value.
For example, the code that causes SD-lo/l5 to advance the
paper one line is ASCII 10 (decimal). This code is commonly
referred to by all the following names: