Your printer has a lot of control codes to let you do some useful things. Let’s try one that we’ve mentioned several times already:
10' Demo of ASCII code
20LPRINT CHR$(7)
30END RUN
That’s the printer’s bell (we call it that even though it sounds like a buzzer). We’ll learn more about it later - we just wanted to show you a control code that would get your attention right away!
There are four common ways of referring to a control code: the name of the code or its abbreviation, the decimal ASCII value, the hexadecimal ASCII value, and the
line feed | - | the name | of the code | |
<LF> | - | its | abbreviation | |
ASCII 10 | - | its | decimal | value |
ASCII &HOA - its hexadecimal value (the &H signifies hex)
CHR$(lO) - the way it’s used in BASIC
Of course, most of the time we don’t need to bother with these. The computer is smart enough to know that when we press the “A” key we want to print the letter “A” - it takes care of all the intermediate steps.
Appendix B is a table that shows the various names for each code so you can convert back ,and forth. The microcomputer world is not very consistent in describing ASCII codes, so it’s important that you have a basic knowledge of them.
H The escape codes
Back when the ASCII system was set up, computer equipment was relatively simple and