beautypg.com

3 escape sequences, Escape sequences -2 – AMT Datasouth 41AY89AR777 User Manual

Page 61

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

background image

4.3 ESCAPE SEQUENCES

To allow remote control of certain user programmable functions, a downline load
enhancement has been added to the printer firmware. This is accomplished
through the use of escape sequences patterned after the convention set forth by

ANSI (American National Standards Institute). The user may use escape
sequences within a program to control certain printer functions and to modify
certain operating parameters of the printer, such as tab stop and pitch. Tables 4.2
through 4.6 lists all the escape sequences which may be used in each mode of
operation.

In the escape sequences listed in the foUoAving tables, nl and are both used
as a variable. The BASIC syntax for an escape sequence differs depending on
which variable is used. When the variable nl is used, the value of nl is
represented by the ASCII character 0-9. When the variable is used, the
value of is represented by the decimal equivalent of an ASCII character
and the value of is sent as a character string.

EXAMPLE:

ESC [ nl r Sets the top margin to line nl. To set the top margin to liae 4 the
BASIC syntax is CHR$(27);"[4r"

EXAMPLE:

ESC Q Sets the right margin to . To set the right margin to 4, the
BASIC syntax is CHR$(27);"Q";CHR$(4)

Also, the user must distinguish between the characters O and 0 and the characters
1 and 1 when entering escape sequences:

O is ASCII code 4F HEX

0 is ASCII code 30 HEX

1 is ASCII code 6C HEX

1 is ASCII code 31 HEX

Make certain the values that are entered for variables are not erroneous. Numbers
which exceed the maximum or are below the minimum value will cause the
printer to default. Certain conditions which may cause the printer to default when
using escape sequences are given below.

1

.

2

.

No control codes are allowed in an escape sequence. The sequence is aborted if
a control code is detected before the sequence is completed.

If n is set to zero or a negative number or if n is set too high (132 for 10 pitch,
217 for 16 pitch) n will default to 1.

4-2

This manual is related to the following products: