2010年8月12日 星期四

The Epson Connection: Atari XE/XL

Epson Printer
---
Epson Printer Control Codes





Following are control codes for all Epson printers. Some of the functions are not available on all printers, and we've marked them with an asterisk. Refer to your printer's manual to see if it will perform the listed function, or just send the control code and see what happens. (We have not noted with asterisks some functions of which printers are capable, but which may not be available through Epson PICs or other interface devices for certain computers.)
From the BASIC programming language, the function is called with a command like LPRINT CHR$(27)"P"; in other words, placing the command LPRINT before the command shown below. From some applications, the command below can be entered after a symbol that tells the printer a control code is coming.
A lower case "n", as in CHR$(n), means a numeric value must be inserted.

CHARACTER PITCH CONTROL CODE
Compressed On
CHR$(27) CHR$(15) or CHR$(15)

Off
CHR$(27) CHR$(18) or CHR$(18)
Expanded On
CHR$(27) "W1"

Off
CHR$(27) "WO"
Expanded (one On
CHR$(27) CHR$(14) or CHR$(14)
line only) Off
CHR$(27) CHR$(20) or CHR$(20)
*Elite On
CHR$(27)"M"

Off
CHR$(27)"P"
*Proportional On
CHR$(27)"p1"

Off
CHR$(27)"p0"

PRINT ENHANCEMENTS

Emphasized On
CHR$(27)"E"

Off
CHR$(27)"F"
Doublestroke On
CHR$(27)"G"

Off
CHR$(27)"H"
*Italics On
CHR$(27)"4"

Off
CHR$(27)"5"
Underline On
CHR$(27)" -1"

Off
CHR$(27)" - 0"
*Superscript On
CHR$(27)"S0"

Off
CHR$(27)"T"
*Subscript On
CHR$(27)"S1"

Off
CHR$(27)"T"
*NLQ On
CHR$(27)"x1"

Off
CHR$(27)"x0"
*Master Select
CHR$(27)"!" CHR$(n)
International
On
CHR$(27)"R" CHR$(n)
characters Off
CHR$(27)"R" CHR$(0)

HORIZONTAL MOVEMENT

Set left margin
CHR$(27)"1" CHR$(n)
Set right margin
CHR$(27)"Q" CHR$(n)
Next tab
CHR$(9)
*Set tabs

CHR$(27)"D" CHR$(n) CHR$(n). . .
Carriage return
CHR$(13)
Backspace
CHR$(8)
Unidirectional On
CHR$(27)"U1"

Off
CHR$(27)"U0"
Unidirectional
CHR$(27)"<"
(one line only)



VERTICAL MOVEMENT

Line feed
CHR$(10)
Form Feed
CHR$(12)
Skip over perf
On
CHR$(27)"N" CHR$(n)

Off
CHR$(27)"O"
Vertical tab
CHR$(11)
*Set vert. tab


Channel 0 (all)
CHR$(27)"B" CHR$(n) CHR$(n). . .
Channel nn
CHR$(27)"b" CHR$(nn) CHR$(n). . .
*Select vert. channel
CHR$(27)"/" CHR$(nn)
Set page length


Lines

CHR$(27)"C" CHR$(n)
Inches
CHR$(27)"C0" CHR$(n)

GRAPHICS

Single density 60 dpi CHR$(27)"K" CHR$(nl) CHR$(n2)
Double density 120 dpi CHR$(27)"L" CHR$(nl) CHR$(n2)
*High speed 120 dpi CHR$(27)"Y" CHR$(nl) CHR$(n2)
*Quadruple 240 dpi CHR$(27)"Z" CHR$(n1) CHR$(n2)

9-pin single 60 dpi CHR$(27)"^" CHR$(1) CHR$(n1)


CHR$(n2)
9-pin double 120 dpi CHR$(27)"^" CHR$(2) CHR$(n1)


CHR$(n2)
n2*256+n1=number of columns reserved for graphics
Full 8-inch line, 1920 columns =CHR$(128)CHR$(7)

USER DEFINED CHARACTERS
Copy ROM to RAM
CHR$(27)":" CHR$(0) CHR$(0)


CHR$(0)
Use RAM set
CHR$(27)"%" CHR$(1) CHR$(0)
Define characters
CHR$(27)"&" CHR$(nl) CHR$(n2)
nl-n2 range of characters to be redefined
Expand redefine On
CHR$(27)"6"
area Off
CHR$(27)"7"

OTHER CODES
Sound beeper CHR$(7)
Select printer CHR$(17)
Deselect printer CHR$(19)
Disable paper-out CHR$(27)"8"
Enable CHR$(27)"9"
*Immediate print CHR$(27)"i"
*Half-speed mode CHR$(27)"s"
Cancel print buffer CHR$(24)
Cancel last char. in CHR$(127)
buffer

*Cut-sheet feeder CHR$(27)"EM"
*MSB =1 CHR$(27)">"
*MSB = 0 CHR$(27)"="
Cancel MSB Setting CHR$(27)"#"

沒有留言:

張貼留言