Ascii Codes As Chr$(N); The Escape Code - Epson P-80 User Manual

Epson printer user manual
Hide thumbs Also See for P-80:
Table of Contents

Advertisement

following chart shows many different ways of referring to the code for
return function.
the carriage
Carriage return
CR
13
0DH
CTRL/M
CHR$(13)
As you can see there are many different ways to refer to a single
code. This information helps you identify what code is being
referenced. Your computer manual may refer to ASCII 13 while your
software program refers to CTRL/M. You now know that both refer
to the same code.

ASCII Codes as CHR$(n)

The ASCII codes take on a new form when you use them with
programming languages. For example, in BASIC, the ASCII codes
take the form of CHR$(n), where n represents
capital letter A, which is the ASCII code 65, is CHR$(65). You are
telling the computer which code you
within the parentheses following the CHR$. Depending on the code,
you instruct your printer to print a character, or perform a function
(such as execute a line feed or print italics).

The ESCape code

So many features have been added to printers that even 256 ASCII
codes are inadequate if only single-code CHR$ instructions
used. Because of this, the logic of the P-80 has been designed to under-
stand special sequences of control codes, the ESCape code sequences.
This permits major expansion to the availability of control codes.
Each ESCape code sequence consists of
abbreviated (ESC)), which is
other P-80 CHR$ codes. You use these code sequences to select one or
more printing features, or modes.
For example, the ESCape code used to turn the italic print function
on is <ESC>"4". The (ESC) is the abbreviation for CHR$(27) and the
numeral
is the ASCII equivalent of CHR$(52). The <ESC>"4" is eas-
4
ier to remember than
Its common name
The abbreviation of its name
The decimal ASCII code
Its hexadecimal ASCII code
Its control-code name
Its usage in BASIC
CHR$(27),
CHR$(27)CHR$(52).
desired code. The
the
by inserting the number
want
ESCape code (usually
the
plus one or more of
be
can
the
29

Advertisement

Table of Contents
loading

Table of Contents