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
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
For example, the code that causes