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 vertical tab, do not have a key on the keyboard.

These are the ASCII codes with values of less than 32. 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.

ESCape Sequences

There are not enough control codes for all the advanced features of modern printers, so multiple-code control sequences have been devel- oped. All of these control sequences begin with the control code AS- CII 27, which is called escape. These sequences can have more than one code following Escape, depending on the command. (In this manual, ESCape is written as ESCape or ESC, depending on whether it’s being used in a sentence or as a control code. You might also see it written as (ESC) in other manuals.)

The ESCape code changes the interpretation of the codes that follow it-they are interpreted as part of a printer command. For exam- ple, if the FX-286receives the decimal code 52, it prints the numeral 4 because 52 is the ASCII code for that number. If, however, the printer receives a 27 just before the 52, it turns on the italic mode, because ESCape "4" is the FX-286’scode for italic printing.

This same command could also be written with the "4" in place of the 52. As noted at the beginning of Appendixes G and J, many ESCape sequences can use 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.

Demonstration Programs

To help you understand control codes and ESCape sequences and to enable you to see the FX-286features in action, this manual includes demonstrations in the BASIC programming language. Although you

4-4