1.2.3 Control codes
The ASCII table shows symbols like.Jor2 the way they actually print on the laser printer. But ASCII includes more than just printable characters: none of the control code commands at the beginning of the table actually print. Instead, when your computer sends a control code to the laser printer it makes your printer do other things, such as sound its beeper.
Control codes mostly handle communications between your computer and the printer at the lowest level, at cable level. For example, a couple of control codes make sure the printer lmjfer (your printer’s storage memory) doesn’t overflow. In this book we’ll indicate control codes enclosed by angle brackets to their abbreviations in the table: <FF> means the Form Feed control code, which advances the printer to the next
1.2.4Escape sequences
Control code 27, <ESC> or Escape, is a particularly important one for printers. To tell your printer all the things you might need— setting margins, saying where to print, choosing a particular font, starting graphics and so on
—requires many more than just two or three dozen control codes. So the <ESC> control code has a special meaning: <ESC> means “the next character specifies a command, not something to be printed”.
Therefore if you send just the chara$ter: to the printer it will print a J and that’s all. But if you send the <ESC> code just before the c then the printer will switch over to print self test. Extending the control codes this way gives you many more commands to control your printer. In fact, these “Escape sequences” make up most of the Star Laser Printer’s language.
In this book we’ll leave spaces between characters when we show escape sequences. You’ll find
<ESC> (S OP IOh 12v os 3T
a bit more readable than
<ESC> (sop IOh12vOS3T
8