Control codes

Most of the time you don’t give this code system a thought. If you press A on the keyboard, the computer sends the code to the printer and the letter A is printed. However, some printer codes, like the one for a line feed, do not have a key on the keyboard.

These are the ASCII codes with values of less than 33. These codes are called control codes because they control the operation of the printer. These characters are not displayed on your screen and aren’t printed as a character by your printer.

The ASCII codes 0 through 32 have commonly used abbreviations for their names, such as <LF> for a line feed. These controls are listed in Appendix A.

ESCape Sequences

There are not enough control codes for all of the advanced features of modem printers, so multiple-code control sequences have been developed. All of these control sequences begin with the control code ASCII 27, which is called Escape. (In this manual it is abbreviated as <ESC>.) These sequences can have more than one code following Escape, depending on the command.

The ESCape code changes the interpretation of the codes that follow it - they are interpreted as part of a printer command. For example, if the SQ-2000 receives the number 52, it prints the numeral 4 because 52 is the ASCII code for that letter. However, if the printer receives a 27 just before the 52, it turns on the italic mode, because ESCape “4” is the SQ-2000’s code for italic print- ing, as shown in Appendix A.

This same command could also be written with “4” (including the quotation marks) in place of the 52. Many ESCape sequences are written with letters or numbers enclosed in quotation marks. These letters or numbers can be used in place of the decimal or hexadecimal values as long as they’re placed in quotes. There’s no functional difference between the two systems, but you might find the letters and numbers easier to remember.

32