Escape Sequence - Brother HL-Series Technical Reference Manual

Hide thumbs Also See for HL-Series:
Table of Contents

Advertisement

Revision C 16/01/96
4.2 Control codes
Control codes are ASCII codes that instruct the printer to perform a particular operation, such as
a line feed. You can send a control code to the printer by sending the same type of instruction
you would use to print a character using its ASCII code number. For example, the ASCII code
for a form feed is 12, so to make the printer perform a form feed use the following BASIC
statement:
LPRINT CHR$(12);
The CHR$ operator is normally used to convert an ASCII code into its corresponding character.

4.3 Escape sequence

Escape sequences tell the printer what Epson FX-850 mode function to perform. An escape
sequence consists of the Esc character followed by one or more characters which define the
operation to be performed. Send an escape sequence to the printer by sending the same type of
instruction you would use to print characters using their ASCII codes. Some escape sequences
require parameter values or data following them, for example, commands which turn a
particular feature on an off, or commands for printing graphic images. Numerical parameter
data, too, is sent to the printer as if it were a character code to be printed. For example, to
move the print position to the third column position on the page the required escape sequence is
Esc HT 3. In BASIC this would be:
LPRINT CHR$(27); CHR$(9); CHR$(3);
In some instances where a numerical parameter can only take the values 0 or 1, you have a
choice between sending the number or the character code itself as the numerical parameter.
Hence you can use CHR$(0) or CHR$(48) to represent 0, and use CHR$(1) or CHR$(49) to
represent 1. The practice of using character code numbers CHR$(48) and CHR$(49) is not
recommended, however, as it is not conducive to clear programming and, in any case, is not
universally available on commands whose parameters can only be either 0 or 1.
Chapter 5 " EPSON FX-850 " - 6

Advertisement

Table of Contents
loading

Table of Contents