Epson LX-90 User Manual - Parallel 8620 PIC for LX-90 - Page 21

ESCape and ASCII, ASCII and ESCape

Page 21 highlights

ESCape and ASCII The details of printer-computer communication are complex, but for most purposes all you need to know is that the computer sends a series of codes (each consisting of one or more numbers) to the printer, and the printer interprets them. Some codes tell the printer to print a character, and other codes tell it to turn on or off certain printer functions, such as emphasized or Near Letter Quality. Because the codes between 0 and 127 are basically standardized by the American Standard Code for Information Interchange (ASCII) they are referred to as ASCII numbers in this manual. Nearly all of the codes for printer functions require more than one number and begin with a special code, called the escape code. This code signals that the next number is a code for a printer function and its name is usually printed with the first three letters capitalized (Escape) or it is abbreviated ESC or (ESC) . In the demonstration programs in this manual, you'll see how ASCII and ESCape codes are used in the Microsoft BASIC programming language. l The CHR$ (character string) function is used for numerical codes. l CHR$(27) is the ESCape code. l Quotation marks are used for printable characters, such as letters of the alphabet. l LPRINT sends text or commands to the printer. Your word processing or business program may use other methods to send those codes, such as pressing the ESC key for the ESCape code. See your software manual for further information and use Appendixes B and C of this manual to find the proper codes. Appendix E also has some suggestions on using LX-90 features with applications software. 18

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122

ESCape and ASCII
The details of printer-computer communication are complex, but
for most purposes all you need to know is that the computer sends a
series of codes (each consisting of one or more numbers) to the printer,
and the printer interprets them.
Some codes tell the printer to print a character, and other codes tell
it to turn on or off certain printer functions, such as emphasized or
Near Letter Quality. Because the codes between 0 and
127
are basi-
cally standardized by the American Standard Code for Information
Interchange (ASCII) they are referred to as ASCII numbers in this
manual.
Nearly all of the codes for printer functions require more than one
number and begin with a special code, called the escape code. This
code signals that the next number is a code for a printer function and
its name is usually printed with the first three letters capitalized
(Escape) or it is abbreviated ESC or (ESC) .
In the demonstration programs in this manual, you’ll see how
ASCII and ESCape
codes are used in the Microsoft BASIC program-
ming language.
l
The CHR$ (character string) function is used for numerical codes.
l
CHR$(27) is the ESCape code.
l
Quotation marks are used for printable characters, such as letters of
the alphabet.
l
LPRINT sends text or commands to the printer.
Your word processing or business program may use other methods
to send those codes, such as pressing the
E
SC
key for the ESCape code.
See your software manual for further information and use Appen-
dixes B and C of this manual to find the proper codes. Appendix E also
has some suggestions on using LX-90 features with applications soft-
ware.
18