Reset Code

You could turn off the Italic Mode by turning the printer off, then back on. Although turning the printer off resets the printer to its defaults, which include Roman Mode, cycling the printer off and on may disrupt computer/printer communications. FX printers have a Reset Code to avoid that: ESCape CHR$(64).

To see the Reset Code work, add these lines to your budding program:30 LPRINT CHR$(27)CHR$(64)40 LPRINT "BACK TO ROMAN WITH THE RESET CODE" and RUN it.

ITALIC CHARACTER SET

RACK TO ROMAN WITH THE RESET CODE

The Reset Code of line 30 turns off all special print modes and resets the printer to its default settings, which include Roman typeface. The top of form is also reset; now it’s at the position of the print head when your program issued the Reset Code. You can test this by using the FF button to advance the paper one page.

Notice that there is a blank line between the two lines of text in the printout. This happens because BASIC provides a line feed after every line of print commands unless you put a semicolon at the end of the line. As you will see, we often end lines with semicolons to prevent unwanted line feeds.

The Reset Code is useful when you want to turn off all printer modes. It resets everything to its start-up condition. If you have several different modes active in the printer at one time, they are all shut off by the ESCape CHR$(64).

Mode cancelling codes

The FX printer also provides specific codes to turn off each mode separately. For example, an ESCape CHR$(53) turns off the Italic character set and leaves everything else untouched. To see how the specific cancelling code for Italic Mode works, change the Reset Code in line 30 above to an ESCape CHR$(53):

30 LPRINT CHR$(27)CHR$(53);40 LPRINT "BACK TO ROMAN WITH ITALIC OFF"

45