Here are two examples of ESCape code sequences:

LPRINT CHR$(27)CHR$(71)

LPRINT CHR$(27)CHR$(38)CHR$(0)CHR$(1)CHR$(3)

To see how such sequences work, start a new program now by entering:

10 LPRINT CHR$(27)CHR$(52)

20 LPRINT "ITALIC CHARACTER SET"

and RUNning it. When you can RUN a program, we show you the results that you should expect:

I T A L I C C H A R A C T E R S E T

Note: If you haven’t yet read the Preface, which includes “Conven- tions Used in This Manual,” this is the time to do it. Especially important now are the passages on semicolons and on saving programs.

The FX interprets the CHR$(27)CHR$(52) sequence in line 10 above as a command to switch from Roman to Italic characters. The LPRINT in line 20 sends a string of characters to the printer to verify that the printer is in Italic Mode.

Now type:LLIST (or your system’s version of the print LIST command)to check the printer’s status as in Figure 2-1:10 LPRINT CHR$(27) CHR$(52)

20 LPRINT "ITALIC CHARACTER SET"

Figure 2-1. Italic listing

Since all the text is still printed in Italic characters, you can see that this mode stays on until it is turned off. This is typical of the modes on FX printers: nearly all modes stay on until turned off. We will alert you to the few exceptions.

If your printer is printing one line on top of another or if it is double spacing, you need to change the setting of the FX’s DIP switch 2-4.

43