This equipment generates
used properly, that is, in strict accordance with the manufacturer’s instructions,
may cause interference to radio and television reception. It has been type tested and
found to comply with the limits for a Class B computing device in accordance with
the specifications in Subpart J of Part 15 of FCC rules, which are designed to
provide reasonable protection against such interference in a residential installation.
However, there is no guarantee that interference will not occur in a particular
installation. If this equipment does cause interference to radio or television
reception, which can be
is encouraged to try to correct the interference by one or more of the following
measures:
-Reorient the receiving antenna
-Relocate the printer with respect to the receiver
-Plug the printer into a different outlet so that printer and receiver are on
different branch circuits.
If necessary, the user should consult the dealer or an experienced radio/ television
technician for additional suggestions. The user may find the following booklet
prepared by the Federal Communications Commission helpful:
“How to Identify and Resolve Radio-TV Interference Problems. ”
This booklet is available from the U.S. Government Printing Office, Washington
DC
20402.
Stock No.
and
uses radio frequency energy and if not installed and
determined by turning the equipment off and on, the user
004-000-00345-4.
WARNING
The connection of a non-shielded printer interface cable to this printer will
invalidate the FCC Certification of this device and may cause interference levels
which exceed the limits established by the FCC for this equipment. If this
equipment has more than one interface connector, do not leave cables connected
to unused interfaces.
Apple is a registered trademark of Apple Computer, Inc.
Applesoft is a trademark of Apple Computer, Inc.
Centronics is a registered trademark of Centronics Data Computer
Corporation.
Epson is a registered trademark of Seiko Epson Corporation.
LX-80
is a trademark of Epson America, Inc.
IX-86 is a trademark of Epson America, Inc.
IBM is a registered trademark of International Business Machines
Corporation.
Microsoft is a trademark of Microsoft Corporation.
NOTICE:
l
All rights reserved. Reproduction of any part of this manual in any form
whatsoever without EPSON’s express written permission is forbidden.
l
The contents of this manual are subject to change without notice.
l
All efforts have been made to ensure the accuracy of the contents of this
manual. However, should any errors be detected, EPSON would greatly
appreciate being informed of them.
l
The above notwithstanding, EPSON can assume no responsibility for any
errors in this manual or their consequences.
Paper separator and paper guide
Tractor release levers
E-5
Pin feed holder adjustment
E-6
Open pin feed cover
E-7
Top of page position.
E-8
...........................
..........................
..........................
.........................
............
................
................
....................
E-l
E-2
E-2
E-3
E-4
E-5
E-5
E-6
I-l
Parallel interface timing
.......................
List of Tables
2-l
SelecType modes
Summary of LX-86 pitches.
5-1
6-1
International characters in NLQ mode.
6-2
International characters in draft mode.
International characters in draft italic
6-3
Graphics modes
9-l
DIP switch functions
D-l
International DIP switch settings
D-2
Pins and signals
I-l
Signal interrelations
I-2
............................
.............................
.........................
.............................
..........................
....................
...........
...........
............
................
I-3
17
38
49
49
50
78
D-2
D-2
I-l, I-2
I-4
. . .
Vlll
Introduction
The Epson IX-86
printer combines low price with the high quality
and advanced features formerly available only on more expensive
printers.
LX-86 Features
In addition to the high performance and reliability you’ve come
to expect from Epson printers, the LX-86 offers:
l Draft mode for quick printing of ordinary work
l Near Letter Quality mode for top quality printing
l Selection of typestyles with the control panel
l Fast printing (120 characters per second in draft pica)
l A variety of print styles, including Roman, italic, six widths,
and two kinds of bold printing
l User-definable characters so you can create and print your own
symbols or characters
l High-resolution graphics for charts, diagrams, and illustrations
l Easy paper loading
l Ribbon cassette for quick and clean ribbon changing
l Epson Standard Character Graphics set, which includes char-
acter graphics that are used on IBM@ and compatible
computers as well as international characters used by IBM
software. These characters are shown below:
1
About This Manual
We’re not going to waste your time with unnecessary information,
but we won’t neglect anything you need to know about the Ix-86
and its many features.
You can read as much or as little of this manual as you wish. If you
have used printers before and have a specific program that you want
to use with the LX-86, a quick reading of the first chapter may be all
you need. If, on the other hand, you are new to computers and
printers, you will find this manual easy to follow and the LX-86 easy
to use. No matter what your background, if you want to learn about
and experiment with all the advanced features of the LX-86, the
information you need is here.
For a preview of what your LX-86 can do, look at the following
samples of a few of its typestyles.
*
NEAR LETTER QUALITY
NLQ standard
NLQ
*DRAFT MODE
Pica
Elite
Condensed
Italic
Underlined
Emphasized double-width
emphasized
ABCDEFGHIJKLMnopqrstuvwxyz
ABCDEFGHIJKLMnopqrstuvwxyz
ABCDEFGHIJKLMnopqrstuvwxyz
ABCDEFGHIJKLMnopqrstuvwxyz
ABCDEFGHIJKLMnopqrstuvwxyz
ABCDEFGHI.JKLMnopqrstuvwxyz
ABCDEFGHIJKLMnopqrstuvwxyz
2
Chapter
1
Setting Up Your LX-86 Printer
Setting up your LX-86 printer is a simple matter of attaching two
parts, putting in the ribbon and paper, and connecting the printer to
your computer.
This chapter will have you printing a test pattern within fifteen to
twenty minutes and doing more complicated work not long after.
Printer Parts
First, see that you have all the parts you need. In addition to this
manual, the printer box should contain the items shown in Figure 1-l.
* In the United States, the printer is delivered with the power
cord attached.
Figure l-l. Printer parts
3
In addition to the items in the box, you need a cable and possibly
an interface board. The cable connects the printer to your computer,
and the interface board is necessary only for those computers that
can’t use the LX-86’s Centronics® paralle1 interface. Your computer
manual or your dealer will tell you which cable you need and whether
or not you need a special interface.
Printer Location
Now that you have unpacked your printer, you should choose a
suitable location for it. The main requirement, of course, is that the
printer be close enough to your computer for the cable to reach. Also
remember the following:
l Use a grounded outlet, and do not use an adapter plug.
l Avoid using electrical outlets that are controlled by wall switches.
Accidentally turning off a switch can wipe out valuable information in your computer’s memory and disrupt your printing.
l Avoid using an outlet on the same circuit breaker with any large
electrical machines or appliances. These can cause disruptive power fluctuations.
l Keep your printer and computer away from base units for cordless
telephones.
l Protect the printer from direct sunlight, excessive heat, moisture,
and dust. Make sure that it is not close to a heater or other heat
source.
Paper Feed Knob Installation
Now that you have chosen where to set up your LX-86, the first
and simplest piece to install is the paper feed knob, which you use to
manually advance the paper-lust as you do on a typewriter. To
install the knob, merely push it onto the shaft found in the hole on the
right side of the printer. (See Figure l-2.) The shaft has one flat side
that must be matched with the flat side of the hole in the knob.
4
Figure 1-2. Paper feed knob installation
Ribbon Installation
The LX-86 printer uses a continuous-loop, inked fabric ribbon,
which is enclosed in a cassette that makes ribbon installation and
replacement a clean and easy job. The parts of this cassette are labelled
in Figure
l-3.
Ribbon
Knob
Pin
Figure
l-3.
Ribbon cassette
Pin
5
To install the ribbon, first open the lid at the front of the LX-86 so
that you can see the print head assembly shown in Figure
the assembly by hand to the center of the printer so that the other
parts of the printer will not get in your way. Also be sure that the
paper bail is against the black roller so it too will not be in your way.
Note: Moving the print head by hand when the printer is turned on
can harm the printer. Always be sure that the printer is turned
off before you move the print head.
l-4.
Move
Figure 1-4. Print bead assembly
6
Then hold the ribbon cassette so that the small knob is on top and
the exposed section of ribbon is away from you. Insert the cassette in
its holder by first sliding the pins at the back of the ribbon cassette
under the small hooks on the holder. (See Figure l-5.) Then lower the
front of the cassette so that the exposed section of ribbon can fit
between the print head nose and the silver ribbon guide. Push down
until the cassette fits firmly in place.
Figure 1-5. Ribbon cassette installation
7
Now turn the knob on the cassette in the direction of the arrow to
tighten the ribbon. As you turn the knob, see that the ribbon slips
down into its proper place between the print head nose and the silver
ribbon guide (Figure l-6). If it doesn’t, guide it with a pen or a pencil.
Figure l-6. Ribbon placement
Ribbon Replacement
When your printing begins to become light and you need to re-
place the ribbon, lift the front of the cassette to remove it and then
follow the above instructions with a new cassette. If you have been
using your printer just before you change cassettes, be aware that the
print head becomes hot during use. Be careful not to touch it. Also
remember never to move the print head by hand when the printer is
turned on.
8
Paper Loading
Now put a sheet of paper in your LX-86 so you can test it. Figure
l-7 shows the names of the parts
that you need to know.
Friction lever
Figure l-7. LX-86 ready for paper loading
9
See that the printer is turned off, open the front lid, and push the
friction lever back and the paper bail forward. Then move the print
head by hand to the center of the printer and feed the paper into the
paper slot in the top of the printer.
When the paper will not go any farther, turn the paper feed knob
to advance it as you would with a typewriter. Turn the knob until the
top of the paper is at least 3/4-inch above the ribbon guide. Then push
the paper bail against the paper. If the paper becomes crooked, pull
the friction-release lever forward, straighten the paper, and push the
friction lever back.
If you have the optional tractor unit for continuous pin-feed paper,
see Appendix E for instructions on its use.
Control Panel
Now that your paper is loaded, it is time to plug in the printer
and see what the buttons on the control panel do. First, see that
the power switch on the right side of the printer is off. Then plug
in the power cord. Now turn on the power switch and look at the
control panel.
10
Figure l-8. Control panel
There are three buttons and four indicator lights on the control panel.
Lights
l
The POWER light glows green when the power is on.
l
The READY light glows green when the printer is ready to accept data.
This light flickers somewhat during printing.
• The PAPER OUT light glows red to indicate that the printer is out of
paper or the paper is loaded incorrectly.
• The ON LINE light glows green when the printer can receive data.
Buttons
The buttons have several functions, including selecting draft or NLQ
(Near Letter Quality) printing. Draft is good for quick printing of
ordinary work, and NLQ has more fully-formed characters for final
copies or special purposes.
This is high-quality NLQ printing.
This is fast
l
ON LINE/OFF LINE. This button switches the printer between
draft
printing.
on-line and off-line status. When the printer is on line, the ON
LINE light glows and the printer is ready to accept data.
l FORM FEED/NLQ. When the printer is on line, pressing this
button turns on NLQ. When the printer is off line, this button
advances the paper to the top of the next page.
l LINE FEED/DRAFT. When the printer is on line, this button
turns on draft printing. When the printer is off line, this button
advances the paper one line at a time.
11
Test Pattern
Now you’ll see your Lx-86 print something even though it’s not
connected to a computer yet. Make sure that your printer has paper in it
and that the power switch is off. Now, hold down the LINE FEED button
on the control panel while you turn the printer on with the power switch.
The Lx-86 will begin printing all the letters, numbers and other
characters that are stored in its ROM (Read Only Memory) for the draft
mode. When the printing starts, you can release the LINE FEED button;
the printing will continue until you turn the printer off or until the print
head gets near the end of the page. To see the same test in the NLQ (Near
Letter Quality) mode, turn the printer on while holding down the
FORM FEED button. Partial results of both tests are shown in Figure 1-9.
Now that the test pattern has shown that your printer is working
well, it’s time to hook it up to your computer. It is best to have both
the printer and the computer turned off when you do this.
Remember that each computer system has its own way of com-
municating with a printer. If your computer expects to communicate
through a Centronics parallel interface, all you need is a cable. If your
computer requires any other kind of interface, you will also need an
interface board.
If you don’t know what a Centronics parallel interface is, your
computer manual or your dealer will tell you what you need. Then,
once you have plugged your printer cable into your printer and
computer, you will probably never think about interfaces again. (If
you do want the technical specifications, however, you can find them
in Appendix I.)
The first three steps in connecting your printer and computer are
shown in Figure l-10. Plug one end of your printer cable into the
cable connector of your LX-86 printer. The plug is shaped so that
there is only one way it will fit the connector. Now secure the plug to
the printer with the wire clips on each side of the connector. These
clips insure that your cable will not be loosened or unplugged
accidentally. If your cable has a grounding wire, fasten it to the
grounding screw below the connector.
Figure I-10. Cable connection
Grounding
screw
Grounding
wire
13
Next connect the other end of the printer cable to your computer.
On most computers you can easily find the correct connector for the
printer cable, but if you are not sure, consult your computer manual
or your dealer.
First Printing Exercise
Now it is time to see something more interesting than the test
pattern from your LX-86 printer. Your next step depends upon what
kind of printing you plan to do. If you have a word processing or
other commercial software program, just load the program in your
computer, follow its printing instructions, and watch your Lx-86
print. If you plan to use your LX-86 for printing program listings,
load a program and use your computer system’s listing command
(LLIST for Microsoft
Note: If all the lines of your first printing exercise are printed on top
of each other, don’t worry. There is nothing wrong with your
printer. All you have to do is change the setting of a small
switch in the back of your printer. See the section on automatic line feeds in Appendix D.
TM
BASIC, for example).
14
Chapter 2
SelecType
The LX-86’s SelecType feature can produce four special
typestyles:
This is emphasized printing.
This is
This is condensed printing.
This is in the elite mode.
SelecType Operation
Using SelecType is easy. You turn on SelecType and select a type-
style, then turn off SelecType and print.
Note: Each button has two names. For convenience, this chapter
uses the top names of the buttons.
Turning SelecType on
1. Make sure that the printer is on and that the POWER, READY,
and ON LINE lights are all on.
in the double-strike mode.
2.
Press both the OFF LINE and FORM FEED buttons at the same
time, as illustrated in Figure 2-l. Hold them down for at least a
second, then release them.
15
Note: If the printer beeps twice before you release the buttons,
you have pressed the FORM FEED button before the OFF
LINE button instead of at the same time and the LX-86 is
in the NLQ mode. Press the OFF LINE button to put the
printer back on line and press the DRAFT button if you do
not want NLQ. Then press both the OFF LINE and FORM
FEED buttons to turn on SelecType.
Figure 2-1. Turning SelecType on
When you release the OFF LINE and FORM FEED buttons,
the LX-86 signals in three ways that SelecType is on.
• The printer beeps.
l
The READY light turns off.
• The ON LINE light begins flashing.
Selecting typestyles
In SelecType, each button has a function:
• OFF LINE selects typestyles.
*FORM FEED sets the styles.
•LINE FEED turns SelecType off.
16
After turning on SelecType, follow these three steps to select
2. Press the OFF LINE button the number of times indicated in
the mode column. Be sure that the printer beeps each time you
press the OFF LINE button.
3. Press the FORM FEED button to set the typestyle.
4. Press the LINE FEED button to turn SelecType off. The control
panel returns to its normal functions, but the printer is off-line.
5. Press the OFF LINE button, and you are ready to print.
SelecType exercise
You don’t need to know anything about programming for this
exercise because it is merely for practice. If you would rather not use
BASIC, use your word processing or business program to create a
short file or document of the type you will usually print.
If you do want to use BASIC for this exercise, simply turn on your
computer and printer and load BASIC. Then type the short
program listed below. Only the words inside the quotation marks
are printed. You can put anything you want there. (If your version of
BASIC does not use LPRINT, consult your BASIC manual.)
10 LPRINT “This is an example”
20 LPRINT ” of LX printing. ”
17
Now, run the program by typing RUN and pressing RETURN, or
print your file or document by following the printing instructions of
your software. The LX-86 will print your example in standard singlestrike printing, as shown below:
This is an example
of LX printing.
Now that you have created a sample, follow these steps to print it
in condensed mode:
1.
See that both the ON LINE and READY lights are on.
2. Press the OFF LINE and FORM FEED buttons at the same time,
then release them. You hear a beep to signal that SelecType is on.
3. As shown in Table 2-1, the code for condensed is three. Therefore,
press the OFF LINE button three times. (Remember to make sure
you hear a beep each time you press the OFF LINE button when
you are in SelecType mode.)
4. Now that you have selected the condensed mode, push the
FORM FEED button once to set it.
5. Push the LINE FEED button once to return the panel to its standard operation.
6. Press the OFF LINE button so the IX-86 is ready to print.
Now you have set the LX-86 to print in condensed mode. Print
your sample once more. It should appear in condensed mode just as
you see below:
This is an example
of LX printing.
Turn off your printer to cancel the condensed setting, and-
if you wish-try this exercise with other modes.
Note: Some applications programs are designed to control all
typestyle functions. These programs cancel all previous
typestyle settings by sending an initialization signal before
printing. Because this signal cancels SelecType settings, you
will have to use the program’s print options function
instead of SelecType to select your typestyles. Therefore, if
SelecType does not work with a particular applications
program, consult its manual on how to select typestyles.
18
SelecType Tips
Once you have learned the simple technique for controlling print
styles with SelecType, you can use it whenever you wish.
You should be aware of a few restrictions, however.
l
SelecType is designed to control the printing of an entire file or
document, not an individual line or word.
l If you are using the NLQ mode, remember that the following
SelecType modes are not available in NLQ: condensed, double-
strike, and elite.
l
If there are print codes in the document or file you are printing,
those codes will override your SelecType settings. This seldom
happens, since you usually won’t use SelecType with files that have
such codes, but if your IX-86 follows the SelecType instructions for
only part of a document, print codes in the document may
conflict with the SelecType modes.
l
After you turn on a mode with SelecType, it stays in effect until the
printer is turned off. If, for example, you use SelecType to print a
document in emphasized, anything you print after that will be
emphasized unless you first turn the printer off and back on.
19
Chapter 3
Elements of Dot Matrix Printing
This chapter is for those of you who want to know something
about how your printer works. It’s a simple, non-technical explanation of the basics of dot matrix printing that will help you understand
some of the later chapters.
The Print Head
The IX-86 uses a print head with nine pins or wires mounted
vertically. Each time a pin is fired, it strikes the inked ribbon and
presses it against the paper to produce a dot. This dot is about 1/72nd
of an inch in diameter. The size varies slightly depending upon the age
of the ribbon and the type of paper used. As the head moves horizontally across the page, these pins are fired time after time in different
patterns to produce letters, numbers, symbols, or graphics.
For example, to print a pica capital T, the head fires the top pin,
moves 1/60th of an inch, fires the top pin again, moves 1/60th of an
inch, fires the top seven pins, moves 1/60th of an inch, fires the top
pin, moves another 1/60th of an inch, and fires the top pin once more
to finish the letter.
Figure 3-l. A capital T
21
Bidirectional Printing
In nearly all of our discussions in this manual, we describe the
action of the LX-86 print head as moving from left to right, as a
typewriter does. During its normal operation while printing in the
draft mode, however, the LX-86 prints bidirectionally. That is, the
print head goes from left to right only on every other line. On the
other lines it reverses everything and prints right to left.
By reversing both the dot patterns and the printing direction, the
LX-86 produces a line that is correct and looks no different from a
line printed from left to right. It does this to save time. Otherwise, the
time the print head takes to go from the right margin back to the left
would be wasted.
The intelligence of the printer takes care of all the calculations
necessary for this bidirectional printing, so you don’t have to be
concerned about it. You simply do your part of the work as if the
printer will be printing from left to right on each line and let the
LX-86 do all the necessary calculations so that you can enjoy the
increased speed.
Changing Pitches
In addition to pica, in which there are 10 characters per inch,
the LX-86 can also print in other widths, or pitches. It does so by
reducing the distance between pin firings. In the elite mode it
prints 12 characters per inch and in the compressed mode it prints
17 characters per inch. The pattern of the dots is not changed, but
the horizontal space between them is reduced.
In Figure 3-2 are enlargements of four sample letters in each of the
three pitches. These letters are chosen to show how the LX86 prints
letters that are uppercase and lowercase, wide and narrow, and with
and without descenders (the bottom part of the y).
22
In Figure 3-3 there is a grid of lines behind the pica characters so
that you can more easily see how they are designed. As you look at
these characters you can see three rules that govern their design: the
column on the right side is always left blank so that there will be
spaces between the characters on a line; no character uses both the top
and the bottom row; and a dot can be placed on a vertical line only
when the columns next to that line are not used.
Figure 3-3. LX-86 dot matrix characters
NLQ Mode
The preceding examples are in the LX-86’s draft mode, but the
LX-86 also has the high-quality NLQ (Near Letter Quality) mode
that you have seen in previous chapters.
The NLQ letters are more fully formed than the draft letters because they are made up of many more dots. Two differences between
draft and NLQ printing enable the IX-86 to print such a large number of dots for each character. In the NLQ mode, the head moves
more slowly, so that dots can overlap horizontally, and each character
is printed with two passes of the print head.
To further ensure the quality of NLQ characters, both passes of the
print head are in the same direction so the alignment of the dots is
exact.
Because the NLQ mode uses two passes for each line and prints
only in one direction, your printing does take longer in this mode.
With the two modes, draft and NLQ, the IX-86 lets you choose
high speed or high quality each time you print. You can print your
ordinary work or preliminary drafts quickly in the draft mode and
use the NLQ mode for final copies or special purposes.
24
The panel buttons make it especially easy to change from draft
to NLQ, but you can also select and cancel the NLQ mode with a
software command which you can find in Chapter 5.
25
Chapter 4
Printer Control Codes
The LX-86 printer is easy to use, especially with commercial software that has print control features. This chapter explains some of the
basics of printer control and communications to help you understand
how a computer communicates with your printer. This information
should also help you understand the terms used in your software or
computer manual.
If you are an advanced user or a programmer, you may want to
turn to Appendix C, which has a full summary of all the Ix-86
commands.
ASCII Codes
When you write a document with a word processing program, you
press keys with letters on them. When you send the document to a
printer, it prints the letters on paper. The computer and the printer,
however, do not use or understand letters of the alphabet. They
function by manipulating numbers. Therefore, when you press the A
key, for example, the computer sends a number to its memory. When
the computer tells the printer to print that letter, it sends the number
to the printer, which must then convert the number to a pattern of
pins that will fire to print the dots that make up that letter.
The numbers that computers and printers use are in binary form,
which means that they use only the digits 0 and 1. In this manual,
however, we use decimal numbers in our explanations because most
users are more familiar with these numbers and because most programming languages and applications programs can use decimal numbers. The computer system or the program takes care of changing the
decimal numbers to binary form for you.
27
Computer and printer interaction would be terribly confusing if
different kinds of computers and printers used different numbers for
the same letter of the alphabet. Therefore, most manufacturers of
computers, printers, and software use the American Standard Code
for Information Interchange, usually referred to as ASCII (pronounced ASK-Key). The ASCII standard covers the decimal numbers from 0 through 127 and includes codes for printable characters
(letters, punctuation, numerals, and mathematical symbols) and a few
control codes, such as the codes for sounding the beeper and performing a carriage return.
Although other codes are not standardized in the computer industry, the ASCII system means that at least the alphabet is standardized.
A programmer or engineer knows, for example, that 72 is the decimal
code for a capital H and 115 is the code for a lowercase s no matter
what system he or she is using.
ESCape Code
Although the original ASCII standard was designed to use the
decimal numbers 0 through 127, computer and printer manufacturers soon extended this range (to 0 through 255) in order to
make room for more features. On the IX-86, for example, the
codes from 160 through 254 are used for italic or character
graphics characters. Because even this extended range is not
enough for all the features used on modern printers, the range is
further extended with a special code called the Escape code. This
code is often printed with the first three letters capitalized
(ESCape) or abbreviated as ESC or <ESC> .
With the ESCape code, for which decimal 27 is used, printers and
computers are not restricted to only 256 instructions. The ESCape
code is a signal that the next code will be a printer control code
instead of text to print. For example, if the printer receives the number 69, it prints a capital E because 69 is the ASCII code for that letter.
If, however, the printer receives a 27 just before the 69, it turns on
emphasized mode, because ESCape “E” is the code for emphasized.
You can see how important the ESCape code is by looking at
Appendixes B and C. There you will see that nearly every code the
LX-86
uses is an ESCape code.
28
Printer Codes
To take advantage of the many print features of the IX-86, you
can use a software program that sends the correct codes or you can
use another method to send codes. It’s not possible to be as precise
and specific as we would like in the rest of this chapter because the
IX-86 works with so many different applications programs and computer systems. If we gave precise instructions on how to use your
LX-86 with every one of them, this manual would fill at least four
volumes and would have to be updated every month.
We will, therefore, give you the general principles of how software
communicates with your printer, plus several ways the codes of the
LX-86 are used by applications programs such as word processing
and business programs. With this information and possibly some help
from your dealer or the manual for your applications program, you
can take advantage of all the features of the LX-86 that you want to
use. Incidentally, there is no standard terminology for software
codes; thus, the terms in your software manual may be different from
the ones we use here.
In general there are three ways you send printer codes with com-
mercial software:
l Using SelecType, the feature described in Chapter 2.
l Instructing the program during an installation or setup procedure
so that you can then use codes that are typed in along with your
text or numbers; we call these embedded codes.
l Inserting LX-86 printer codes in your text along with a special
code that tells the printer that the inserted codes are not text or
data.
There are three common formats for sending printer codes. Your
applications software or its manual should tell you which one to use.
l Decimal numbers-for example, 27 is the decimal number for the
ESCape code, and 13 is the decimal number for a carriage return.
l Hexadecimal numbers, in which the ESCape code is 1B and a
carriage return is OD. You don’t have to understand hexadecimal
numbers to use them. If your software calls for hex numbers, just
consult Appendix B or the Quick Reference Card for the
appropriate number.
29
l The ESCape and control keys on your computer’s keyboard. With
this system you send the ESCape code by pressing the ESCape
key and a carriage return by pressing the control key and the M at
the same time. (See Appendix B or the Quick Reference Card for
the control key codes.)
Embedded codes
A program that uses embedded codes usually has its own set
of codes that you type into your document or file. When the program receives one of these codes, it sends the proper code to the
LX-86. For example, one popular word processing program has
you turn italic mode on and off by pressing the control key and P
and then pressing the Q. So if you want to italicize a word, you type
Control-PQ before it and after it. When the program reaches the first
Control-PQ, it sends the code to turn italic mode on, and when it
reaches the second, it sends the code to cancel italic. Please note that
these are not the same as the control key codes mentioned above.
Once you tell such a program that you are using an Epson printer,
it will know which codes to send. (Often you don’t even need to
specify which Epson printer you are using.) You usually tell the
program what printer you are using through an installation or set-up
procedure. The instructions should be in your software manual. In
addition, your software or computer dealer may be able to help you.
Many programs that use embedded codes also have a few commands that the user can define. If you are new to using printers, don’t
worry about these yet. Just use the standard features. Later, when
you are more familiar with your software and with your LX-86, you
may want to investigate the user-defined commands and customize
your program.
Inserted codes
To take advantage of some of the advanced features of the IX-86,
some programs require inserted codes. Those codes allow you to send
commands to the printer in the middle of text or data. In most of
these programs one code signals that the next numbers are printer
instructions, not text or data. In one such program, for example, you
type Control-V (pressing V while holding down the control key) to
signal the beginning of printer instructions. Then you enter your
print codes and type Control-V again to signal the end of the printer
instructions.
30
If your word processing program allows inserted codes, it will
probably do standard printing without such codes. It is only for
special features that you will need to use inserted codes. For
example, if you want to have headings in wide bold printing
(called double-width emphasized), you would probably have to
use inserted codes. For the program we mentioned above you
would type Control-V, then the code for double-width empha-
sized, Control-V again, and then the text of the heading. The
codes for double-width emphasized are in Chapter 6 and
Appendix C.
Again, if this sounds terribly complicated, don’t worry. Use your
LX-86 with the standard features of your word processing program
until you become more familiar with both of them. Then you can
decide whether or not you need or want to learn to use inserted
codes.
See your software documentation for further information.
Programming Languages
If neither of the methods described above seems appropriate for
your application, you can write a program in BASIC or any other
programming language to send control codes to your printer. In the
chapter on page formatting you will find examples of such programs.
Just remember that with this method your printer control code stays
in effect for the whole document you print. This method is good for
setting margins, for example, but does not work for italicizing a word.
Now you have some background on how printers work and how
software can communicate with them. Turn to the next chapters to
learn about the specific features of your LX-86 printer.
31
Chapter 5
IX-86 Features
Beginning with this chapter we describe many of the printing features of the LX-86. Although we include programs that demonstrate
these features, you don’t have to be a programmer to learn about the
features from these chapters. How much of the rest of this manual
you use depends upon your expertise, your interest, and the software
you plan to use.
(Demonstration Programs
Along with our discussion and examples of the LX-86 features, we
include demonstrations in the BASIC programming language so that
you can see these features in action. Although we know that you will
probably not do much of your printing using BASIC, we chose it for
our demonstrations because most computer systems include some
form of BASIC, so our examples are ones that almost every one of
you can try.
You don’t need to know anything about BASIC to type in and run
these programs. Just check your BASIC manual to see how to load
BASIC in your computer and how to run a program. As you run the
programs (or even as you read the explanations and look at the
printed examples), you learn how the LX-86 responds to the messages your computer sends it by printing letters, numbers, symbols,
and graphics in various print modes.
Even if you never use BASIC again, you will know the capabilities of your printer, capabilities that can often solve your printing
problems. For example, if you need a special symbol you will know
that you can turn to the chapter on user-defined characters and
create such a character.
33
If you don’t want to do the exercises in
Many users are quite happy with their printers without ever learning
any more about them than how to turn them on and off and how to
load paper. Therefore, you shouldn’t be intimidated by the information in this manual. In most cases the software that you use for word
processing, business, or graphics does the calculating and communicating with the printer for you.
In fact, because of Epson’s long-standing popularity, many programs are designed to use Epson printers quite easily. Often all you
need to do is specify in an installation program that you are using an
Epson printer. Then the program sends the correct codes for the
various printing functions. The installation process, if there is one, is
explained in the manual for your software program.
BASIC,
you don’t have to.
We have designed these chapters so that you can concentrate on
using the features of the LX-86 instead of on programming, but
a few instructions are necessary. Because the examples in this
manual are in Microsoft BASIC (MBASIC), one of the most widely
used types of BASIC in personal computers, most users can enter
and run the programs exactly as they appear in these pages.
If your computer system uses any other kind of BASIC, you may
have to make a few changes. Probably the only item you will need to
change is the instruction LPRINT, which is the MBASIC command
to send something to the printer. Some forms of BASIC use PR#l at
the beginning of a program to route information to the printer and
PR#O at the end to restore the flow of information to the screen. If
you have such a system, just put PR#l at the beginning of your
program and then use PRINT instead of LPRINT in the programs. If
you have any other system, consult its manual to see if any modifications to our programs are necessary.
In Chapter 3 you saw the enlargements of the three LX-86 pitches.
Now you’ll learn how to produce them.
Pica Printing
The first exercise is a simple three-line program to print a sample
line of characters in pica, the standard pitch. Just type in this program
exactly as you see it:
40
FOR X=65 TO 105
50 LPRINT CHR$(X);
60 NEXT X: LPRINT
34
Now run the program. You should get the results you see below,
10
pica characters per inch.
ABCDEFGHIJKLMNOPQTRSTUVWXYZ[\]ˆ_`abcdefghi
Changing Pitches
Now you can try other pitches. As we explained in Chapter 3, the
IX-86 uses the same pattern of dots for pica, elite, and condensed
characters, but it changes the horizontal spaces between the dots to
produce the three different widths.
In elite mode there are 12 characters per inch, and in condensed
there are
“M” command and prints in condensed when it receives the
ASCII 15 command. Print a sample line of elite characters by
adding this line to your previous program:
20 LPRINT CHR$ (27) “M” ;
This line uses the command for elite, ESCape “M”, to turn on that
mode. Your printout should look like the one below.
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\lˆ_`abcdefghi
17.
The LX-86 prints in elite when it receives the ESCape
The next addition to the program cancels elite with ESCape “P” and
turns on condensed with ASCII
15:
30 LPRINT CHR$ (27) “P” CHR$ (15) ;
Now run the program to see the line printed in condensed mode.
ABCDEFHIGKLMNOPQRSTUVWXYZ[\]ˆ_`abcdefghi
Cancelling Codes
As you saw in the third version of the print pitch program, you
must cancel a code when you do not want it any more. With very
few exceptions, the LX-86 modes stay on until they are cancelled.
It is important to remember this because an
on even if you change from BASIC to another type of software. For
example, if you print a memo with a word processing program
after you run the program above, the printer will still be in
condensed mode; therefore, the memo will be in condensed
print. To cancel, use ASCII
18.
LX-86
mode can stay
35
To avoid having one program interfere with the printing modes of
another, you can cancel a mode one of two ways:
l With a specific cancelling code, such as the ESCape “P” that we
used above to cancel elite. Each mode has a cancelling code, which
you can find in the discussion of the code and in Appendix B. Pica
is an exception to this rule. To cancel pica, turn on elite.
l By resetting the printer, a method explained in the next section.
Resetting the Printer
Resetting your LX-86 cancels all modes that are turned on. You
can reset the printer with one of two methods:
l Sending the reset code (ESCape “@”)
l Turning the printer off and back on.
Either one of these methods returns the printer to what are
called its defaults, which are the standard settings that are in effect
every time you turn the printer on. The two effects of resetting the
printer that you should be concerned with are: it returns the
printing to single-strike pica, thus cancelling any other pitches or
enhancements you may have turned on with control codes or
SelecType, and the current position of the print head becomes the
top of page setting.
Some of our demonstration programs end with a reset code so that
the commands from one program will not interfere with the commands in the next one. After you run a program with a reset code in
it, remember to change the top of page setting before you begin
printing full pages.
Pitch Comparison
Now that you have used three short programs to produce samples
of the main pitches, you can choose the pitch that you prefer or the
one that best fits a particular printing job. Most people use either
pica or elite for printing text and condensed for spreadsheets or
other applications in which it is important to get the maximum
number of characters on a line.
36
In fact, if you need even more than the
that condensed gives you, you can combine elite and condensed
for a mode we call condensed elite. It is not really another pitch,
because the size of the characters is the same as in the condensed
mode; only the space between the characters is reduced. You can
see this mode, which allows 160 characters to fit on a line, if you
replace line 30 in your last program with this line:
132
characters per line
30 LPRINT CHR$(l5);
With this addition, the program turns on condensed but doesn’t
turn off elite, giving you the printout below:
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]ˆ_`abcdefghi
If your printout is different, you may need a
such as the one below:
WIDTH
statement
5 WIDTH LPRINT 255
The format for your system will probably be different. Consult
your
BASIC
manual.
Near Letter Quality Mode
The examples so far in this chapter are in the draft mode, and
you have already learned how to turn on the NLQ mode with a
panel button, but you can also see the NLQ mode with the
following program:
10 LPRINT CHR$ (27) “x” CHR$ (1) ;
20 FOR X=65 TO 105
30 LPRINT CHR$ (X);
40 NEXT X: LPRINT
Note that you use a lowercase x, not a capital X, in line 10.
Because of the high resolution of the NLQ mode, it prints only in
pica, not in elite or condensed.
37
All the modes demonstrated in this chapter are compared in Table
5-l.
Table 5-1, Summary of LX-86 pitches
Print sample
1 inch
Near Letter Quality
Pica print
Elite print
Condensed print
Condensed elite print
CPI
10.00
10.00
12.00
17.16
20.00
Codes
on
ESC "x" 1
ESC "P"ESC "M"
ESC "M"ESC "P"
ESC "P" 15
ESC "M" 15ESC "P" 18
oft
ESC "x" 0
18
Remember that you don’t have to use BASIC to change modes;
you can use any method that sends the printer the proper codes.
38
Chapter 6
Print Enhancements and Special Characters
Now that you have seen how you can change the pitch of your
IX-86 printing, we can show you many more ways to vary and
enhance your printing. So that you won’t have to type in dozens of
programs to try all the features, we give you just one master program
that can demonstrate any feature.
Bold Modes
Besides the pitches (pica, elite, and condensed) that we covered
in Chapter 5, the LX-86 offers many other typestyles, including
two for bold printing-emphasized and double-strike.
Emphasized mode
In the emphasized mode the IX-86 prints each dot twice, with the
second dot slightly to the right of the first. In order to do this, the
print head must slow down so that it has time to fire, retract, and fire
the pins quickly enough to produce the overlapping dots. As you can
see in Figure
formed characters that are darker than single-strike ones.
6-1,
this method produces better-looking, more fully-
StandardPrint
Figure 6-l. Emphasized and standard print
Emphasized Print
39
Emphasized works only in draft pica and NLQ modes. In elite
and condensed the dots are already so close together that even
with the reduced print speed, the LX-86 cannot fire, retract, and
again fire the pins quickly enough to print overlapping dots.
You do sacrifice some print speed and ribbon
because the print head slows down and prints twice as many dots, but
the increase in print quality is well worth it. Indeed, you may want to
use emphasized instead of the NLQ mode for some purposes because
emphasized printing is faster. than NLQ printing.
Now that you have seen our example of emphasized printing, we
will give you
the ESCape codes, including the ESCape code to turn on emphasized: ESCape “E”.
Master program
First, type in the program below. If you have some programming
experience, you can see that the program asks you what codes
you want to test and then prints a sample of what the codes do. Be
sure to ty
Applesoft
20 PRINT “Which ESCape code do you ”
30 INPUT “want to test” ; A$
a master program that allows you to test almost any of
e in the blank spaces in lines 70 and 80. If you are using
™,
BASIC, see Appendix F.
life with emphasized,
Now run the program. When the first question appears on the
screen, type a capital E and then press the RETURN key. Type
“emphasized” and press the RETURN key in answer to the second
question. The program is easy to use. Just remember to press the
RETURN key after the answer to each question and to use a capital
letter in the answer to the first question unless we tell you to use a
lowercase letter for a specific code.
40
You should get the following printout when you run this program
and type “E” and “emphasized” in answer to the questions.
This sample Uses ESCape E
to produce emphasized printing.
The code to turn off emphasized is ESCape “F”.
Double-strike
The other bold mode on the LX-86 is double-strike. For this mode
the printer prints each line, then moves the paper up slightly and
prints the line again. Each dot is printed twice, with the second one
slightly below the first as you can see in Figure 6-2.
Standard Print
Double-strike print
Figure 6-2. Double-strike and standard print
Unlike emphasized, double-strike combines with any draft pitch
(but not with NLQ) because it does not overlap dots horizontally.
Since each line in this mode is printed twice, the speed of your
printing is slowed. The code for double-strike is ESCape “G”. Try it
in the the master program if you wish. The code to turn off doublestrike is ESCape “H”.
41
Double-width Mode
Perhaps the most dramatic mode on the LX-86 is double-width.
It produces extra-wide characters that are good for titles and
headings. For this mode, the dot pattern of each character is
expanded and a duplicate set of dots is printed one dot to the
right. You can see the difference between pica and double-width
pica in Figure 6-3.
Standard Print
Figure G-3. Double width and standard characters
You can try double-width yourself by using the code
the master program. Notice that double-width uses an ESCape
code format that is slightly different from the previous ones. You
must use the numeral one as well as a capital W to turn on doublewidth. For this mode the letter and the numeral one together turn
on the mode and the letter and the numeral zero together turn it
off. Thus ESCape “Wl” turns on double-width and ESCape
"Wo”
another form of double-width. In this alternate form, called one-
line double-width, the printing is the same as that in Figure 6-3,
but it is turned on by ASCII 14 and is turned off by a line feed,
ASCII
turns it off.
Those of you who are programmers may be interested in
20,
or ESCape
Double-width
“WO”.
“W1”
in
42
Mode Combinations
You can combine nearly all of the print modes on the LX-86.
Indeed, your Ix-86 printer can print such complicated combinations as double-strike emphasized double-width underlined italic
subscript, although we’re not sure that you would ever want to use
such a combination. The point is, however, that the LX-86 has the
ability to produce almost any combination you can think of; it’s
up to you to decide which ones you want to use.
To see a few combinations, remove line
ram. (In MBASIC simply type
90
and press RETURN to delete the
90 from
the master prog-
line.) Now run the program once and enter “E” and “emphasized” in
response to the questions on the screen. This will give you the same
results as the first time you ran the program, but it will leave the
printer in emphasized mode so that you can add another mode. Then
run the program again (without turning off the printer). The second
time enter “W1” and “emphasized double-width.”
Your printout should be in the typestyle below, showing that the
two modes combine with no trouble. You can experiment with other
combinations if you wish or you can wait for the section later in this
chapter that explains a special ESCape code, Master Select, which
allows you to combine as many as seven features with one ESCape
code.
emphasized
When you are through trying combinations, be sure to replace line
90 in the master program so that you can again try one feature at a
time.
double-wid
Italic Mode
You may occasionally want to print italic words for emphasis,
titles, or other uses. The LX-86 has italic mode to enable you to use
italic characters for any purpose. Although characters produced by
the previous modes in this manual are modifications of the standard
pica characters, the LX-86 uses completely different characters for the
italic mode. In the printer’s Read Only Memory (ROM) is a complete
set of draft italic characters. You can see the difference between standard and italic draft characters in Figure 6-4.
43
Standard Pica Print
Italic Pica Print
Figure 6-4. Italic and pica
The code to turn italic mode on is ESCape “4”. Try it in the master
program if you wish. When you use this code in the master program,
enter “4” in answer to the first question just as if it were a letter of the
alphabet instead of a number. ESCape “5” turns off italic mode.
Those of you who use this code in an applications program should
remember that any character in quotation marks in our discussions of
ESCape codes is an alphanumeric character, not a numerical value.
Underline Mode
The LX-86 also has a mode that will underline characters and
spaces. You turn it on with ESCape “-1” and off with ESCape “-0".
Note that the underline code is like the expanded code in that it uses a
character, in this case the hyphen or minus sign, combined with
numeral one to turn it on and a character combined with the numeral
zero to turn it off. As you can see in Figure 6-5, this mode prints a dot
in the bottom row of each column, thus producing a continuous
underline.
44
This uses the underline mode.
Figure 6-5. The underline mode
As shown in Figure 6-5, the underline mode is continuous, but
some word processing and other applications programs produce an
underline that leaves spaces between characters as demonstrated in the
printout below.
This uses the under-line character
If your software prints this type of underline, it is using the
LX-86’s underline character (ASCII %), not the underline mode.
Because the underline character is only five dots wide, it does not fill
the spaces between characters. If you prefer a continuous underline,
you may be able to use the underline mode through one of the
methods we discussed in Chapter 4.
Master Select
The LX-86 has a special ESCape code called Master Select that
allows you to choose any possible combination of eight different
modes: pica, elite, condensed, emphasized, double-strike,
double-width, italic, and underline. The format of the Master
Select code is ESCape ‘!” followed by a number that is calculated
by adding together the values of the modes listed below:
underline
italic
double-width 32
double-strike
emphasized
condensed
elite
pica
128
64
16
8
4
1
0
45
For any combination,. just add up the values of each of the modes
you want and use the total as the number after ESCape “!“. For
example,
add the following numbers together:
to calculate the code for double-width italic underlined pica,
underline
italic
double-width 32
pica
To print this combination, therefore, you use ESCape "!” followed
by the number 224. In BASIC the command is CHR$(27)“!”
CHR$(224).
To try this number or any other, enter and run this short program,
which will ask you for a Master Select number and then give you a
sample of printing using that code. Again, if you are using Applesoft
BASIC, see Appendix F.
In this program, you can use any number you calculate with the
formula above, but remember that emphasized can’t combine
with condensed or elite. If you try to combine emphasized with
either of the two narrow pitches, you won’t harm your printer; it
will simply use a priority list in its memory to determine which
mode to use. This priority list causes a corn bination of emphasized
and elite to produce elite only, a combination of emphasized and
condensed to produce emphasized only, and a combination of all
three to produce condensed elite.
"Master Select number";M
128
64
0
224
Master Select is a powerful code that gives you an easy way to
produce multiple combination's with a single command. To see
double-strike emphasized italic printing, for example, you need only
one ESCape code instead of three.
46
Indeed, Master Select is such a powerful feature that it may occasionally be more powerful than you want it to be. Because it controls
eight different modes, a Master Select code will cancel any of those
eight that are not selected. For example, suppose that you have a page
in elite and want part of it printing in italic. If you use ESCape “!” 64
to turn on italic, your LX-86 will begin printing in italic pica instead
of italic elite because the 64 code does not include elite. Use 65 for
italic elite.
Superscript and Subscript
Your LX-86 can also print superscripts and subscripts, which you
can use for mathematical formulas, footnotes, and other items that
require numbers or letters above or below the usual print line.
ESCape “SO" turns on superscript and ESCape "S1" turns on subscript. ESCape “T” turns off either one. You can enter either ESCape
“SO" or ESCape “Sl" in the master program, but that will print the
whole sentence in superscript or subscript. Some more realistic examples are below:
E=MC
H20
This fact is found in three sources.7
vidual character. Just find out how to send printer codes in your
applications program; then send the proper codes to the printer.
2
As you can see, you can use superscript or subscript for an indi-
Special Characters
The LX-86 has three groups of special characters that can add
distinction to your printing. Character Graphics, international
characters, and the special graphics set.
Epson character graphics set
The Character Graphics set includes characters used by IBM
and compatible computers as well as international characters used
by IBM software. The characters in the set are shown on the next
Page.
You select the Character Graphics set in one of two ways: with
an ESCape code or with a DIP switch.
The ESCape code in BASIC has the following format:
LPRINT CHR$(27)"t"CHR$(n)
47
If n is 1, the command turns the Character Graphics set on; if
n is 0, the command turns that set off.
If you prefer to have the Character Graphics set on most of the
time, see Appendix D for instructions on using the DIP switches.
The Character Graphics set is actually two sets, the standard
and the international. The standard set contains only the
characters in the last three rows shown below. The international set
contains the characters in all four rows.
In order to print the international set, you must send the
ESCape “6” command. In BASIC it has the follwing format:
LPRINT CHR$(27)”6”
ESCape “7” returns you to the standard set.
See your software manual for further instructions on printing
these characters. If you need the decimal or hexadecimal codes for
them, see Appendix A.
International characters
As you know, you need a few extra characters for languages other
than English. The LX-86 has provided for printing in many
languages by having 96 international characters in its ROM (Read
Only Memory). This total includes characters in three sets: draft
italic, and NLQ (Near Letter Quality).
In order to print any of these characters, first select one of the
following character sets and then use the individual characters within
that set.
6
Italy
7
Spain
8 Japan
9
Norway
Denmark II
48
0
USA
1
France
2
Germany
3
United Kingdom
4
Denmark I
Sweden
5
10
You select the character set in one of two ways: with an ESCape code
or with a switch in the back of your printer. The ESCape code in
BASIC has the following format:
LPRINT CHR$(27)“R”CHR$(n)
in which n stands for the appropriate number from the list above. In
other words, the BASIC command to select the French character set
is
LPRINT CHR$(27)“R”CHR$(1)
The other method of selecting an international character set is with
the small switches, called DIP switches, in the back of the printer. If
you plan to use one of the international sets quite a bit, see Appendix
D for instructions for using the DIP switches.
Once you have selected a character set, whether you do it with the
ESCape code or the DIP switches, you will be able to print several
new characters. The character sets are shown in Tables 6-1, 6-2, and
6-3.
Table 6-l. International characters in NLQ mode
USA
FRANCE
GERMANY
UK
DENMARK I
SWEDEN
ITALY
SPAIN
JAPAN
NORWAY
DENMARK II
USA
FRANCE
GERMANY
UK
DENMARK I
SWEDEN
ITALY
SPAIN
JAPAN
NORWAY
DENMARK II
35 36
64
91
92
93
94
123
124
96
Table 6-2. International characters in draft mode
35
36
64
91
92
93
94
96
123
124
125
125
126
126
49
Table 6-3. International characters in draft italic
123
124 125
126
USA
FRANCE
GERMANY
UK
DENMARK
SWEDEN
ITALY
SPAIN
JAPAN
NORWAY
DENMARK II
35
36
64
91
92
93
9496
The number at the top of each column in the tables is the ASCII
code that prints the characters in that column.
Once you have selected an international character set with the DIP
switches or the ESCape “R” code, you can use the tables to see which
characters on your standard USA keyboard will produce the interna-
tional characters you want. Simply type the character from the top
row of one of the figures in order to print the corresponding character
in the row of the set you have chosen. For example, if you have reset
the DIP switches for the UK character set and you press the # key,
the £ symbol will be generated. Even though you will see the #
symbol on the screen, the £ symbol will be printed on the paper. For
another example, if you have selected the Swedish character set and
you press the @ key, the É symbol will be generated.
If your keyboard does not have one of the keys that you need, you
will have to send the proper ASCII number to the printer in another
way, such as a programming language or inserted or embedded codes.
50
Graphics character set
The Lx-86 printer’s Read Only Memory (ROM) also contains the
32 graphics characters that you see in Figure 6-6.
Figure 6-6. Special graphics characters
Undoubtedly you can think of uses for many of the shapes and
symbols available in this set, and you can combine the line graphics
characters (the ones on the first row) to form various sizes and shapes
of boxes and other figures that use straight lines.
To print these graphics characters you must use either a programming language or a computer with a graphics shift or other special key
that allows you to send graphics codes.
Sending the codes for these characters to the printer is a two-step
process just as it is for the international characters. In BASIC, first
you send CHR$(27)
set, then you send the code numbers given in Figure 6-6. After you
have used the ESCape code to turn on the graphics character set, the
LX-86 prints the codes from 128 through 159 as graphics characters.
“m”CHR$(4) to turn on the graphics character
You can change pitch and weight with the graphics characters
just as you can with the other characters in the ROM of the LX-86.
The characters in Figure 6-6 are printed in double-width elite.
The printout below shows the characters in pica:
51
The next printout shows the characters in emphasized double-
width pica:
Because normal line spacing leaves space between the lines of
graphics characters just as it does between lines of text, you must
change the line spacing when you combine line graphics characters to
form boxes or other figures. For most programs ESCape “1” gives
you the best line spacing for combinations of graphics characters.
Further details on line spacing are in Chapter 7.
In addition, there are commands to specify the line spacing in 72nds
of an inch and 216ths of an inch. If you need to make such fine
adjustments in the line spacing see Appendix C for the proper
commands. In the chapter on dot graphics you will see how useful
ESCape
“1”
can be.
52
Chapter 7
Page Formatting
Although the LX-86 printer has many sophisticated commands to
set margins, line spacing, and horizontal and vertical tabs, we won’t
take up your time with extensive discussions of these because most of
these functions are taken care of by applications programs. This chap-
ter merely describes a few commands that the average user might
need. If you want more information, you can find all the commands
in Appendixes B and C.
Margins
The LX-86 allows you to set the left and right margins with simple
ESCape sequences. The left margin command is ESCape “1” followed
by the number of the column you choose for the left margin. The
right margin command is ESCape “Q” followed by the column number of the right margin you want. For the left margin command, be
sure to use a lowercase letter 1, not the numeral one.
If your word processing program does not allow you to change the
margins, you can send margin commands to your IX-86 with BASIC
or another programming language before you print your documents.
For example, if you prefer wider margins than your word processing
program gives you, run the following BASIC program before printing. This program gives you a left margin of 10 and a right margin of
60, but you can use any numbers you prefer for the margin commands.
10 LPRINT CHR$(27)"1"CHR$(lO);
20 LPRINT CHR$(27)"Q"CHR$(60);
Such a program will also allow you to choose the margins you
prefer for program listings. Just remember that once you run a pro-
gram that sets margins, those margins are in effect until you change
them with new margin commands or turn off or reset the printer.
53
You should be aware that a few applications programs reset the
printer before each document or file they print. These programs will,
of course, cancel your new margin settings. See Chapter 2 to find out
how to test for a reset code in your program.
The maximum right margins on the LX-86 printer are 80 in
pica, 96 in elite, 137 in condensed, and 160 in condensed elite. For
further information on this command see Appendix B.
Justification with NLQ
The NLQ (Near Letter Quality) mode offers a justification command that will give you four choices in the formatting of your text.
The command is ESCape “a” followed by one of these numbers:
0
Left justification
1
Centering
2
Right justification
Full justification
3
Left justification is the standard format, in which the left margin is
even and the right margin is not. This is the way most typewritten
pages look.
The centering command centers a line of text between the margins.
This is handy for headings, titles, and captions.
Right justification is the opposite of left justification. The right
margin is even and the left is not.
Full justification puts extra spaces between words where necessary
so that both the left and right margins are even. This is the way most
magazines, newspapers, and books (including this one) are printed.
With this command, you may need a WIDTH statement. Since different systems use different WIDTH statements, see your computer
or programming language manual for the proper format.
Remember also to use carriage returns only at the end of paragraphs
when you are using auto justification.
When you use any of the justification commands, be sure that you
send NLQ command first.
The justification command is designed to be used with BASIC or
another programming language, not with word processing
programs.
54
Skip Over Perforation
If you are using continuous pin-feed paper for printing program
listings or other material not controlled by an applications program,
you may find that the LX-86 prints right over the perforations between pages. The LX-86 has an ESCape code to prevent this: the
ESCape “N” command. You send ESCape “N” followed by the
number of lines you want the LX-86 to skip at the bottom of a page.
For example, in BASIC the following line will make the Lx-86 skip
six lines after each
10 LPRINT CHR$(27) “N” CHR$ (6) ;
Since a standard page is 66 lines, this will give you one inch of
blank space at the bottom of each page. If you prefer to have half of
the blank space at the top of the page and half at the bottom, simply
set the top of page approximately three lines (l/2 inch) below the
perforation. (See Appendix E if you need to refresh your memory on
setting the top of page.)
60
lines:
Line Spacing
Ordinarily you don’t have to worry about how the printer moves
the paper so that it doesn’t print lines of text on top of each other; the
LX-86 takes care of this without any special instructions. If, however,
you want to understand how line spacing works or you need to
change the line spacing for a special application such as graphics,
you’ll want to read this brief explanation of line spacing on the
Ix-86.
The movement of the paper between lines is called a line feed and
the distance the paper moves is called a line space. In ordinary printing the line spacing is l/6-inch, which produces six lines of print per
inch. Figure 7-l will help you visualize this spacing. As you can see in
the figure, the standard (default) spacing is the same as 12 rows of
dots. Since the Lx-86 characters use nine rows of dots, the 12-dot line
spacing leaves three blank rows between the lines of text.
55
l/6 inch
3 blank
rows
1/6 inch
3 blank
rows
Figure 7-l. Standard line spacing
The default line spacing illustrated in Figure 7-l is the only one
you need for almost all printing of text, but in some cases you may
want to increase or decrease the space between lines. The LX-86 has
several commands to do this. ESCape “0” decreases the line spacing
to 9-dot (9/72-inch), ESCape “1” decreases it to 7-dot, and ESCape
“2” returns it to 12-dot.
In addition, there are commands to specify the line spacing in 72nds
of an inch and 216ths of an inch. If you need to make such fine
adjustments in the line spacing see Appendix C for the proper
commands. In the chapter on dot graphics you will see how useful
ESCape “1” can be.
56
Paper-Out Sensor
Under the platen (the black roller) of your LX-86 printer is a small
switch that senses whether or not paper is in the printer. When the
end of the paper passes this switch, it sends a signal that sounds the
beeper and stops your printing. This saves wear on your print head,
ribbon, and platen, but because of the distance between the switch
and the print head, it stops the printing about 2 inches from the end of
the page. Therefore, if you use single-sheet paper in your IX-86, you
can’t print on the last 2 inches of each page without an adjustment.
For most computer systems, you merely send the printer an
ESCape “8” to deactivate the paper-out sensor or change one of the
DIP switches described in Appendix D. Then you can print to the
end of the page with single-sheet paper. Some systems, however,
ignore the ESCape code and the DIP switch setting. If ESCape “8” or
the DIP switch setting does not solve this problem for you, see
Appendix F for other solutions.
57
Chapter 8
User-Defined Characters
The LX-86 has several hundred different characters stored in its
ROM (Read Only Memory). Although this number includes
draft, italic, international, character graphics, special graphics,
and Near Letter Quality characters, sometimes you would like to
have a few more. For those occasions when you need a special
character or a few letters in a different typeface, the LX-86 allows
you to create your own characters and print them just as if they
were ordinary letters.
Defining Your Own Characters
The printout below displays a few such characters to give you an
idea of what can be done, but remember that these characters are truly
user-defined-you create what you need or want.
It may seem that designing a character and telling the LX-86 how
to print it would be extremely complicated, but we have reduced the
task to a simple three-step process: planning your character, running
one program that tests your work and calculates the required DATA
numbers, and running another program to put the character in your
printer’s RAM (Random Access Memory) for use whenever you
need it.
Because the high-resolution NLQ (Near Letter Quality) mode
uses many more dots per character than the draft mode, defining
NLQ characters is somewhat more complex than defining draft characters. You will find the programs for defining NLQ characters at the
end of this chapter.
59
After you have created your own characters with our programs,
certain keys that you seldom use will generate the user-defined characters. For example, you will be able to type < to print .
Your user-defined characters can be utilitarian or imaginative, any-
thing from a scientific symbol to script letters for your initials. Just
follow the simple steps below.
The only restriction on your creativity is that the characters you
define must follow the same rules that govern the rest of the charac-
ters printed by the LX-86. They must fit into an 11 x 9 matrix, no dot
can overlap another, and either the top or the bottom row must be
empty. Look at the enlargements of sample letters in Chapter 3 to see
how the standard IX-86 characters are designed.
Designing Process
Suppose that you want to print the scientific symbol for the
planet Mercury. Although the LX-86 has a number of special
symbols, that is not one of them. You can, however, create and
print such a symbol with ease. First, use a grid like the one in
Figure 8-l to plan where to place the dots.
8
7
6
5
4
3
2
1
123456789
Figure 8-1.
Because the last two columns are reserved for the space between
characters, we have not included them in the grid. And since most
characters do not use the bottom two rows, we have used a heavy line
to indicate the usual lower limit for an IX-86 character.
Grid
for designing draft characters
60
When you place your dots on this grid, remember that dots cannot
go on horizontal lines, but they can go on vertical lines so long as they
do not overlap any other dots. As you design your characters, draw
the dots as large as you see them in the example on the left in Figure
8-2. If you draw them smaller, you may have overlapping dots with-
out realizing it.
overlapping dots
dot
on
horizontal
Figure 8-2. Correct and incorrect designs
line
If you do accidentally call for overlapping dots, don’t worry. The
program will still work, but only one of the dots will be printed.
First definition program
Once you have drawn your dots on the grid, type in the following
BASIC program and run it. If you are using Applesoft BASIC, see
Appendix F.
100 DIM F(9)
110 FOR I=1 TO 9
120 PRINT "WHICH ROWS HAVE DOTS IN COLUMN";I
130 INPUT R: IF R=0 THEN 150
140 F(I)=F(I)+2^(R-1)
150 IF R=0 THEN NEXT I ELSE GOT0 130
160 LPRINT CHR$(27)":
"CHR$(O)CHR$(O)CHR$(O);
170 LPRINT CHR$(27)"%"CHR$(l)CHR$(O);
180 LPRINT CHR$(27)"&"CHR$(O)CUR$(60)CHR$(60);
190 LPRINT CHR$(128);
200
FOR X=1 TO 9
210 LPRINT CHR$( F( X));:NEXT X
220 LPRINT CHR$(O) CHR$(0);
230 LPRINT "YOUR CHARACTER IN PICA: < < <"
240 LPRINT "IN DOUBLE-WIDTH EMPHASIZED PICA ";
250 LPRINT CHR$(27)"! *< < <"
260 LPRINT CHR$(27)
"! "CHR$(O)"YOUR DATA NUMBERS:"
270 FOR K=l TO 9: LPRINT F(K);: NEXT K
300 LPRINT: END
61
So that you can see how the program works, we’ll present the
steps used to create the symbol for Mercury. First is the grid we
used to design the character.
8
7
6
5
4
3
2
1
123456789
Figure 8-3. Design for character
Running the program
Now run the program. For each of the nine columns, the program asks for the numbers of the rows in which you want dots to
appear. Enter the row numbers one at a time, pressing the
RETURN key after each one. When you have entered all the
numbers for a column or when you want no dots in a column, press
RETURN without a number. Remember that the vertical lines in
the grid are the even-numbered columns.
To see Program 1 produce the character in Figure 6-4 run the program and follow these instructions: When the screen message asks
what rows have dots in column
1,
respond with RETURN to indicate
that no dots go in that column. For column 2 (the vertical line), press
7, RETURN, 5, and RETURN again to indicate that you want dots
in rows 7 and 5. Then press RETURN alone to indicate that no more
dots go in column 2. For column 3 press 8, 6, 4, and 2, with a
RETURN after each of them. Then press RETURN to finish with
column 3 and go on to column 4.
For column 4 press RETURN only. (The rest of the directions
assume that you know to press RETURN after each number and
one extra time to end the entries for each column.) For column 5,
enter 6, 4, 3, 2, and 1. For column 6, press RETURN only; for
column 7 enter 8,6,4, and 2; for column 8 enter 7 and
5;
and for
column 9 press RETURN only.
62
Now wait a moment for your computer to calculate the dot patterns and your LX-86 to print the new character in two different
typestyles. Your printout also gives you nine numbers, which you
will use in the next program. You should get the printout you see
below:
When you get to this point with a character of your own, you see
how it looks and whether or not you like it. If you want to make any
changes, move the dots as needed and re-run the program.
If you want to put dots in the bottom row, change the number in
line 190 from 128 to 0. Then the usable rows will be as shown in
Figure 8-4 below.
8
7
6
5
4
3
2
1
123456789
Figure 8-4. Using the bottom eight rows
Second definition program
Once the character looks the way you want it to, enter, modify,
and run the next program. The program as listed creates the
Mercury character, but you can use it for any characters you create
if you make one or two changes that we explain after the program
listing.
63
90 FOR P=58 TO 63: LPRINT CHR$(P);" ";: NEXT P
95 LPRINT
100 K=l: IF K>3 THEN A=58 ELSE A=60
110 LPRINT CHR$(27)":
190 LPRINT CHR$(O)CHR$(0);
200 NEXT Z
210 DATA 0,80,170,0,47,0,170,80,0
290 FOR P=58 TO 63: LPRINT CHR$(P);" ";: NEXT P
To use this program for your own character or characters, change
the DATA numbers in line 210 by substituting the numbers generated by the first program when you created your own character. If
you have created more than one character, put the DATA numbers
for each character on a separate line as you see in the example below:
210
DATA
220
DATA
Check your work by making sure that there are nine numbers in
each line and that the numbers are separated by commas.
To define more than one character, use the total number of characters you are defining instead of the 1 in line 100. (You can define as
many as six characters at a time. Just run the first program several
times and enter all the DATA numbers in this program.)
Running the program
When you run this second program, it prints six characters, then
re-defines some or all of them and prints them again, as in the exam-
ple below.
64
The two lines when printed by your own program provide you
with a key to the characters your LX-86 will now print. When you
press the key for one of the characters in the top row, the printer will
print the corresponding character in the bottom row. In the example
above, if you type< your LX-86 will print (although your screen
will continue to show the character < ).
Because the program puts these new definitions in your printer’s
Random Access Memory (RAM), it will print the new characters (the
ones in the bottom row) unless it is turned off or receives the reset
code.
If you have designed a few characters and want to use them with
your word processing program, for example, just run the second
definition program before you start using your word processing
program. Then use the two-line printout as your guide to tell you
which keys to press for your new characters.
Defining NLQ Characters
Since NLQ characters use many more dots than draft characters,
defining NLQ characters is more complex than designing draft ones.
If you use the grid and the programs in this section, however, you
will be able to design your own NLQ characters.
NLQ grid
Because the NLQ characters can use as many as 18 dots vertically
and 12 dots horizontally, you plan your designs on a different grid
than the one you used for draft characters.
65
128
54
32
16
8
4
2
1
128
64
32
16
8
4
2
1
128
64
1 2 3 4 5 6 7 8 9 10 11 12
Figure 8-5. Grid for NLQ characters
On this grid you can use any numbered line or space. As you can
see, that includes the bottom line and the line on the right side. You
should remember to leave one or two columns blank for space between characters, however.
Each NLQ character definition requires 36 data numbers. There-
fore, each vertical column must be divided into three sections for the
calculation of data numbers. The process is not difficult once you get
some practice using it.
Figure 8-6 shows a single column to make clear how the data
numbers are calculated. Notice that in designing NLQ characters we
suggest using circles instead of dots to make it easier to keep track of
overlapping dots.
66
First
data
number
Second
data
number
Third
data
number
128
84
32
18
128
64
128
64
32
16
128
64
32
8
4
2
1
8
4
2
1
=229
4
1
16
8
=28
4
=64
64
}
Figure 8-6. Data numbers
for one column
To calculate the data numbers for this column, you see which dots
are used in the top group (the top eight positions) and add their values
together. Then you go down to the middle group (the next 8 positions) and add the values of any dots that are used there.. Finally, you
look at the bottom group (2 dot positions) and add together the
values used there.
If no dots are used in a group, the data number for that group is
zero. All zeros must be entered in the DATA statements for the
NLQ definition programs.
Now we’ll show you how to use the NLQ character definition
with a simple arrow design. Figure 8-7 shows the design drawn on a
grid and the data numbers printed at the top or bottom of each
column.
67
128
64
32
2
128
64
32
16
128
64
16
832
0
0
I
8
4
1
8
4
2
1
4
16 64 64 16
0
0
0
0
255
0255000
0192
0
0
328
0
0 0
0 0
0
4
0
0
0
0
Figure 8-7. Arrow design and data numbers
If you look at each column individually, you can see how the data
numbers were calculated.
First NLQ definition program
Now type in and run the following program. It has the data numbers for the arrow design. For a character of your own, change the
data numbers in lines 130-150.
PICA: < < <"
100 LPRINT "IN DOUBLE-WIDTH EMPHASIZED PICA: ";
110 LPRINT CHR$(27);"!*< < <"
120 LPRINT CHR$(27);"!";CHR$(O);
130 DATA 4,0,0,8,0,0,16,0,0,32,0,0
140 DATA 64,0,0,255,255,192,64,0,0,32,0,0
150 DATA 16,0,0,8,0,0,4,0,0,0,0,0
YOUR CHARACTER IN PICA:
IN DOUBLE-WIDTH EMPHASIZED PICA:
When you run this program for your own character, you find out
whether or not it looks right to you. If it doesn’t, move the dots as
needed, recalculate and change the data numbers, and run the prog-
ram again.
Second NLQ definition program
When you are satisfied with the character you have created, enter
and run the next program. Use your data numbers instead of the ones
in lines 130-150. If you want to define more than one character,
change line 10 so that J equals the total number of characters you are
defining (the maximum is six) and enter the extra data numbers (36
for each character).
10
J=1: IF J>3 THEN A=58 ELSE A=60
LPRINT CHR$(27)"x"CHR$(l)
110 READ C: LPRINT CHR$(C);
120 NEXT X: NEXT Y
130 FOR X=58 TO 63: LPRINT CHR$(X)" ";: NEXT X
140
DATA 4,0,0,8,0,0,16,0,0,32,0,0
150
DATA 64,0,0,255,255,192,64,0,0,32,0,0
160
DATA 16,0,0,8,0,0,4,0,0,0,0,0
69
When you run this program it prints six characters, then redefines
one or more of them and prints them again. As with the draft characters, you use this two-line printout as a guide to the new characters
your IX-86 will print. You can use them with an applications prog-
ram or a program you write yourself.
70
Chapter 9
Introduction to Dot Graphics
The Epson dot graphics mode allows your LX-86 printer to pro-
duce pictures, graphs, charts, or almost any other illustrative or crea-
tive material you can devise. Instead of using the standard letters,
numerals, and symbols stored in the LX-86’s ROM (Read Only
Memory), the graphics mode prints dots column by column and line
by line. You plan where you want the dots to appear and then use a
program to tell the LX-86 where to put them.
Because many software programs take advantage of Epson dot
graphics, you may be able to print graphics like the ones on this page
and the next by simply giving your software a few instructions. The
chart on the next page, for example, was created and printed in about
10
minutes.
71
Bookstore Inventory
MAGAZINES
SCIENCE FICTION
ROMANCE
CLASSICS
MYSTERIES
-----
BEST-SELLERS
NON-FICTION
WESTERNS
If you have a program that produces graphics, all you need to
know about Epson dot graphics is how to use the software. If, on
the other hand, you wish to do your own programming or merely
wish to understand how the LX-86 prints graphics, read on.
Dot Patterns
The Lx-86 forms graphic images approximately the same way that
pictures in newspapers and magazines are printed. If you look closely
at a newspaper photograph, you can see that it is made up of many
small dots. The Ix-86 also forms its images with patterns of dots. In
fact, the resolution of Epson graphics is higher than that of standard
newspaper photographs because the LX-86 graphics mode allows as
many as 240 dot positions per inch horizontally and 72 vertically. The
images you print on the Ix-86 can, therefore, be as finely detailed as
the one on the first page of this chapter.
If you plan carefully where you want the dots to appear and then
use or create a program that gives the proper instructions to the
printer, your LX-86 will print nearly any pattern or figure you can
imagine.
72
Print Head
The graphics mode on the LX-86 is quite different from the text
modes. Instead of sending codes for letters and printing functions,
you send codes for dot patterns, one number for each column in a
line. Since none of the predefined characters or symbols in the printer’s memory is used, your program controls where each dot is
printed.
For each column on a print line, the print head prints the pattern of
dots you have specified. In the standard graphics mode it uses only
the top eight pins on the print head because the computer uses eight
data lines to communicate with the printer. Therefore, each of the top
eight pins of the print head corresponds to one of the data lines.
To print figures taller than eight dots, the print head makes more
than one pass. It prints one line, then advances the paper and prints
another, just as it does with text. To keep the print head from leaving
gaps between the graphics lines as it does between the text lines, the
line spacing must be adjusted to eliminate the space between lines.
When the line spacing is properly adjusted, the LX-86 prints finely
detailed graphics images that give no indication that they are made
up of separate lines, each no more than 1 / 8 of an inch high.
To ensure the proper alignment of dots in figures that use more
than one pass of the print head, the LX-86 abandons the bidirectional
printing it uses for draft text. Instead it prints graphics from left to
right only.
Each pass of the print head contains one piece of the total pattern,
which can be as tall or short and as wide or narrow as you desire. You
don’t have to fill the whole page or even an entire line with your
graphics figures. In fact, you can use as little or as much space as you
like for a figure and put it anywhere on the page.
Graphics Mode
The graphics mode command is quite different from the other
commands covered so far in this manual. For most of the other
LX-86 modes, such as italic and emphasized, one ESCape code turns
the mode on and another turns it off. For graphics, the command is
more complicated because the code that turns on a graphics mode also
specifies how many columns it will use.
73
The LX-86 has several different graphics densities, but we’ll keep
things simple by using only one in the first exercises. The code for
entering single-density graphics mode is ESCape “K” nl n2. In Microsoft BASIC the command is given in this format:
LPRINT CHR$(27)“K”CHR$(Nl)CHR$(N2);
ESCape “K” specifies single-density graphics, and the next two numbers (n1 and n2) specify the number of columns reserved for graphics.
The graphics command requires more than one number to specify
how many columns to reserve because as many as 1920 columns are
possible in graphics printing. Since the LX-86 uses eight digit binary
numbers, it can’t accept decimal numbers larger than 255. Therefore,
the graphics mode command uses two numbers for reserving columns.
The number of columns reserved is the first number plus 256 times
the second number. Since the command is set up for two numbers,
you must supply two even if you only need one. When you need less
than 256 columns, just make nl the number of columns you are
reserving and make n2 a zero.
.
Pin Labels
Once you put the printer into graphics mode and reserve the
number of columns you want, your next step is to tell the print head
which pins to fire in each column. There are 256 possible combinations of eight pins, and you send only one number for each column.
The numbering system that allows you to use a single number to
specify which of the 256 possible patterns you want is shown in
Figure
9-l.
74
128
64
32
16
8
4
2
1
not used
Figure 9-1. Pin labels
To fire any one pin, you send its number. To fire more than one
pin at the same time, add up the numbers of the pins and send the
sum to the printer. With these labels for the pins, you fire the top pin
by sending 128. To fire the bottom graphics pin, you send 1. If you
want to fire only the top and bottom pins, you simply add 128 and 1,
then send 129.
By adding the appropriate label numbers together, you can fire any
combination of pins you want. Figure 9-2 shows you three examples
of how to calculate the number that will fire a particular pattern of
pins.
I
not used
128
64
32
16
128
16
8
4
2
1
2
128
64
32
16
8
4
2
1
not used
Figure 9-2. Calculating numbers
64
8
2
for
128
64
32
16
8
4
2
1
not used
pin patterns
4
75
With this numbering system any combination of the eight pins
adds up to a unique decimal number between 0 and 255. Although
you use a decimal number, it is, of course, converted to a binary
number before it goes to the printer.
Now that you know the principles of Epson graphics, we’ll give
you two simple exercises, more densities, and then something more
complex as a basis for writing your own programs.
First Graphics Program
For your first graphics exercise we could give you a program that
prints a single column of dots, but it is difficult to see the pattern of a
single column of dots, so your first graphics program prints the same
pattern 40 times.
The first line is the code for 40 columns of single-density graphics.
As usual, our example is in Microsoft BASIC, but you can adapt it to
theprogramming language you prefer.
10 LPRINT CHR$(27)"K"CHR$(40)CHR$(0);
The second line is the data that is printed as pin patterns. Be sure
that you type in the semicolons in both lines:
20 FOR X=1 TO 40: LPRINT CHR$(74);: NEXT X
That’s it. Run the program to see the result below. Although it is
not as interesting as the examples at the beginning of this chapter, it
does allow you to see exactly how the mode works.
Multiple-Line Exercise
Now that you’ve entered and run a simple graphics program, we’ll
go on to an exercise that shows you how the LX-86 combines several
lines of graphics for a figure taller than eight dots.
Start with a line for 100 columns of single-density graphics and
lines to print two pin patterns. Notice that since there are two pin
patterns in the loop, it is only executed 50 times.
76
30 LPRINT CHR$(27)"K"CHR$(100)CHR$(O);
40
FOR X=1 TO
50: LPRINT CHR$(85)CHR$(42);
50 NEXT X
If you run the program now, you’ll see how one line of the pattern
looks:
To see a how more than one line combines to form a figure, enter
and run the following program, which uses two of the lines you have
already typed and adds several more.
10 LPRINT CHR$(27)"1";
20
FOR R=1 TO 3
30 LPRINT CHR$(27)"K"CHR$(100)CHR$(0);
40
FOR X=1 TO
50: LPRINT CHR$(85)CHR$(42);
50 NEXT X: LPRINT
60
LPRINTCHR$(27)“K"CHR$(100)CHR$(O);
70
FOR X=1TO 50: LPRINT CHR$(42)CHR$(85);
80 NEXT X: LPRINT: NEXT R
90
LPRINTCHR$(27)"@"
Now run the program to see the six print lines combine into a
pattern:
The short and simple program that produced the pattern demon-
strates many elements of graphics programming. Therefore, we’ll explain each line. Line 10 changes the line spacing to ‘/-dot, which is the
height of the dot patterns used in the program. Therefore, there is no
space between the print lines.
77
Line 20 begins a loop to produce multiple print lines. Lines 30 and
40 were covered above, but an LPRINT is added to line 50 to produce a line feed after line 40. Lines 60 and 70 are like lines 30 and 40
except that lint! 70 uses a reversal of the patterns in line 40. As the loop
is executed, the program prints lines 40 and 70 alternately so that the
patterns of the print lines will fit together well.
Notice that the graphics command can be in effect for only one
print line. The command is in lines 30 and 60 so that it is issued each
time a new print line is begun. You cannot print more than one line of
graphics without having the graphics command issued more than
once.
Line 90 is the reset code to return the printer to its defaults.
Density Varieties
Although all the examples so far in this chapter have been in the
single-density graphics mode, the LX-86 offers five other eight-pin
density modes and two nine-pin ones. Nine-pin graphics is not necessary for most uses, but you can find its command (Escape “ ^ “) in
Appendix C. All the eight-pin densities and their commands are
described in Table 9-l.
Mode
78
Table 9-l. Graphics modes
Density
0
1
2
3
4
5
6
Single
Low-Speed
Double
High-Speed
Double
Quadruple
CRT
One-to-one
(plotter)
90 dots/inch
Alternate
code
ESC "K"
ESC "L"
ESC "Y"
ESC "Z"
none
none
none
60 dots/inch:
480 dots/8" line
120 dots/inch
960 dots/8 line
120 dot positions/inch
Faster than Mode 1; does not print
consecutive dots in a row.
240 dot positions/inch; 1920 dot
positions/8" line. Does not print
consecutive dots in a row.
80 dots/inch;
640 dots/8" line
72 dots/inch;
576 dots/8" line
Produces the same density horizontally as vertically, which makes
circles look round.
90 dots/inch;
720 dots/8" line
Description
You are familiar with the command format that uses the ESCape
code and a letter, but LX-86 graphics commands can also be in the
following format:
LPRINT CHR$(27)“*“CHR$(M)CHR$(N1)CHR$(N2);
with m being the mode number found in the left column of Table 9-1.
As usual, nl and n2 reserve the number of columns for graphics. The
seven modes include six densities, with two speeds for doubledensity.
Reassigning Code
The IX-86 has a graphics command that changes one graphics
mode to another. You can use it with many commercial graphics
software programs to change the density and shape of your printouts.
The code is ESCape
graphics codes (K, L, Y, or Z) and n is the number of the new code
(O-6).
For example, if you send the following code before you run a
graphics program, it will change every instance of mode “Y” (highspeed double-density) to mode 5 (one-to-one).
LPRINT CHR$ (27) “?Y” CHR$ (5) ;
As usual, this example is in MBASIC, but you can send the code in
any programming language.
“?s” n, where s is one of the four alternate
Even if you don’t know which code your graphics program uses, a
little experimentation should tell you whether the reassigning code
can improve your graphics printouts.
Column Reservation Numbers
Now that we’ve introduced you to the rest of the 8-pin graphics
densities and the reassigning code, we’ll explain in more detail the part
of the graphics command that reserves the number of columns for
graphics (the numbers nl and n2 in our examples).
If you need fewer than 255 columns of graphics, n1, is the number
of columns you want and n2 is zero. As you can see in Table 9-1,
however, a single line will hold as many as 1920 columns in quadruple-density. Specifying more than 255 is where the second number
slot (n2) fits in. The first number that you send (n1) indicates a number of columns, but the second does not represent a number of
columns; it is multiplied by 256 and added to nl. The command for
79
the maximum number of dots you can reserve on the IX86, then, is:
CHR$(27)"Z"CHR$(128)CHR$(7);
or, in the other format:
CHR$(27)"*"CHR$(3)CHR$(l28)CHR$(7);
which is
row.
you can have your program do the calculations for you with the
following format:
N is the total number of columns you want to specify. The MOD
(modulus) function calculates the value for nl, and the INT (integer)
function calculates the value for n2. For programming languages other
than BASIC, consult your manual for the proper form for these
functions.
value of N up to the maximum number of columns per line for that
density.
128
dots plus 7 times 256 dots, for a total of 1920 dots in one
Once you have chosen the number of columns you want to use,
CHR$ (27) "L" CHR$ (N MOD 256) CHR$ (INT(N/256));
This format can be used with any graphics density and with any
WIDTH Statements
Many computer systems automatically insert the control codes for
a carriage return and a line feed after every 80 characters. This insertion is usually no problem with text, but it can spoil your graphics. In
the graphics mode they may insert the control codes after 120 columns, which could be in the middle of a line.
You can usually prevent these unwanted control codes with a
WIDTH statement such as the one below:
WIDTH LPRINT 255
The format for your system may be different. Consult your computer
or computer language manual to find the correct format for your
system. Then put a WIDTH statement in one of the first lines of all
your graphics programs. It is easier to put a WIDTH statement in all
but the simplest of your programs than to examine each one to see
whether or not such a statement is necessary.
80
Design Your Own Graphics
In this section we take you through the development of a graphics
program. The example is not especially complicated, but it does include the same steps you would use for a more complex figure so that
you have the basis for designing graphics on your LX-86.
You will plan your figure with dots on graph paper, but before
beginning to place the dots, you should decide which graphics density
you want. Figure 9-3 shows the differences between the three mostused graphics modes so that you can choose the one you want.
Single
Figure 9-3. Designing in different densities
High-speed
Double
Low-speed
Double
In this figure you can see the main rules for graphics design in the
three densities. In single density no dots can be placed on vertical
lines. In high-speed double density dots can be placed on vertical
lines, but no dots can overlap. In low-speed double density dots can
be placed on vertical lines and they can overlap.
Now look at our figure designed for high-speed double density. It
should point you in the right direction for your own designs.
81
Figure 9-4. Arrow design
After plotting all the dots as in Figure 9-4, you calculate the num-
bers for each pin pattern by dividing the design grid into separate
print lines. For the arrow design the grid was divided into three lines,
each seven dots high. Then each column was examined and the sums
of the pin values determined. This process for the first line is shown in
Figure 9-5. The pin values are on the left side and the sums are at the
bottom of each column.
Those of you who have read the previous chapter will see that
designing graphics is much like designing user-defined characters.
The numbers for the second and third lines were calculated in the
same manner. Once the numbers for the pin patterns are calculated,
they go in DATA statements, separated by commas.
First we’ll give you the whole program and its printout; then we’ll
explain two techniques we have not used before:
90 WIDTH LPRINT 255
100 LPRINT CHR$(27)"1"
590 FOR K=1 TO 3
600 LPRINT CHR$(27)"Y"CHR$(50)CHR$(0);
610 READ
620 IF
N:
IF N=128 THEN 650
N>=0
THEN LPRINT CHR$(N);: GOT0 610
630 READ P,R: FOR J=1 TO -N
632 LPRINT CHR$(P)CHR$(R);: NEXT J
640 GOT0 610
In this program we used the number 128 in the DATA statements
to signal the end of a print line. This is the reason for the IF-THEN
statement in line 610 that skips to line 650 and causes a line feed.
The other special technique used in this program is found in lines
620 and 630. Since some of the data numbers are repeated many
times, we save typing by using negative DATA numbers for repetitions. Line 620 tests for a negative number, and if it finds one, reads
the next two numbers and prints their pin patterns the number of
times indicated by the negative number.
For example, when the minus 6 in line 800 is read, the program
then reads the next two numbers (8 and 0) and sends them to the
printer six times. This feature is not a necessary part of the program,
but it does allow you to type fewer data numbers.
Otherwise the program is a straightforward graphics program that
uses 7-dot line spacing and reads numbers from DATA statements
and sends them to the printer. If you want to see the figure in other
densities, change the “Y” in line 600 to “L” or “Z”.
83
Graphics Programming Tips
Now that we’ve shown you how to design your own graphics,
we’ll review and emphasize a few elements of graphics programming.
As usual, we use MBASIC in the examples, but the principles apply
to any programming language.
Semicolons and command placement
After the graphics command is issued, every number sent to the
IX-86 is interpreted as a pin pattern and printed on paper. Therefore,
you must be careful where you put graphics commands in your
program.
For example, suppose you want a SO-column graphics line with the
line spacing set to T-dot. You might enter the following program:
20 LPRINT CHR$( 27) “K”CHR$( 50)CHR$(0)
30 LPRINT CHR$( 27) "1"
40 FOR G=1 TO 50: LPRINT CHR$(74): NEXT G
This program has all the necessary elements. Line 20 has the com-
mand for single-density graphics and specifies 50 columns. (Remember that you must use two numbers to reserve columns even if you
only need the first one.) Line 30 has the correct command for T-dot
line spacing, and line
(If you wish, refer back to Figure 9-2 to see a representation of the pin
pattern that 74 produces.)
40
calls for the printing of a pin pattern 50 times.
Although this program has all the necessary elements, it will not
give you the single pin pattern that you want, as you can see in the
partial printout in Figure
9-6.
J
J
J
Expected pattern
Figure 9-6. Result of incorrect program
84
Actual result
What went wrong? To help you understand the graphics command
and avoid some of the more common errors made with it, we’ll
examine this program in detail.
First look at line 20. ESCape “K” calls for single-density graphics,
and the two CHR$ numbers specify 50 columns of dots. Once that
command is given, every number sent to the printer is interpreted as a
pin pattern and printed on the paper. Since there is no semicolon at
the end of the line, the numbers 13 and 10-the codes for carriage
return and line feed-are sent to the printer after CHR$(0). Because
the graphics command has been issued, these codes are printed as pin
patterns.
Line 30 would normally be the command for 7-dot line spacing,
but since the graphics mode is still in effect, the command is inter-
preted by the printer as two pin patterns: 27 and 49 (the ASCII codes
for ESCape and “1”). Since there is no semicolon at the end of this
line, the numbers 13 and 10 are sent again, and again they are printed
as pin patterns.
In line 40 nothing is sent to the printer until after the LPRINT.
Then the desired pin pattern-74-is finally sent, but since no semi-
colon is after it, 13 and 10 are sent next each time the loop is executed.
Figure 9-7 is an enlarged representation of the first 13 columns of
the printout. In this figure you can see exactly how the printer reacted
to the first part of the incorrect program.
128
64
32
16
8
4
2
1
13
27
10 49 10
13
7410 13 74
13 74 10
Figure 9-7. Pin patterns of incorrect program
85
You may also wonder why the program prints not only the differ-
ent pin patterns but also the character “J” a number of times. The
reason lies in the number of columns you reserved with the graphics
command. After the LX-86 receives all the numbers reserved by a
graphics command-50 in this case-it leaves the graphics mode and
resumes interpreting numbers as printable characters or print commands.
Since the incorrect program has sent many extra numbers, mainly
10s
and
13s,
the 50 columns reserved are filled before the loop in line
40 has been executed 50 times. Therefore, during the last passes of the
loop the Ix-86 interprets CHR$(74) as the ASCII code for “J” and
prints that character each of the last 35 passes of the loop.
If you want to make the program work correctly, put the linespacing command in line 10, delete line 30, and add two semicolons:
one at the end of line 20 and one between CHR$(74) and the colon in
line 40.
We have explained this incorrect program in detail so that you will
remember two important tips about using the graphics command:
l Use semicolons to prevent the LX-86 from printing carriage re-
turn and line feed codes as pin patterns.
l Do not put any other commands between the graphics command
and its data.
Our example should help you understand the graphics mode better
and may help you find the problem when one of your own programs
gives you unexpected results.
String variables
In a long and complicated graphics program, typing in the graphics
command or repetitive data numbers over and over can become timeconsuming. You can avoid much of the repetitive typing by storing
commands and data in string variables.
Look at the program below. It is the same as the multiple-line
exercise earlier in the chapter except for the string variables.
Notice that the first line stores the whole graphics command in a
single string variable. In order to do this you must put plus signs
between the elements of the command. Once you have done this at
the beginning of the program, each time you enter LPRINT G$; you
have issued the graphics command. Lines 20 and 30 do the same thing
with the data used in this program. As you can see, the use of string
variables saves some typing even in this short program. In a long
program it can save you much more time and effort.
Graphics and low ASCII codes
Sending a few of the codes between 0 and 31 with BASIC or
another programming language can cause problems on some computer systems. The problem is that most computer systems handle some
of these codes in a special way instead of delivering them to the
printer.
For example, one computer system handles form feeds by itself. It
counts lines to keep track of the top of page. If a program sends the
ASCII code for form feed (12) to the printer, the computer system
intercepts it and sends instead the code for line feed (10) several times.
If you are in a graphics mode with this system and send a 12 to fire
pins 3 and 4, the computer system will intercept that 12 and send
several 10s instead. You can see how this would ruin your graphics.
You would get pins 2 and 4 (whose sum is 10) several times instead of
pins 3 and 4 only once.
If your computer system screens out or changes any codes sent to
it, you can often design around these problems by using other numbers with similar patterns, and you can see Appendix F for a method
to determine which codes may cause problems and for some ideas on
overcoming those problems.
87
Appendix A
IX-86 Characters
This appendix gives the control codes and characters for each code
from 0 through
the characters in the Epson Character Graphics set.
Further information on the character sets is in Chapter 6.
214 D6
215 D7
216 D8
217 D9
218 DA
219 DB
220 DC
221 DD
222
DE
223
DF
224
EO
225
E1
226 E2
227 E3
228 E4
229 E5
230 E6
231
E7
232 E8
233 E9
234
EA
235 EB
236 EC
237
ED
238
EE
239 EF
240 F0
241
F1
242 F2
243 F3
244 F4
245 F5
246 F6
247 F7
248 F8
249 F9
250
FA
251
FB
252
FC
253
FD
254 FE
255
FF
A-3
Appendix B
Commands in Numerical Order
This appendix lists all the LX-86 commands in numerical order.
The page number column indicates where a complete description
can be found.
Note that for commands from ESC SO onwards, the decimal
and hexadecimal columns show only the second code; the first
code for those commands is the ESCape code.
B-l
ASCII
BEL
BS
HT
LF
VT
FF
CR
so
SI
DC1
DC2
DC3
DC4
CAN
DEL
ESC SO
ESC SI
ESC EM
ESC !
ESC %
ESC &
ESC *
ESC ESC /
ESC 0
ESC 1
ESC 2
ESC 3
ESC 4
ESC 5
ESC 6
ESC 7
ESC 8
ESC 9
ESC :
ESC <
ESC ?
ESC @
ESC A
ESC B66
ESC C
ESC CO
ESC D68
ESC E
ESC F
Dec
10
11
12
13
14
15
17
18
19
20
24
127
14
15
25
33
37
38
42
45
47
48
49
50
5133
5234
5335
5436
55
56
5739
58
60
63
64
65
6743
67
69
70
HexDescription
7
07
8
08
9
09
0A
0B
0C
0D
0E
OF
11
12
13
14
18
7F
0E
0F
19
21
25
26
2A
2D
2F
30
31
32
37
38
3A
3C
3F
40
41
42
43
44
45
46
Beeper
Backspace
Tab horizontally
Line feed
Tab vertically
Form feed
Some applications programs can use control key codes for decimal
values O-27. The table below gives you the proper values. The Control key column indicates that you press the control key at the same
time you press the key for the letter or symbol in that column. For
example, you press the control key and A at the same time to send the
value
1.
Some programs that use this system cannot use control-@, and
many programs use the control keys for other purposes.
DecimalHexadecimal
0
1
00
01
202
3
4
5
6
7
8
9
10
11
12
13
14
15
03
04
05
06
07
08
09
0A
OB
0C
0D
OE
OF
1610
17
11
1812
19
20
21
22
13
14
15
16
2317
24
25
26
18
19
1A
Control key
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
0
P
Q
R
s
T
U
V
W
X
Y
z
B-4
Appendix C
Command Summary
This appendix lists and describes all the commands available on
the LX-86. This summary is divided into the following topics:
Near Letter Quality
Character Width
Print Enhancement
Mode and Character Set
Special Features
Line Spacing
Each command has a format section and a comment section.
The format section gives the ASCII, decimal, and hexadecimal
codes for the command, and the comment section describes and
explains the command.
For a list of the commands in numerical order, see Appendix B.
Forms Control
Page Format
User-defined Characters
Dot Graphics
Miscellaneous Codes
Near Letter Quality
ESC x
Format:
ASCII code: ESC x (n)
Decimal:
Hexadecimal: 1B
27
120
78 (n)
(n)
Select Print Mode
Explanation:
Selects draft mode if n = 0, or Near Letter Quality (NLQ) mode
If n=1 .
c-1
ESC
a
Format:
ASCII code:
Decimal:
Hexadecimal: 1B 61 (n)
Explanation:
See Chapter 7 for information on this command.
ESC
27 97 (n)
Select Justification Mode
Character Width
SI
Format:
ASCII code:
Decimal:
Hexadecimal: OF
Explanation:
This command is only effective in draft mode. It produces
characters that are approximately 60% of their normal width.
SI
15
Select Condensed Mode
ESC SI
Format:
ASCII code:
Decimal:27 15
Hexadecimal: 1B OF
Explanation:
Duplicates the SI command.
DC2
Format:
ASCII code:
Decimal:
Hexadecimal: 12
Explanation:
This command cancels the condensed printing selected by SI
and ESC SI.
c-2
ESC SI
DC2
18
Select Condensed Mode
Cancel Condensed Mode
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.