Background Text Printer
by D.J.Holden

This application allows any text file to be printed on an FX-80 compatible printer as a background task, while you continue with other applications. When run, this program installs its icon on the icon bar. Clicking Menu over that icon displays a menu allowing various options to be set.

The Text Style submenu allows any of the available styles (N.L.Q., Condensed etc.) to be selected. The Page Length, Left Margin and Skip Lines submenus allow the corresponding options to be set. These options can be toggled on or off by clicking on the corresponding entry in the top level menu.

Choosing Reset generates a printer reset (Esc-@), while choosing Stop Print aborts the current print job. Finally Quit terminates the program.

Dragging a file icon results in the file being printed out. If the file type is not one of Text, Command or Obey, then the program will request confirmation before printing it. The printing takes place in the background, so that other applications can still be used while printing is taking place. The number of bytes left to be printed is displayed below the icon bar icon.

The print job starts with any codes required to set up the selected options (text style, page length etc.), followed by the contents of the file. Apart from any pound signs (ASCII 163), which are replaced by an escape sequence to correct for the fact that most printers print pound signs as hashes, the file is sent to the printer unchanged, so additional control codes may be included in the file.

The program can be easily modified according to requirements. Relevant parts are: PROCfonts (2020) and PROCset_font (1900), which determine the available text styles; lines 440-460, which generate the codes for page length, left margin and skip lines; line 650, which determines which file types are accepted without confirmation; line 760, which determines the sequence used to print pound signs, and line 1130, which sends the printer reset sequence.

All printed output is sent to the device 'Printer:', so the printer type must be set up correctly, either by the '*Configure Print <n>' option, or with *FX 5,<n>, otherwise output will be sent to the wrong place.
