Using the Command Summary

All three formats are equivalent, and it should be easy to pick the one most suited to your purpose. For instance, a BASIC programmer might refer to the first and second formats, a word processor might use the second, and a machine code programmer would use the third format. Variables are represented by italicized letters such as n, nl, and m. The valiables are explained in the comments section.

Note: Some application programs can use control key sequences to send commands to the printer. See the Control Key chart on page 9-4 for more information.

The simplest type of command consists of sending a single character to the printer. For instance, to print in condensed mode, you send the code 15. The code format is:

ASCII code: SI

Decimal:15

H e x a d e c i m a l : O F

More complex commands consist of two or more character codes. For example, to print in proportional mode the code

format is:

 

 

 

ASCII code:

ESC

p

n

Decimal:

27

112

n

Hexadecimal:

1B

70

n

In this case, n can be either 1 (ON) or 0 (OFF), to begin or end proportional printing. To turn ON proportional printing from BASIC, the command is:

LPRINT CHR$(27);CHR$(112);CHR$(l)

For the following commands that use only 0 or 1 for the variable, either the ASCII codes 0 and 1 or the ASCII characters

0 and 1 can be used:

ESC U, ESC x, ESC p, ESC W, ESC S, ESC -, ESC %, and ESC w.

Command Summary 9-3