Epson MX-70 User Manual

User’s Manual
for
MX-70 Printer
by
David A. Lien
COMPUSOFT® PUBLISHING
P.O. Box 19669 l San Diego, California 92119 U.S.A.
This Book was prepared especially for Epson America, Inc. by CompuSoft® Publish­ing. All rights, domestic and international are reserved by CompuSoft®, Inc. Requests for permission to reproduce or distribute this User’s Manual should be addressed to:
COPYRIGHT DEPT
CompuSoft®, Inc.
P.O. Box 19669
San Diego, CA 92119
Copyright © 1981 by CompuSoft
A Division of CompuSoft®, Inc.
San Diego, CA 92119
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher. No patent liability is assumed with respect to the use of the information contained herein. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein.
CompuSoft® is a registered trademark of CompuSoft®, Inc.
International Standard Book Number: o-932760-06-6
Library of Congress Catalog Card Number: M-70726
10 9 8 7 6 5 4 3 2 1
®
Publishing,
Printed in the United States of America
FCC Compliance Statement
This equipment generates and uses radio frequency energy. If not installed and used properly, that is, in strict accordance with the manufacturer’s instructions, it 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 determined by turning the equip­ment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
- Reorient the receiving antenna
- Relocate the computer with respect to the receiver
- Move the computer into a different outlet so that computer and re­ceiver 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, Washing­ton, DC 20402, Stock No. 004-000-00345-4.
iii
Trademark Acknowledgements
TRS-80 is a Trade Mark of Radio Shack. Centronics is a Trade Mark of Centronics, Inc. Apple is a Trade Mark of Apple Computers, Inc. Microsoft is a Trade Mark of Microsoft, Inc.
A Personal Note From the Author
Congratulations on your decision to buy an Epson MX-70 printer! In my opinion, it’s the best dollar value in a low cost printer on the market today. Like its big brothers the MX-80 and MX-100, its mechanical features are unsur-
passed for the cost. Its electronics features are ideal for the user looking for top
value in a printer for general utility use, and high resolution graphics.
“WHO NEEDS A LEARNERS MANUAL FOR A PRINTER?” The answer -
ALMOST EVERYONE EXCEPT A COMPUTER PROFESSIONAL. Today’s printers are very sophisticated compared to those of even a year ago.
Most are not fully utilized because the instructions are too vague and confus­ing. We’re doing our best to eliminate that problem with the Epson MX-series.
Z encourage you to learn all about your new MX-70. You paid for it. Put it to work.
Dr. David A. Lien San Diego - 1981
vi
MX-70 Table of Contents
FCC Compliance Notice Trademark Credits Personal Note from the Author Introduction
Chapter 1: The Starting Line
......................................................
Chapter2:SenditaMessage
Chapter 3: More Print Control Commands Chapter 4: An Introduction to Dot Matrix Printing Chapter 5: Graphtrax II Chapter 6: Advanced Graphics
Chapter 7: The Final Push
Chapter 8: Using the HIRES Screen Dump Program Appendix A: ASCII Charts for MX-70
Appendix B: Control Codes
Appendix C: Character Set
Appendix D: TRS-80 Differences Appendix E: Use with Atari Appendix F: Use with Apple Appendix G: Special Notes on Other Computers, Languages/Interfaces ... Appendix H: Technical Specifications Appendix I: Control Circuit Board and Initialization
Appendix J: Pinout Chart Appendix K: Parallel Interface Timing Appendix L: Printer Maintenance Appendix M: Schematic Diagram Index Notice
............................................................
...........................................................
............................................
................................................
.....................................
.......................................
.......................................
...........................
....................
............................................
.....................................
..........................................
...................
................................
.........................................
.........................................
....................................
........................................
........................................
................................
...................
..........................................
...............................
...................................
...................................
iii
iv
V
ix
1
13
23 31 41 49 59 67 79
81 83 85 89 91 95 97
99 101 103 105 107 109 111
vii
USER’S SERVICE
MANUAL
WARNING
High voltage exists inside this unit and the case should be opened only by a qual­ified person!
viii
USER’S SERVICE
MANUAL
WARNING
High voltage exists inside this unit and the case should be opened only by a qual­ified person!
viii

Introduction

“But do I REALLY have to take a course on ‘How to operate a printer’ to use this one?” No - not if you only want to use it for mundane printing. It prints “mundanes” very nicely.
If you want to use the exotic features it offers, approach your new printer in the same way as your first computer ­They probably far exceed what you expected from a printer inexpensive enough to call your own.
The MX-70 printer works with virtually any computer properly interfaced to it. This “Learner’s Manual” uses the popular Apple II Plus as its “driver” since the Apple’s high resolution graphics features so closely parallel the printers. What’s taught here applies to all computers, though not all are powerful enough to utilize every MX-70 feature. More on that in good time.
Impatient readers should head for the appendices and usual reference materials at the back. The rest of us will believe that this is no ordinary printer and take the time to learn to use it right - the first time.
A good working knowledge of the BASIC* language is all that’s required as we begin, with Chapter 1.
with a healthy curiosity and an open mind.
“Users who feel their BASIC skills are a little rusty are referred to the following books by the same author:
The BASIC Handbook (2nd Edition), Encyclopedia of the BASIC Lan-
guage. 480 Pages. Available through CompuSoft Publishing, Box
19669, San Diego, CA 92119.
Learning TRS-80 BASIC. Available through CompuSoft Publishing, Box
19669, San Diego, CA 92119.
ix
X
Chapter 1
The Starting Line
This important chapter shows how to unpack, set up, and test your new printer.
Read it before you get into trouble. The time spent will be your best investment since buying the printer itself.
Counting the Parts
Open the box and carefully and remove the contents. We should find:
1. This User’s Manual (obviously . . . )
2. The Epson MX-70 printer
3. A long box containing the ribbon cartridge
4. A wire rack to guide the paper
The Starting Line
We also need a cable to connect the printer to our particular computer. Your
Epson dealer can provide cables that match the Apple, TRS-80, and other
computers. If you use a non-Epson cable, make sure it is wired properly. We
have tried many other cables that “should” work, but don’t. The MX-70 uses the Centronics Standard Parallel Interface scheme. Users
whose computers require other interfacing schemes should select another printer in the MX series.
Setting it up
Let’s first remove the printer lid so we can work without breaking something. Lay the MX-70 flat on a firm surface and raise its lid to the full vertical position
(Figure l-l).
Figure l-l
1
Chapter 1
With the printer facing you, as shown in Figure 1-2, grasp the
side and pull straight up. Very easy. To replace the lid,
lid on its left
just reverse
top
the
procedure.
Figure 1-2
Locate the 2 shipping screws, shown in Figure l-3. These screws are used to protect the MX-70 from damage during shipping.
Shipping Screws
Turn the printer over and lay it on a soft surface. Using a Phillips type screw­driver, remove the shipping screws and save them in case you decide later to lend the printer to Aunt Bernice in Ohio. These screws are in place during ship­ping to protect the printer from damage and are located as shown in Figure l-3.
Shipping Screws
Figure 1-3
Turn the printer back over when you are ready for the next step.
2
Installing the Ribbon
Position the printer with the Epson label (front) facing you. Locate the paper bail (the moveable metal bar with numbers l-80 on it - see Figure l-3) and push it toward the back of the printer, against the metal platen.
Remove the ribbon cartridge from its box and turn the plastic knob coun­terclockwise so the ribbon is tight. (Figure l-4A)
The Starting Line
Figure 1-4A
Hold the cartridge by its vertical fin (sounds like a shark). Steer the 4 tabs on its sides into the 4 slots in the printer’s metal frame (Figure 1-4B). Press the
cartridge firmly into place.
Figure 1-4B
Using a pencil (or your fingers), lift the ribbon onto the slot in front of the print head, as shown in Figure 1-4C. With a little practice, we can do all of the above in one quick operation.
3
Chapter 1
Ribbon
Incorrect
Incorrect
Figure 1-4C
Correct
Wind the ribbon tight again with the little plastic knob, and it’s all set to go.
You may notice a sticker with the words EXCHANGE TIMES pasted on the ribbon cartridge. This is a remnant of an early plan to refill the cartridges when the ribbon wears out. That idea was abandoned, at least for the time being.
Matching the Printer to the Computer
At this point, a decision should be made. If the information we need isn’t available, we’ll decide to defer the decision. Isn’t that how all good bu­reaucracies work?
Some computers, like the Apple, tell the printer to roll the paper up one line
each time the print head returns to the left after printing a line. Technically, we
say each CR (Carriage Return) is accompanied by an LF (Line Feed). Other computers, like the TRS-80, rely on the printer to know enough to insert
its own LF when it receives a CR. Either way is just fine with the MX-70 since it can be wired either way.
Opening the Case
To locate the wiring terminals, we have to open the case. The lid should still be off. Remove the roller knob by pulling straight out, with firm but steady pressure (Figure l-5).
Figure 1-5
The Starting Line
Turn the printer upside down on a soft surface. With a Phillips-head screwdriv­er, completely loosen (but don’t remove) all 4 corner screws as shown in Figure
l-6. Place tape over the 4 holes so the screws won’t fall out when we tip the
printer right-side up again.
Figure 1-6
Now tip the printer right-side up again.
Gently wiggle the top cover loose. Wires are booked to it! We are not going to
completely remove the cover - only open it enough to gain access to the main wiring board.
Lift the cover up, mostly from the left side, and slide it gently to the right to
free it from the roller shaft. Be careful not to pull the wires on the right-hand
side. With just a bit of class we can maneuver the cover so it stands solidly in
place, as a sentinel guarding the goodies.
5
Chapter 1
Figure 1-7
Take a minute to gawk at all the stuff in the box. Wow! As Custer said, “Look
at all those . . . ” well, anyway. Wonder how they sell it as cheap a they do? (Hope it prints as good as it looks.)
The Epson Connection
Figure l-7 shows the location of the moveable wire. It is between the 2 “pull top” terminals, and is labeled “auto. transfer to the other, pull up gently on its colored top. To lock a wire in place, insert it fully in a terminal and press the colored top down. Pull gently on the wire to be sure it is securely locked.
If the “auto” wire is connected to the red (or orange) terminal, the printer relies on the computer to send its own LF along with CR. That’s what’s needed for Apple-type computers.
If the “auto” wire is connected to the white terminal, a LF will automatically be added when a CR is received from the computer. This is what’s needed for the TRS-80 and most other computers.
Terrific. So where do we put the wire for our computer?
” To release the wire from one terminal for
6
When in Doubt, Bluff
If you have an Apple, move (if necessary) the short white wire located between
them to the red terminal (as in red apple).
If you have any other computer, hook it (for now) to the white terminal. If we guessed wrong, nothing will be harmed. We’ll just have to reopen the case
and move it to the opposite one. The results will be known early in the next
chapter.
A plastic plate is taped to the access hatch on the inside back of the lid. We can either leave it in place as we replace the lid, tape it to the outside of the hole, or add it to our growing collection of printer parts. In theory, the wire could be moved from one terminal to the other through this hatch - but only by a skilled dentist.
If you are sure the wire is on the proper terminal, put the printer back together and tighten the screws. If not sure, put it back together and don’t tighten the screws. The cover goes back on the way it came off - very carefully.
The Starting Line
Printer Cable Connection
We’re getting closer to the good stuff. Be sure both the computer and printer are turned off. Connect the printer cable
to the printer only -not to the computer! It plugs into the only jack on the back of the MX-70 case.
Epson dealers can supply cables to match different computers. Check with your Epson dealer to be sure you have the right one. Cables supplied with the computer frequently do not work. Do not connect the other end of the cable to the computer, yet.
Take your time! Double-check to ensure that the cable is in place and locked.
It may take a firm push on the connector to secure the locking clips. Without this tight connection, printing may be erratic. Again - leave the other end disconnected.
The Paper Rack
The wire rack with the plastic roller tube is a paper separator. It allows the paper to feed smoothly in to and out of the printer, holding it away from the cable.
7
Chapter 1
To install the rack, simply spring the wires a bit so they pop into the holes in the printer frame, as shown in Figure l-8.
Figure l-8
Feeding the Paper
The MX-70 accepts pin-feed paper between 4” and 10” wide. Both the left and right hand tractors are adjustable to match the spacing between the drive holes.
(We never get too far from the land, do we?) Position the box or stack of paper behind and below the printer. Reliable
operation depends somewhat on the weight of the paper keeping itself taut (Figure 1-9).
Figure 1-9
8
Pull the paper bail forward. Open both tractor covers and center the paper guide roller between them (Figure l-10).
Tractor Position Lock Lever
Paper Holding Cover
Paper guide roller
Tractor Position Lock Levers
Paper Holding Covers
The Starting Line
Figure 1-10
Feed the incoming paper above the plastic tube but below the wire frame, into the slot and right on around to the tractors. Move the tractors as necessary to
match the hold spacing in the paper. The tractor position lock levers are shown in Figure l-10.
Position the paper holes on top of the tractor teeth and close the tractor covers. Adjust one or both tractors so the paper is centered as you wish it, and is held firmly in place. Push the bail back up against the paper.
Roll the paper forward with the roller knob.
The printer moves paper forward only, and never looks back. If we must turn the roller back manually, the power should be OFF; it helps to pull lightly on the paper.
Pull the bail back out of the way and set the paper so the top of a new sheet is positioned right at the scribe mark on the metal platen (Figure l-11). Push the bail back up against the paper.
9
Chapter 1
Adjusting for Paper Thickness
The MX-70 can print on all types of pre-printed multiple copy forms and carbons, as well as ordinary printer paper. The 7 position thickness control
lever (Figures l-10 and l-11) moves the print head closer to or farther from the paper, changing the print quality somewhat. For ordinary, single-thickness paper, start out with the control lever at about the middle position. For multiple copy forms, pull it towards the front of the printer. Push the lever towards the rear of the printer to produce slightly darker print.
Figure 1-11
Plugging it in
One more item, and we’ll be off and running.
Printers sold in the U.S. and Canada are designed for a standard 12OV, 60Hz
outlet, and have a 3 wire ground plug. Do not attempt to defeat the grounding.
When you’ve located a proper outlet, see that the POWER switch on the
right-hand side (Figure l-10) is OFF, then plug the cord in!
At Last
The big moment is here. TURN IT ON!
Mmmm! Look at that! A few startup clicks, a single green light, and it just sits there waiting. The old days were never like this.
10
Where is all the motor noise? How about some big levers, lights, and alarms?
Looks like dynamite in a small silent package!
The POWER light should be lit. Press the FEED button several times and
watch it advance the paper. This doesn’t look at all complicated.
The Final Checkout
The final part of this checkout takes about 3½ minutes. It’s important that we do it; plus it shows us what print characters are available.
Load the printer with plenty of paper. Turn the printer OFF. Hold the FEED button down and turn the printer back ON - at the same time.
GO! WOW! Look at that son-of-a-gun go. Watch the head printing. Move the paper
bail out of the way to see it better, but keep your fingers (and hair) out of the hardware.
The Starting Line
When the printer stops, advance the paper forward with the FEED button, and tear off the self-test run. Hang it up on the wall as a souvenir.
Whew!
That’s enough for this chapter. Take a short walk to vent the exhilaration. All’s well and we’re on the right track. In the next chapter we’ll hook it to the
computer, turn it on, and see what happens.
GO !
11
Chapter 2
Send it a Message
The MX-70 printer is smart. It knows how to follow instructons.
Any Code Devised by Man Can be Broken by Man
Many instructions are sent to the printer. Every letter, number, and other character travels from the computer through the printer cable in the form of a code made up of numbers. We know it as the ASCII code (American Standard Code for Information Interchange), pronounced ASK-key.
Let’s take a quick glance at Appendix A to refresh our memory. The decimal number 65 stands for the letter A - etc.
The ASCII code numbers for upper case letters, numbers, and punctuation are pretty well standardized around the world. Unfortunately, the remaining code numbers are used in a variety of different ways, even among manufacturers within a single country.
Send it a Message
Besides letters and numbers, we can also send “special” codes to make the MX-70 print wide letters, or enter a special graphics mode that permits us to control where each individual dot is printed. To take advantage of these fea­tures, however, the comptuer has to be able to send these special code numbers.
As we will see, each with his own computer, not all computers can send all code numbers. With printer technology advancing faster than computer technology, the computer has replaced the printer as the weak link in the system.
The Code Courier
In many cases, the easiest way to send these special codes is to “build” them into the computer program along with its “regular” codes for ordinary letters and numbers. We can do this easily using programs written in the BASIC (or
another) computer language. Because of its simplicity and overwhelming popu-
larity, we will do all our demonstrating and learning here in BASIC.
We can also send these special codes at some computers “command level”
before running a program. A program may even contain codes to change earlier
codes, allowing us to print things the way we want them, when we want them. The route to success in BASIC is via CHR$ (pronounced Character String).
Users with so-called Integer BASIC, which may not support the CHR$ func­tion, may be restricted to very routine printing. To use the MX-70’s exotic
13
Chapter 2
graphic and other features they will have to resort to POKEing codes or some other devious means, and are referred to their own computer’s reference manual.
The Philosophy
This is a book about a printer, but since a printer without a computer is worthless, we must also talk about computers. It is still a book about how to use a printer.
We have chosen to write this manual around the Apple II-t computer, using Applesoft BASIC. The Apple features high resolution graphics like the MX-70, so advanced users can create images on their screen and dump them directly to the printer. (The Epson MX-80 printer manual was written around the TRS-80 for similar obvious reasons.) Most other computers can also print HI-RES
graphics on the MX-70, even if they can’t print those same graphics on their
video screen. (Think about that one for a minute!) To meet the needs of the maximum possible number of users, the first 7
chapters assume use of a simple 16K non-disk system. Users with more elabo­rate systems can either pull the disk controller card and follow along, or see Appendix F for special BASIC disk considerations.
Chapter 8 teaches use of the special disk-based screen dump program (called HIRES), which can be supplied by Epson dealers for Apple computers. It logically assumes that any user who can use that diskette has an Apple disk
system with 48K of user memory, and the chapter is written accordingly.
Variations on a Theme by Dartmouth
BASICS do vary. Applesoft BASIC and some others communicate with printers in a distinct way. A command such as PR#l “hooks” the printer (or whatever
14
may be connected to Port #l) to the code stream sent to the video screen. PR#0 “unhooks” Port #I from the video signal chain by sending ALL printing only to the screen.
Most other BASICS use a special word such as LPRINT to send codes directly
(and exclusively) to the printer. A separate PRINT statement must be used to send codes exclusively to the video screen.
A few computers even have a dual command that allows use of just PRINT, but everything that goes to the screen also goes to the printer port. The computer you use determines which scheme you select.
If you’re not using an Apple, peel and slice the Apple programs in this manual as needed. If you know your own computer, it should be easy. If this causes gastric acidity, I respectfully suggest referring to a copy of the second edition of The BASIC Handbook, by your humble servant.
If you are using an Apple computer, continue straight ahead. If it’s a TRS-80,
System 80, PMC-80, or any other machine using a similar Microsoft-type BASIC, GOSUB immediately to Appendix D. Atari users GOSUB to Appendix
E. If it’s any other computer that requires a special interface to drive a parallel
printer, GOSUB to any instructions that might come with that special inter­face kit.
Send it a Message
Non-Apple users should ignore the few sections that are clearly written for the
Apple, like the following paragraph, unless of course you want to learn some­thing about another computer - which isn’t a bad idea.
The Apple Stem
Apple users verify that the power is OFF, then place the Epson Parallel
Interface card in slot 1 (not 0) of the computer’s mother board. Connect the
printer cable as shown in Figure 2-l.
Figure 2-1
15
Chapter 2
There are many parallel interface cards made by other manufacturers. Be sure the card you purchase is designed to work with the MX-70.
Testing the Hookup
The time has come to see if all this hardware works. Whatever your computer is, now’s the time to be sure it’s hooked up to the printer.
We will soon find out if we hooked the “auto” wire to the correct terminal, mentioned in the last chapter.
Turn on the MX-70 first, then the computer. Type in the following software:
PR#l
(for Apple users only, to “switch in” the
printer. We will leave it tied to the screen for this entire chapter.)
10 FOR P = 1 TO 24
20 PRINT P 30 NEXT P
(TRS-80 and most other Microsoft
BASICS use LPRINT in Line 20)
and RUN. If the printing is single-spaced (6 lines per inch), skip to the next paragraph. If
the printing is double-spaced, go back inside the printer to switch the “auto”
wire to the other terminal. (Don’t forget to turn off all the power first!) Remember:
RED CAP - NO LF ADDED WHITE CAP - ADDS LF TO EACH CR RECEIVED
If nothing printed, the problem is probably in the cable. Many connectors are wired differently than the Epson cable. See Appendix J for the correct MX-70 connector wiring.
When All Systems Are “Go”
When all is well, type in this short demonstration program, but DO NOT RUN
it, yet:
- TRS Model I users - see Appendix D for help with line 30.
- Atari users - see Appendix E for help with trailing semicolons.
16
Send it a Message
10 PRINTTAB (14) ;
“GREETINGS FROM THE GRAPHIC”
20 PRINTTAB (22); CHR$ (14); “MX-70’ 30 PRINTTAB (22) CHR$ (27) “K” CHR$ (60) CHR$ (0);
40
FOR I=1 TO 25 STEP .4 50 PRINT CHR$ (2^INT(3.4*(SIN(I)+l))); 60
NEXT I : PRINT 70 PRINTTAB (20) CHR$ (98) CHR$ (121) CHR$ (14)’
EPSON’
Time Out For Emergency Training
CAUTION: If you make a typing error that causes the program to crash, or look weird, be sure to turn the printer OFF then on again before running the corrected program. The faulty program may have sent an unwanted code
“down the line.” It may even have sent something unpatriotic like “don’t listen to the computer.” OFF and ON. (Yep -just like they had to do on the first space shuttle flight).
It may even be necessary to shut the computer down cold, and start over from the beginning. The printer has its own internal “computer,” and the two
computers talk to each other. If one decides to throw a temporary snit, we have
to get in between them and cool things down. It doesn’t happen often, but as
with any computer, a glitch on the power line or a static electricity discharge
can cause all sorts of heartburn. Best to know how to handle it when it comes.
The printer will reset itself to “normal” by simply turning it
Operator Now Certified
Now RUN.
There it is! We finally strapped these two pieces of high and got us a real convoy.
GREETINGS FROM THE GRAPHIC
MX - 70
by EPSON
Figure 2-2
RUN it again. This time pull the paper bail forward to get a better look at the print head in action.
technology into harness
17
Chapter 2
There is a lot happening, so we’d better disect the program (like a frog) to learn
all about it. Type
LIST
(TRS-80 etc. use LLIST)
to LIST the program on paper.
Push the FEED button to roll the printout past the lid. Tear it off and keep it handy so we can study the program as we go along.
SAVE the program on tape (or disk) to avoid having to type it in later.
Line by Line
We’re going to type the last program back in, a line at a time, analyzing it as we go.
An alternate strategy is to load the entire program back in from disk or tape, then delete all the lines except the ones being studied. A second alternative is to leave the program in, inserting a REM before each line, removing the REMs as we progress. A third alternative is to leave the program intact and temporarily insert an END at Line 15, shifting it down the program as we progress.
Take your pick!
Line 10 is straightforward. It PRINTed, the “greetings,” starting 14 spaces from the left. Type it in and RUN, watching the head action as it prints.
GREETINGS FROM THE GRAPHIC
Figure 2-3
Well, that was rather “pedestrian.”
Line 20 has 3 PRINT statements on the same line. They are separated by
semicolons, which are usually optional. The first PRINT statement TABS the print head over 22 spaces, the second sends one of those special CHR$ (character string) codes we mentioned earlier, and the third prints
“MX-70.”
CHR$ (14) stands for:
print DOUBLE WIDTH.
Appendix B contains all the special codes, often called CONTROL
CODES.
18
Not all codes actually print on either the screen or the printer. Most special or “control” codes don’t really PRINT anything, even though we must precede them with a PRINT to “push them down the line” to the printer.
For example, type the following at the command level:
PRINT CHR$(14); "DOUBLE WIDE"
and see the words appear in double width (not double spaced).
DOUBLE WIDE
Figure 2-4
LIST the program to paper again. Notice that the double width feature is no longer switched on. The message: EACH TIME WE WISH TO PRINT SOMETHING IN THE DOUBLE WIDE MODE, WE MUST PRECEDE IT WITH CONTROL CODE 14.
Send it a Message
When that LINE is finished printing, the double width feature is automatically
turned off.
Now that we understand line 20, let’s add it in and RUN our 2-line program.
GREETINGS FROM THE GRAPHIC
MX - 70
Figure 2-5
Pretty nice - eh? If you wish, do another LIST. Look at the printout to feel
confident that DOUBLE WIDTH really got switched off.
The programming in line 30 is a bit more exotic. It consists of only 1
PRINT statement to “push”
1 TAB, a control character, a “K,” and two ASCII characters to the printer. The control code 27 stands for “ES­CAPE,” which forces us to GOSUB to another topic.
The Great Escape
The MX-70 recognizes a few so called “Escape Codes.” They are similar to (and really part of) the control codes under discussion. Escape codes should not
be confused with the escape KEY which may be on your keyboard, though
they are shirttail relatives.
19
Chapter 2
We send the special code CHR$ (27), which means “<Escape>,” down the
line immediately preceding a control code that needs that <Escape>. These
special “code pairs” them into a BASIC program or send them from the command level, as we did earlier with the simple stand-alone control codes. We will learn to use each
“Escape code” as it is needed.
are logically called “Escape codes.” We can either build
Our First Escape Code
<Escape> “K” stands for KICK it into the GRAPHICS MODE. As part of
the graphics mode series of commands we must tell the printer how many
columns of graphics we intend to print. The next two codes, CHR$ (60) and
CHR$ (0) tell that tale:
CHR$ (60) means “expect 60 characters.” printed as text. If less than 60 are sent, the printer will just sit and wait until that quota is satisfied.
CHR$ (0) tells the printer that we decline to send another 256 charac-
ters. If that latter point seems a bit obscure, don’t worry. We’ll get a more detailed explanation of what that means and plenty of practice in the graphics chapter. Just follow along with the act, for now.
Model I TRS-80 users note: the Model I cannot send a CHR$ (0) reliably to the printer. Try CHR$ (2) instead or see Appendix D for special instructions to deal with this problem.
Any additional ones will be
Return
RETURNing from our GOSUB, type in line 30, but don’t RUN it, yet. We have
to create some graphics to send at the same time.
30 PRINTTAB (22) CHR$ (27) "K" CHR$ (60) CHR$ (0);
Lines 40 and 60 are the loop that sends the 60 characters from line 50 to the printer. Actually, the loop sends a few more than 60, (2510.4 = 62.5), but we told the printer to only accept 60, so it ignored the “overage.”
Add these lines in preparation for the big one.
40 FOR I=1 TO 25 STEP .4
60 NEXT I : PRINT
20
Loading...
+ 77 hidden pages