While every precaution has been taken in the preparation of this book, Epson America, Inc. and the author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein.
Preface The User’s Manual for the FX Series printers consists of two vol- umes: Tutorial and Reference. This volume, the Tutorial, is arranged in the following logical groupings: Introduction (for everyone) Programmer’s Easy Lesson (for experienced users) Hardware description: Chapter 1...
may use a version of BASIC other than Microsoft, you may need to modify some of the programs in this manual before they will run. Appendix F offers help, as do the next several paragraphs. Methods for sending BASIC print and listing commands to the screen and to the printer vary widely.
This format allows you to shorten a program line by combining a command and its print string. In the case of Double-Strike, for in- stance, the quoted letter “G” turns the mode on and "H" turns it off. To see how combining the code with a print string works, compare: 10 LPRINT CHR$(27)"G";"DOUBLE-STRIKE PRINT"...
The computer ignores these remarks; they merely serve to help pro- grammers understand at a glance the way a program is working. You may type them in or not, depending on whether you think you will want them in the future. We use the caret symbol (^) to indicate exponents.
Introduction FX Features Epson’s MX series of printers attracted enough attention to become the most popular line of printers in the industry. Our FX printers fol- low in the same grand tradition. The FX printers’ power-packed assortment of features includes:...
Replaceable print head Easy-to-reach DIP switches to customize printer features. Epson reliability, quality, and support In short, the FX is loaded with features that will challenge your ability to put them to work. This manual can help you use one or all of them.
You can use this manual as a reference, a tutorial study guide, or some combination of the two. For those of you who want to use the printer for one simple applica- tion (like listing BASIC programs or using a word processing pack- age), a description of the hardware and an overview of the software may be all that’s necessary.
Think of the manual as your personal guide in your exploration of the FX’s many features. For a preview of what your programs can produce, take a look at the following potpourri of print modes and graphics.
Programmer’s Easy Lesson Before you start, note that we haven’t claimed that one easy lesson will make you an FX maestro. It takes more than one lesson to learn the full value of the feature-packed FX printer. In fact, the more time you spend with this manual, the more your printer will cooperate with your every command.
feed the paper through. If you use single sheets of paper, the paper- out sensor will cause a beep and stop the printing whenever the bottom edge passes the sensor. You can shut off the sensor by changing DIP switches as shown in Chapter Turn the printer and computer on and load a short BASIC pro- gram.
Ticket Program Description This is not a complete explanation of the program. That’s what the rest of the manual is for. But this brief, line-by-line description should help those of you who wish to analyze the program. Stores values in variables for easy access. E$ holds the ESCape code, CHR$(27).
210 Prints borders, then switches to Compressed and prints BY. Sets, with ESCape ”!X”, Emphasized Double-Strike Pica, and prints EPSON. This new mode automatically turns off Compressed. 220 Sets Superscript Mode (Escape “SO”), returns to normal print (Escape”!@“), prints INC in Superscript, then cancels Script Mode, then prints borders.
280 Returns the printer to its defaults. 300-330 Provides data for the FX letters as user-defined characters 0-3. Provides data for the ticket borders. 350-410...
3. A paper separator 4. Two protective lids 5. One ribbon cartridge (in a box) 6. This FX Series Printer User’s Manual The FX-80 has a tractor built into its platen for handling continuous- feed paper between 91/2 and inches in width. To handle narrower continuous-feed paper, you must purchase the optional FX-80 tractor unit.
Figure 1-3. Paper path Printer Preparation Once you’ve found a good home for FX, you’ll need to do some preparing before you can print. This section describes the first steps, which include installing a few parts, checking the setting of some internal switches, and then inserting the ribbon cartridge.
Figure 1-4. Paper separator Covers For protection from dust and foreign objects and for quiet opera- tion, FX printers use two types of covers. When you use the friction feed on either the FX-80 or the FX-100 or the built-in tractor on the FX-80, use the pair of flat protective lids (Figure 1-5).
fitting over its post. Lower the cover. To remove the cover, move it to its full vertical position and then lift it up and a little to the left. Figure 1-5. Protective lids Figure 1-6. Tractor cover Manual-feed knob The manual-feed knob (Figure 1-7) can aid you in loading and adjusting paper.
the right side and twist until the flat sides of rod and fitting match. Push the knob straight in with a steady pressure. To remove, pull straight out. Figure 1-7. Manual-feed knob DIP switches Several tiny switches, called DIP (for Dual In-line Package) switches, are located inside the FX.
These switches are set at the factory, and most of them you will never need to touch. You may, however, want to take the time now to match up the switches with their functions, as shown in Table 1-1. For a further discussion of the DIP switches, see Appendix E.
Table 1-1. DIP switch functions Switch 1 Some computer interfaces automatically send a line-feed code to the printer at the end of each print line. Other interfaces send only a carriage return (which returns the print head to its left-most position), and rely on the printer to perform the automatic line feed.
end of the cartridge into the corresponding slots in the printer frame (Figure 1-11). The cartridge should snap neatly into place. With the paper bail resting on the platen, you can tuck the ribbon between the metal ribbon guide and the black print head. As Figure 1-11 suggests, you can ease the ribbon into place with the deft application of a dull pencil.
Figure 1-12. Printer readied for paper insertion Be sure the printer is turned off. Lift the front protective lid and move the print head to the middle of the platen. Remove the center protective lid. Pull the paper bail and the friction-control lever toward the front of the printer.
Figure 1-13. Pin feeder adjustment very important to keep the paper straight so that the pins on both sides engage at the same time. If the paper does not move smoothly, remove it by reversing the manual-feed knob and start again with an unwrinkled sheet.
As the paper comes up the front of the platen, watch to be sure that it is feeding under the black edges of the pin feeders. If your paper is wrinkling as it comes through, you may need to readjust the pin feeders.
Now follow these steps to load your paper into the friction feeder: Be sure the printer is turned off, Lift the front protective lid and move the print head to the middle of the platen (refer back to Figure 1-12). Pull the paper bail up. Engage the friction-control mechanism by pushing the friction- control lever to the back.
To load the paper into the unit, use this procedure: Be sure the printer is turned off; then open the front protective lid to move the print head to the middle of the platen. Pull the paper bail and the friction-control lever toward the front of the printer (refer back to Figure 1-12).
Top-of-form position After you have loaded the paper, you should set it to the top of form, which is the position of the print head when you turn the printer on. (Since the computer term form corresponds to the word page, it may be easier for you to think of this as the top of the page.) To make this setting, advance the paper until a perforation lies slightly below the top of the ribbon.
Figure 1-19. Top of form The other end of the cable plugs into your computer. If your 1-21). cable includes grounding wires, be sure to fasten the wires to the grounding screws at each end. With the paper loaded, turn the printer on with the toggle switch at the left-rear comer of the FX.
Figure 1-21. Cable connection Control panel When the control panel’s ON LINE light is on, the printer and com- puter are in direct communication and the FF (form feed) and LF (line feed) buttons have no effect. Go ahead, try pushing one. To use the FF and LF button;...
loaded because the printer’s test uses all columns. Turn the printer completely off (with the switch on the left side of the printer), press down the LF button, and turn the printer back on again while still holding down the LF button. Figure 1-22.
Chapter 2 BASIC and the Printer While you read this manual, you’ll be testing your FX with pro- grams in the BASIC language. You can, of course, use another lan- guage with your printer; see Appendixes A through D for the ASCII and ESCape codes that your software manual will explain how to use.
Table Several computers’ print LIST commands 2-1. If your listing is more than a page long (or if you didn’t start the listing at the top of a page), your printer may have printed right over the perforation. Set DIP switch 2-3 to the on position, and the printer will automatically skip over the perforation.
Character strings The character-string (or CHR$) function converts any decimal number from zero through 255 to a character or action. Its format is CHR$ followed by a number in parentheses, for example, CHR$(84). The character-string command follows a PRINT or LPRINT com- mand and causes your computer system to send an ASCII code to the computer’s screen or to the printer.
Table 2-2. Several computers’ printer activating commands Check your computer’s reference manual and type in the com- mands appropriate to your computer. Then type RUN. With any luck, you will get an Italic capital A on the printer: If nothing prints, it’s time to double-check your computer manual and cable connections.
instead of an Italic A, pay close attention to the next three paragraphs. The original ASCII code was designed to use the decimal numbers zero through 127. Computer systems designers soon decided to extend this range (to 0 through in order to make room for more features. 255) Unfortunately, some designers did not anticipate that printers would make use of this extended range.
As more features are added to the printer, even the extended range of codes (0 - 255) is inadequate if only single-code CHR$ instructions can be used. Because of this, Epson has designed the FX printer’s logic to understand special sequences of control codes, the ESCape code sequences.
Here are two examples of ESCape code sequences: LPRINT CHR$(27)CHR$(71) LPRINT CHR$(27)CHR$(38)CHR$(@)CHR$(l)CHR$(3) To see how such sequences work, start a new program now by entering: 10 LPRINT CHR$(27)CHR$(52) 20 LPRINT "ITALIC CHARACTER SET" and RUNning it. When you can RUN a program, we show you the results that you should expect: ITALIC CHARACTER SET Note: If you haven’t yet read the Preface, which includes “Conven-...
Change Commands After you have sent commands to the printer, you will often want to change them, either to turn off one or more modes, or to erase text. To understand what happens when you use one of the several FX methods of making changes, you need to know about two special aspects of the printer, defaults and the printer buffer.
Reset Code You could turn off the Italic Mode by turning the printer off, then back on. Although turning the printer off resets the printer to its defaults, which include Roman Mode, cycling the printer off and on may disrupt computer/printer communications. FX printers have a Reset Code to avoid that: ESCape CHR$(64).
ITALIC CHARACTER SET BACK 'TO ROMAN WITH ITALIC OFF Notice that CHR$(53) turned Italic off and the semicolon at the end of line 30 eliminated the blank line between the two lines of text. DELete and CANcel But suppose you don’t want much power.
of line is the number 4, and the symbol for the of line 30 is the number 5, so enter the following: 10 LPRINT CHR$(27) “4” LPRINT CHR$(27)"5"; Now use RUN to make sure that both ESCape sequences work as before.
See the Preface for a list of the conventions used in this manual, Appendix A for a table of the ASCII codes, and Appendixes B and C for tables of the control codes. Appendix F offers programming solu- tions to interfacing problems, while Appendix E lists the defaults and shows the DIP switch settings.
Chapter 3 Print Pitches One of the big advantages an FX printer has over a daisy-wheel printer or a typewriter is the ability it gives you to choose from a variety of widths, or pitches, for your characters. To use this feature well, it’s important to understand just how an FX prints.
Figure shows one each of lower- and uppercase letters. The p gives an example of the way a few lowercase letters use the bottom two rows of the matrix. All numbers, uppercase letters, and most symbols are formed within the top seven rows of the matrix. Main columns The construction of the print head restricts the maximum height of any character to nine dots.
Intermediate positions FX characters are designed to be five or fewer columns wide. Leav- ing the sixth column blank allows for space between letters. Figure 3-3 shows the 6 main columns, numbered etc. 1, 3, 5, Figure 3-3. Main columns Because the use of 5 dots does not give quite enough detail for the highest quality characters, an FX prints some dots half way between the main columns in the 6-dot-wide matrix.
If you look through Appendix A, you’ll notice that none of the FX’s characters use dots in consecutive main and intermediate columns in the same row. There is a reason for this: the printer’s speed. The FX recalls a character’s dot-matrix pattern from ROM and prints it in 1/160th of a second.
Figure 3-5. Pica and Elite letters 30 LPRINT CHR$(27)"P"; 40 LPRINT PICA PITCH THE NORMAL PRINT W I D T H " When you RUN it, you should get: Figure 3-6. Pitch comparison blank spaces in line 20 above print as Elite spaces;...
20 LPRINT CHR$(15)"COMPRESSED MODE IS SET WITH CHR$(15)" LPRINT "IT WILL STAY ON UNTIL YOU CANCEL IT" LPRINT CHR$(l8)"PICA AGAIN" COMPRESSED MODE IS SET WITH CHR$(15) IT WILL STAY ON UNTIL YOU CANCEL IT P I C A A G A I N Notice that we had you use only CHR$(l5) to turn Compressed Mode on-that is, we didn’t have you type in an ESCape code first.
DIP switch 1-1 on. This adjustment will make the printer reset to Compressed Mode, after which you can switch to other modes as needed. You could get Pica Mode with control codes, for instance, by using the Compressed shut-off code: CHR$(18). Then you could return to Compressed with either of the usual commands-CHR$(15) or ESCape"...
Don’t take this lesson lightly-it is a good example of how print modes interact on FX printers. Pitch Mode Combinations The previous three modes can’t be mixed, but the next mode can be used in combination with any one of them. And you can add it to a printout for either of two durations, for one print line or for a longer passage.
LPRINT "CONTINUOUSLY WITH ESCAPE W" 50 LPRINT CHR$(27)"W"CHR$(0) The printer extends the dot matrix by spreading the dots horizontally to twice their normal distances apart, and then it adds a duplicate of each dot to the next main dot column (see Figure 3-7).
CHR$(l) can use an alternative form for this pair. For continuous Expanded, and for the other modes which use CHR$(l) and CHR$(0) as a toggle switch, you can use an abbreviation. Here, for example, you can use: LPRINT CHR$(27)"W"CHR$(l) or you can use: LPRINT CHR$(27)"Wl"...
E X P A N D E D , Y O U C A N M I X : P I C A EXPANDED, EXPANDED COMPRESSED AND ELITE CHARACTERS ON THE SAME LINE. By deleting the semicolon at the end of line 10 and adding a semicolon to the end of line 30, you can mix all six print pitches on a single print line.
Table 3-1. Summary of print pitches Here is the DIP switch that we mentioned in this chapter: Switch 1-1 Allows you to change the pitch default from Pica to Compressed Here is a list of the commands that we introduced in this chapter, listed in the order of their appearance: Turns Elite Mode ON CHRS(27) “M”...
Chapter 4 Print Quality In the last chapter you learned how to change the width of the printed characters to achieve six different print pitches. The FX printer also offers several modes that improve print quality without affecting pitch. The three new modes that we discuss in this chapter are Double-Strike, Emphasized, and Proportional.
The way Double-Strike gets this result is rather clever: the FX prints each character in the regular fashion until it reaches either the end of the line or the point at which you have Double-Strike turn off. Then the FX shifts the paper up slightly and prints the Double-Strike pas- sage again.
DOUBLE-STRIKE PRINT DARKER THAN SINGLE-STRIKE EMPHASIZED ADDS A TOUCH OF CLASS That’s right, Emphasized is very similar to Expanded print, except that Expanded Mode prints a duplicate set of dots a full (rather than a half) column to the right of the initial set. Figure 4-2 shows Expanded and Emphasized characters.
Emphasized Mode (line 30) stays on until you shut it off. Double- Strike comes on (line 40) before Emphasized is turned off. You see the result above. Proportional Mode Have you ever wondered why most computer printouts don’t look as good as typeset books, even when you use bold characters? It’s because most dot-matrix printers use a uniform width for each charac- ter (monospacing) whereas typesetting machines set the width for each character proportional to its size.
Since all Proportional characters are Emphasized, it makes sense that Proportional characters, like Emphasized, can only be printed in Pica pitch, not Elite nor Compressed. In addition, Proportional Mode cannot be mixed with Double-Strike. The cost of all this high-powered printing is the slower speed of printing and the wear and tear on the ribbon.
the printer will prove that Double-Strike has been turned on all the time. Add lines 30 and 50, and make some changes to line 70: 30 LPRINT CHR$(27)"G"; 50 LPRINT "WHEN PROPORTIONAL GOES" 70 LPRINT "!!!!!!!!!!!!OFF, DOUBLE-STRIKE CAN COME ON" Even though Proportional Mode will not permit Double-Strike to affect lines 40 and 50 (since Proprotional Mode has priority), Double- Strike does take hold as soon as Proportional is shut off.
sized, strips excess space from between characters. Double-Strike can be combined with all other modes except Proportional, whereas Emphasized, and thus Proportional, cannot be combined with either Elite or Compressed. Mode combinations are governed by the FX’s priority list. This list determines which mode gets printed when two or more conflicting modes are active at the same time.
Chapter 5 Dress-Up Modes and Master Select In the first three subsections of this chapter, we cover four more print modes: Underline; two Script Modes-Superscript and Sub- script; and Italic. Each of these modes allows you to add a particular finishing touch to your printouts.
You can turn Underline Mode off with: CHR$(27)"-"CHR$(0) or CHR$(27)"-0" Enter and RUN this program to see what FX underlining looks like: 20 LPRINT CHR$(27)"-1UNDERLINING IS SIMPLE"; LPRINT CHR$(27)"-0 TO TURN ON/OFF" You can underline virtually anything you want-even a series of blank spaces.
The FX-80, on the other hand, can perform a reverse line feed, and it uses this capability to place the underline one row lower than any text dot. To do this, the FX-80 prints the text to be underlined, moves the print head down the paper one row’s worth to print the underline, then moves the print head back up to the original text line.
Notice that ESCape “T” turns either kind of Script Mode off and also that both versions of Script Mode are automatically printed in Double-Strike. Since Double-Strike prints at half speed, so do the Script Modes. And since Double-Strike can’t mix with Proportional, neither can either type of Script.
Whether your computer system is one of these or not, with ESCape “4” you can print Italic characters. Prove it by adding these lines to your program: 10 LPRINT CHR$(27) “4” 70 LPRINT CHR$(27)"@" When you want to turn off only the Italic Mode, you use ESCape "5"...
Figure 5-1. Master Select Program If you want to see this in underlined Italic add the following line: 10 LPRINT CHR$(27)"-1"CHR$(27)"SO"CHR$(27)"4"; Now when you want to use Double-Strike Emphasized Expanded Pica, you do not have to type out the long sequence: LPRINT CHR$(27)"G"CHR$(27)"E"CHR$(27)"W1"...
Double-Strike, use LPRINT N/A indicates that the CHR!$(27)“!T”. two modes cannot be combined. Table 5-1. Master Select Quick Reference Chart WEIGHT Double Strike PITCH Single Strike Emphasized Double Strike Emphasized Pica Elite Compressed Expanded P i c a Expanded Elite E x p a n d e d Compressed If you rely on Master Select to change print modes, you don’t have...
Figure 5-3. Dress-up combinations Master Select base and then add the sequence(s) that you want to embellish it. Here is a program that does just that, several times. N=4: GOSUB 70: LPRINT CHR$(27)"S1THE FX"CHR$(27)"T" 20 N=17: GOSUB 70: LPRINT CHR$(27)"-1PRINTERS" 30 N=8: GOSUB 70: LPRINT CHR$(27)"-@HAVE EVER"...
Here are the commands that we introduced in this chapter. Turns Underline Mode ON CHR$(27)“-1” CHR$(27)“-0” Turns Underline OFF Turns Subscript Mode ON. Script characters CHR$(27)“Sl” print in Double-Strike and at half speed Turns Superscript ON CHR$(27)“S0” Turns either version of Script Mode OFF CHR$(27)“T”...
Chapter Special Printing Features In this chapter you’ll discover several new features that will enhance your control over the printer. Backspacing, for example, allows you to combine characters. You can use a set of software commands to switch in and out of international character sets, and you can control the speed of printing.
use the same technique to produce the plus-or-minus symbol: 10 LPRINT CHR$(27)"S0+"CHR$(8); Plus/minus 20 LPRINT CHR$(27)"S1-" 30 LPRINT CHR$(27)"@" How about that, and it only took three lines. Next try this approxi- mately equally short program: 10 LPRINT CHR$(126)CHR$(8); Approximately equal 20 LPRINT CHR$(27)"J"CHR$(ll)CHR$(126) CHR$(27)"@"...
The 17 backspaces (line are printed in Compressed Mode. The difference in character widths makes the second printing of the word BACKSPACES be offset from the first. In the next program, the offset is a little more dramatic. Change the following lines: 30 LPRINT "BACKSPACE"CHR$(l5);...
Figure 6-1. Bidirectional line Look carefully at your printout or at the version we show as Figure 6-1. See how the line seems to quiver? Now turn on Unidirectional printing to see how much difference it makes. Add line 10 and RUN the program again: 10 LPRINT CHR$(27)"Ul"...
line feed, which means that the subsequent movement of the print head will be from the left margin to right. To see this in action, delete line and change line 40 to read: FOR X=1 TO 10: LPRINT CHR$(27)"<"CHR$(124): NEXT X When you RUN it, you can watch the print head move to its leftmost position after it prints each line.
that are used in different countries. These international characters can be accessed with: LPRINT CHR$(27)"R"CHR$(n); where n is a number from zero to eight. The ESCape “R” sequence selects one of these nine countries: United Kingdom Italy France Denmark Spain Germany 5 Sweden Japan...
Table 6-2. International characters in Roman typeface This program provides an easy reference to the international charac- ters; you’ll probably want to keep the printout handy. You can also print international characters in Italic Mode. Change these two lines: 80 READ C$: LPRINT C$CHR$(l37)CHR$(l4)CHR$(27)"4"; 100 NEXT X: LPRINT CHR$(27)"5": NEXT Y to get the result shown in Table 6-3: Table 6-3.
When could you use this program? Well, you can print . . . and if you want to use one of the foreign sets all the time, you can change your printer’s default. The factory setting of a default international character set-for the USA-is shown in line 1 of Table 6-4.
either of these capabilites on and off, as a mode, with an ESCape sequence. Half-Speed Mode The FX can print at the fine rate of 160 characters per second (cps). But it will also print more slowly if you want it to: the Half-Speed Mode prints at cps.
and print the contents of the buffer, press RETURN alone. Now add this line: 10 LPRINT CHR$(27)"i1" And RUN the program. Your FX-80 responds to your typing-imme- diately. When you are finished, press RETURN alone, then use the zero version of the command to return to full speed. Summary You can use the Backspace Mode to overstrike one or more charac- ters.
Turns Half-Speed ON; If your system can’t CHR$(27)“sl” send lowercase letters, use CHR$(115) CHR$(1) Turns Half-Speed OFF CHR$(27) “s0” For the FX-80 only, turns Immediate-Print CHR$(27)"i1" Mode ON. If your system can’t send lower- case letters, use CHR$(105)CHR$(l). Turns Immediate-Print Mode OFF CHR$(27)“i0”...
Chapter 7 Line Spacing and Line Feeds Up to this point in the manual, we have not discussed the way the printer moves a page so that it doesn’t print lines of text right on top of each other. Now we do. In this chapter you will learn how to change the distance that the paper moves;...
Your first STEPS print in 12-dot spacing. Now tighten up the line spacing by adding lines 10 and 50: 10 LPRINT CHR$(27)"@" 50 LPRINT CHR$(27)"2" The CHR$(27)“0” of line 10 changes the usual 12-dot (l/6-inch) line spacing to a handy variation: 9-dot (l/B-inch) spacing. Nine-dot spac- ing is especially useful in the 9-pin Graphics Mode that we introduce in Chapter 11.
To show what varying n can mean, the following program increases the line spacing by one dot’s worth on each line feed: FOR X=8 TO 24 30 LPRINT TAB(X)"STAIR"CHR$(27)"A"CHR$(X+128) STEPS" 40 NEXT X 50 LPRINT CHR$(27)"2" Figure 7-2. Cascading STAIR STEPS Figure 7-2 shows that the loop in line 20 and the ESCape “A”...
The ESCape”A”CHR$(n command sets the line spacing to n/72- inch if the n is any number from 0 through 85. If n is between 85 and 128, the line spacing is 85/72-inch. At 128 the sequence starts again, with 128 giving the same result as 0, 129 the same as 1, and so on. Therefore, the X+128 in line 30 produces a change in line spacing from 0 to 24/72-inch.
Microscopic line spacing There is also a way to space at smaller intervals than 72nds. Using a CHR$(27)“3” will set the spacing to increments of 216th of an inch; l/216-inch is one-third the distance between the pins of the print head (center to center).
One-time, immediate line feed The FX has a special line feed that executes a new size of line feed once, then reverts back to the size of the previous line feed. And that’s not all-it is executed immediately rather than at the end of the print line as all the other line spacing commands are.
print the two lines of text and then move the print head up the page to print the line of hyphens above the first line. l0 LPRINT "REVERSE FEED" 20 LPRINT LPRINT "ARE YOU WATCHING?" 40 LPRINT CHR$(27)"j"CHR$(140); LPRINT “________________1’ If your system cannot send lowercase letters to the FX, use the numeric equivalent of ”...
Chapter 8 Forms Control The FX has several features that make it easy for you to print on any size of page and to determine where on the page the printing will appear. Because they are needed most often for creating forms or for printing on pre-printed forms, these features are called forms control.
first tell the printer where the top of form is. In most cases you’ll want the printer to use the first line below the paper perforation as the top- of-form line. To get this result, turn the printer off and feed the paper through (using the manual-feed knob) until a perforation lines up with the top of the ribbon (see Figure 8-1 or consult Chapter 1).
sends the paper to the top of the next form. It gives the CHR$(12) same result as the FF button so long as you end the line with a semi- colon to prevent BASIC from adding a line feed to the LPRINT line. Not-so-standard forms The printer’s default length for a form feed is inches.
Figure 8-2. Two-inch form feed Check it by changing your program lines as shown below and RUN- ning the program again; see if your printout matches Figure 8-3. 10 LPRINT CHR$(27)"C"CHR$(2); LPRINT "TWO-LINE FORM"CHR$(12); Figure 8-3. Two-line form feed...
Why does the printer give you two options? In some cases, setting the form length by inches is more convenient. If you know how many inches long the form should be, the printer will calculate the correct setting for you, regardless of the current line spacing. On the other hand, setting the form length by number of lines is the only way you can set extremely long form lengths.
For standard 11-inch forms, just position the paper correctly before turning on the printer; for other form lengths, use the CHR$(27)“C” command. It’s time to try this out. Make sure the perforation is even with the top of the ribbon (as in Figure reset the printer, then type: 8-1), 10 LPRINT CHR$(27)"N"CHR$(6);...
When you use the skip-over-perforation command, you may want to change your top of form. No matter what number you use as a skip-over-perforation setting, the printer skips that many blank lines from the last text line to the new top of form. In other words, when you set your top of form the usual way, you will have all of your blank space at the bottom of each page.
If you use single-sheet paper on your FX printer and run to the end of the form, the paper-out sensor prevents the printer from acciden- tally printing on the platen. The sensor automatically sounds the beeper and shuts down the printing until you load another sheet and continue.
off, either by changing DIP switches or by sending the printer ASCII codes as summarized below. When on; activates the beeper; when off, Switch 2-2 deactivates it When off, makes the paper-out sensor active; Switch 1-3 when on, deactivates it When off, turns the skip-over-perforation Switch 2-3 feature OFF;...
Chapter 9 Margins and Tabs At power-up, your FX contains specific default settings for margins and for horizontal and vertical tabs. You can make changes to any of these. Since it is best to change margins before tabs, we discuss mar- gins first, then three aspects each of horizontal and vertical tabs.
Try out the left margin command with: 10 LPRINT "LEFT MARGIN" 20 LPRINT CHR$(27)"1"CHR$(10) 30 LPRINT "LEFT MARGIN SET AT 10" 40 LPRINT Figure 9-1. Left margin setting As Figure shows, line prints at the default (zero) left margin, and line 30 makes the new left margin start spaces to the right of the default.
Figure 9-2. Listing at new margin and then switch to Compressed, the left margin stays the same dis- tance from the edge of the paper. To see an example, type: LPRINT CHR$ ( and then your computer’s print listing command. Figure shows the page with this addition.
The text prints in Compressed Mode, but the left margin is still set at 10 Pica spaces. Right margin The general format for the right margin is: CHR$(27)"Q"CHR$(n) For the n can range from in Pica, in Elite, and FX-80, in Compressed Mode.
Figure 9-4 shows the new listing, which did not print out at the posi- tion you specified. What happened? Well, the CHR$(18) turned off Compressed Mode, but there was no change in the margin because the new right margin setting would have occurred on the wrong side of the current left margin (which is still set at 10).
Both margins Notice that the left and right margin commands use different num- bering systems. In Pica Mode the left margin command counts from 0 to 79 while the right margin command counts from to 80. Keep this difference in mind when you use the two commands together. Another difference between the two margin commands is that the minimum left margin setting is 0, regardless of pitch, but the mini- mum right margin is the value of the left margin setting plus 2 in Pica,...
Horizontal tab usage The FX has the ability to tab horizontally, and it has default tabs set in the current pitch at columns 8, 16, . . . every eight Pica 24, 32, spaces on out to the current width of the page. We will show you how to change the tabs to suit your needs more closely, but first let’s see how the printer’s tabs work.
Note that many BASIC handle numbers differently from strings. This difference is most evident when you are printing columns that contain mixtures of numbers and strings: many BASIC automati- cally add spaces both before and after each number. You may have to make adjustments if you want to have a column of numbers line up.
Variable horizontal tabs You can change the default horizontal tab settings by specifying new tab stops. To do this, use the format: CHR$(27)"D"CHR$(n,) . . . CHR$(n ,)CHR$(O) where n, and n stand for the first and last of a series of new tab stops, and the CHR$(O) inf orms the printer that you are through setting tabs.
For the FX-100 this is: 135 in Pica, 162 in Elite, and 232 in Compressed. Don’t forget that resetting the margins automatically returns the tabs to their default settings. Set margins before tabs. Tabs are set in the currently active pitch, and subsequent changes in pitch do not affect the tab positions.
the default vertical tabs, which are set for every other line, or you can set tabs in one of two ways, in a single set or, for forms, in up to sets, called channels. Ordinary vertical tabs Most often you probably will only need one series of vertical tabs. You set them with ESCape “B”...
Figure Ordinary vertical tabs 9-10. Once you have tabbed to a stop, you can print more than one line of text at that position. See this by changing line and adding the three lines shown below to your current program. If you enter the number of spaces that we have indicated with M , the entries will line up neatly.
Figure Text at tab stop 9-11. Just as for horizontal tabs, vertical tab settings are absolute: they do not change when you change the size of a space. For example, suppose you want to add to this form a graphics logo that uses special line spacing.
uses the Reset Code to return the FX to 12-dot spacing. RUNning this program produces a printout to match Figure 9-12. Figure 9-12. Absolute vertical tabs Be sure to delete line 25 after you’ve seen its effect. Vertical tab channels Vertical tab channels are especially helpful in two situations.
You can store up to eight channels of tab stops, numbered from 0 to 7. You use a format that is similar to the one for a single set: CHR$(27)"b"CHR$(N)CHRR$(n ) . . . CHR$(n )CHR$(0) where N stands for a reference number between zero and seven under which this channel will be stored.
Figure 9-13. Printout of multipage channels Summary The FX gives you the ability to set margins and to use default, regu- lated and variable tabs; you can set tabs in either the horizontal or vertical direction. The default horizontal tabs occur in Pica, regardless of the current pitch.
CHR$(27)“1”CHR$(n) Sets the left margin to n. (If you can’t use low- ercase letters, use CHR$(l08) in place of “1” .) Limits are 0 - 78 in Pica, 0 - 93 in Elite, and 0 - 133 in Compressed CHR$(27)“Q”CHR$(n) Sets the right margin to n. Limits are 2 - 80 in Pica, 3 - 96 in Elite, and 4 - 137 in Compressed CHR$(9) or CHR$(137)Moves the print head to the next horizontal tab.
Chapter Introduction to Dot Graphics Welcome to the world of Epson graphics. To get you off to a solid start, we use this chapter to discuss all the fundamentals of dot graphics, from the number of dots per page to the way to position one dot, before we show you several patterns that you can print by using one dot at a time.
A final multiplication: main columns rows gives you a grand total of dot positions per FX-80 page. And 380,160 that doesn’t even take into account intermediate columns, the FX-100’s ability to print 136 Pica matrixes, or both models’ ability to use graphics density settings to increase the number of dots across the page and microscopic line spacing to increase the number of dots down the page.
Figure 10-1. Pins numbered sequentially Each time the print head makes a horizontal pass, it prints a pattern of dots. To print figures taller than 7 or 8 dots, the print head must make more than one sweep. If you use the 12-dot (default) line spac- ing, the print head will leave gaps between the graphics lines, just as it does between text lines.
Each pass of the print head contains one piece of the total pattern, which can be as tall or short as you desire. You don’t have to use the whole page or even an entire line for your graphics figures. In fact, you can reserve as little or as much space as you like for a figure-and position it anywhere on the page.
480. Later we’ll see that the FX does have Graphics Modes of greater density. Some systems, such as those for the IBM-PC and the Epson QX-10, also require WIDTH statements for longer lines. See your system doc- umentation.
Since computers use the binary numbering system (O and 1s only), it is most efficient for each pin to correspond to the decimal equivalent of one bit in an &bit binary number: 1, 2, 4, 8, 16, etc. (see Figure 10-3).
Figure 10-4. Pin combinations Now that you know the labels for the pins, how would you fire the top pin? Why, by sending LPRINT of course. And how about CHR$(128), the bottom graphics pin? That’s right, LPRINT CHR$(l). If you wanted to fire only the top and bottom pins, you’d simply add 128 and one, then send By adding the appropriate...
In the programs that follow (except the first), we shorten the process of specifying pins by using the fact that their labels represent powers of two. (Refer back to Figure 10-3 to refresh your memory about the relationship of ordinal numbers to powers of two and the exponential labels for the pins.) We use the caret (^) to represent exponentiation;...
Line 40 completes the loop. Line doesn’t print anything-it just forces a carriage return at the end of the print line, overriding the semicolon of line 30. Forcing the carriage return is not really necessary since the line is the last one of this program.
110 LPRINT CHR$(2^N); 120 NEXT X: RETURN On the first pass of the loop (line SO), N equals X and the exponents increase in order from 0 to 6. The second time the routine is called, N equals 6 minus X, which reverses the order (from 6 down to 0). The flag F of line 50 activates the change of direction, and line 90 reflects the value for the exponent.
a big difference the line spacing makes? All of the See what multiple-line graphics programs in this manual use this line spacing. Diamond pattern In this next and final version of the program, you exercise even more control over the slashes. This program varies not only their direction, but also their sizes (length and height) on the print line.
Summary Mode with the C H R $ ( 2 7 ) “ K ” You enter Graphics CHR$(n ) CHR$(n ) command. You determine the number of graphics columns by filling the two reservation slots, n and n . You fire your pin patterns by adding up the pin labels, which consist of powers of two.
Chapter Varieties of Graphics Density We introduced you to FX graphics by having you use Single- Density Graphics Mode and a single pin per column. In this chapter we cover six more graphics densities and provide examples of designs that use pin combinations. We also offer you several tips for program- ming graphics.
Graphics and the Reset Code You may have wondered about the semicolon we had you place after the B$ in line If this line were text rather than graphics data, this semicolon would cause the text and the Reset Code in line to be placed in the same text buffer and (CHR$(27)“@“)
for form feed-CHR$(12)-to the printer, the computer system inter- cepts it and sends instead a series of line feeds-CHR$(10). It does this whether the CHR$ commands represent true commands, parameters for commands, or data. It screens out all instances of its reserved numbers.
SINGLE-DENSITY GRAPHICS The printer fires pins 1, 3, 5, and 7 (with the respective exponential values of 1, 4, 16, and 64) in the first column and pins 2, and 6 (exponential values in the second. And it alternates that 2, 8, sequence for 50 columns-50 columns in Single-Density.
Pattern (Overlapping dots) In double-density mode Prints as at High Speed Figure 11-1. High-Speed Double-Density dots To check this out, change the pin patterns in line 30 from 85 to 127, the sum of the labels for pins 1 through 7: B$=CHR$(127)+CHR$(42) As Figure 11-2 shows, the repeated dots, the ones called for by the CHR$(42)-pins 2, 4, and 6-are not printed at all.
Low-Speed Double-Density Graphics Mode Ah, but the FX has a special print mode to take care of this very problem. It’s called the Low-Speed Double-Density Graphics Mode. Change the 2 of line 20 to a and change the text in line 50 once more: 20 A$=CHR$(27)+"*"+CHR$(l)+CHR$(50)+CHR$(0) 50 LPRINT "PLOW-SPEED DOUBLE-DENSITY GRAPHICS ";...
Quadruple-Density Graphics Mode The FX also gives you the ability to print dots four times as densely as in Single-Density. Change the 1 line 20 to a 3 and lines 30 and 50 to read: 20 A$=CHR$(27)+"*"+CHR$(3)+CHR$(50)+CHR$(0) 30 B$=CHR$(85)+CHR$(42) LPRINT " QUADRUPLE-DENSITY GRAPHICS "; QUADRUPLE-DENSITY GRAPHICS In Quadruple-Density Graphics Mode, any FX can print 480 times 4...
M O D E # 0 M O D E # 1 M O D E # 2 M O D E # 3 M O D E # 4 M O D E # 5 M O D E # 6 Figure 11-4.
Quadruple 1920 dots per 8” line; 3264 dots per 13.6”line The printer does not print consecutive dots in any one row. Epson none Matches the screen density of the QX-10: QX-10 80 dots per inch; 640 dots per 8” iine;...
A third type of use occurs when you want to use a program devel- oped for a different model of Epson printer. Suppose you have a pro- gram for circles written for an MX that uses Double-Density-the “L”...
First byte Second byte Figure Nine-pin usage 11-5. (Use CHR$(94) if you can’t generate the caret symbol (^) from your system.) The d determines the density of the graphics: d set to 0 produces Single-Density; d set to produces Double-Density. In this format, n and n represent the usual width settings, but each...
Firing 9 pins with 8 data lines is just a shade more difficult than firing 7 or 8 pins. It takes 2 bytes to define each 9-dot pin pattern: the first byte determines the pattern of the top 8 pins in the usual way and only the top bit of the second byte is used.
READ N 90 DATA 3,7,31,63,126,124,112,96,92,66,33,25,5,3 Line 50 reads the first data number into the variable N. To read the rest of the numbers, line must be executed in a loop. Add these lines to the program: 20 A$=CHR$(27)+"K"+CHR$(14)+CHR$(0) 30 LPRINT A$; Figure 11-7.
like this one, you can just get the program to reread one set of data by using a RESTORE statement. To see this, change two lines and then RUN the program: 30 FOR Y=l TO 10: RESTORE: LPRINT A$; 70 NEXT X: NEXT Y Although the new loop in line 30 repeats the pattern times, you don’t need...
80 LPRINT CHR$(27)"@": END DATA 8,28,62,93,-6,28,93,62,28,8 100 READ R: FOR J=l TO -N 110 LPRINT CHR$(R);: NEXT J X=X-N-1: GOT0 70 RUN it again. Same arrow pattern, right? And with less data. The number of repetitions (6) is entered into the DATA line as a negative number that is followed by the pattern (28) to be repeated.
CHR$(27)“L”CHR$(n )CHR$(n Enters Low-Speed Double-Density Graphics Mode and specifies the width setting. Width + (256*n ), where n is 0 - 255 and n 0 - 7 CHR$(27)“Z”CHR!$(n )CHR$(n Enters Quadruple-Speed Graphics Mode and specifies the width setting. Width = where n is 0 - 255 and n is 0 -...
Chapter 12 Design Your Own Graphics In this chapter we take you through the development of two graphics programs, from design to implementation. The two pro- grams use entirely different techniques. The first program uses a method of storing and recalling data similar to that of the curling pro- gram in the last chapter.
2. Translate the dots into their appropriate pin numbers, seven or eight rows (depending on your computer system’s capability) at a time. 3. Figure out the easiest way to send those numbers to the printer. Once you get the hang of it, the whole process is easy. It does require some patience, but sometimes, when regular patterns form your designs, you can use the computer to do most of the tedious work.
Figure 12-1. STRATA layout In most cases the program reads a number greater than or equal to zero and sends it to the printer (line 620). Control then returns to line 610, which reads the next number. If N is negative, the program bypasses the LPRINT in line 620 and goes on to line 630.
There’s only one thing left to do before you can print the first line- enter a Graphics Mode: 600 LPRINT CHR$(27)"L"CHR$(60)CHR$(0); Now RUN the program. That’s a good start. To complete the program, add 7-dot line spacing, a loop to process the last five lines of data, and the data lines: 100 LPRINT CHR$(27)"1"...
l00 LPRINT CHR$(27)"1" FOR K=l TO 6 600 LPRINT CHR$(27)"L"CHR$(60)CHR$(0); READ N: IF N=128 THEN 650 620 IF N>=0 THEN LPRINT CHR$(N);: GOT0 610 READ P,R: FOR J=l TO -N: LPRINT CHR$(P)CHR$(R);: NEXT J GOT0 610 650 LPRINT: NEXT K: LPRINT CHR$(27)"@": END 799 ' <<<...
A very few pin patterns are needed for this program. In fact, each “pattern” consists of only one pin, making the numbers easy to calculate: for the low pin for the high pin 1, 2, 8, 16, 32, 64 for the diagonal rise for the diagonal fall 32, 16, 8, 4, 2, 1 As you will see in the next few pages, these pin patterns are coded...
170 FOR Y=l TO 819: LPRINT CHR$(l);: NEXT Y 180 LPRINT: NEXT X: RETURN Now RUN the first trial: Line 20 stores the graphics entry string in G$. This produces Low- Speed Double-Density dots for columns [ Line 51+ (3x256) 819].
If L is read as zero, line 70 causes the program to ignore line 80. This enables the printer to print the center portion of the X, where the diagonal fall meets the diagonal rise at a point and no low section is required.
290 DATA 3,3,25,3,0,3,25,3,12,3,2,3,12,3,3,-1 300 DATA 3,3,24,3,2,3,24,3,12,3,2,3,12,3,3,-1 310 DATA 3,3,23,3,4,3,23,3,12,3,2,3,1&3,3,-1 320 DATA 3,3,22,3,6,3,22,3,12,3,2,3,12,3,3,-1 330 DATA 3,3,21,3,8,3,21,5,8,5,2,5,8,5,3,-1 340 DATA 3,3,20,3,10,3,21,18,4,18,4,-1 350 DATA 3,3,19,3,12,3,22,14,8,14,6,-1 Yes, indeed, high-resolution graphics does require a large amount of data. Okay, now RUN the program: Figure 12-S. FX-80 figure Success! In your printout (which should look like Figure 12-5), you see the 3D effect of the letters? The modifications to follow will...
100 LPRINT CHR$(l)CHR$(2)CHR$(4)CHR$(8)CHR$(l6) CHR$(32)CHR$(64); 110 FOR X=1 TO H: LPRINT CHR$(64);: NEXT X 120 LPRINT CHR$(64)CHR$(32)CHR$(16)CRR$(8)CHR$(4) CHR$(2)CHR$(l); 130 GOT0 50 140 NEXT D: GOSUB 160 150 LPRINT CHR$(27)"@": END 160 FOR X=1 TO 3: LPRINT G$; 170 FOR Y=l TO 819: LPRINT CHR$(l);: NEXT Y 180 LPRINT: NEXT X: RETURN 190 DATA 3,20,2,3,12,3,22,14,8,14,6,-1 200 DATA 3,20,3,3,10,3,21,18,4,18,4,-1...
These changes fill in the diagonals as illustrated in Figure 12-9: 100 LPRINT CHR$(l)CHR$(3)CHR$(7)CHR$(l5) CHR$(31)CHR$(63)CHR$(127); 120 LPRINT CHR$(127)CHR$(63)CHR$(31)CHR$(l5) CHR$(7)CHR$(3)CHR$(l); Figure More distinct version 12-9. And one additional change fills in the entire text (Figure 12-10): 110 FOR X=1 TO H: LPRINT CHR$(127);: NEXT X Can you vary the program to produce a complete black/white reverse like the one in Figure 12-11?
Chapter 13 Plotter Graphics As you work with dot graphics, you may run into printer limita- tions because dot-matrix printers are designed primarily for fast print- ing of text. The FX, however, can also print high-resolution graphics, as you saw in the STRATA program. But the side-to-side motion of a dot-matrix printer makes it virtually impossible to place the print head in the middle of a page and trace out a lazy spiral or even a circle.
Figure Computer memory as sketch pad 13-1. holes or cells arranged in rows and columns, as Post Office boxes are. Each cell of the array corresponds to a dot position on the paper (Fig- 13-2). Figure Array in memory and on paper 13-2.
Figure Ones and zeros become dots and blanks 13-3. Why all this fuss and stew about arrays? We want to show you that the FX can simulate a plotter. And once the correspondence between array cells and dot positions is firmly established, you can easily plot in any direction.
DIMension and arrays Most BASIC allow you to use up to 10 rows and 10 columns in an array without any special preparation of the computer’s memory. Since arrays use up lots of memory, you must inform the system if you intend to use a larger array.
Figure Plotting a circle 13-5. Circle Plotting You can have your program examine the cells of an array in any order; the following program scans them row by row, using two loops: 20 FOR R=l TO N: FOR C=l TO N At each cell, line 30 calculates the cell’s distance from a center point by using the distance formula: D=SQR((R-11)^2+(C-11>^2)
The final step to plotting a circle in an array is to close the loops and display the contents of the array. Add these three lines to your program: LPRINT A(R,C);: NEXT C: LPRINT PRINT "ROW";R: NEXT R 170 LPRINT CHR$(27)"@": END and RUN it.
The next line loads the beginning (B), ending (E), and step (S) values for the loop that will read and print the array. 100 B=l: E=N-6: S=l We have you use variables here so that you can change them later. That way you can make your program read the array in a number of directions.
encounters a one, it adds the appropriate power of two to F (line 190). The exponent is the difference between the current row (R) and the last row in this pass of the print head (P+6*S). Line 220 sends F to the printer as a graphics pin pattern.
below picks off any potential problem codes and changes them to less dangerous numbers. 210 IF F>8 AND F<14 THEN F=F-5 This line takes any number between 8 and and subtracts 5 from it, putting it out of the trouble range. Adjust this test to fit your system. You may see another problem with the figure.
drastic measures. One such measure would be to let each bit of the numbers stored in the array cells represent one graphics dot. This would increase the storage ability but tremendously complicate the programming. For symmetric designs such as the circle, you can use a different measure.
Reflections Once the desired image is stored in the array you can rotate and reflect it in several different directions. It’s all done with mirrors; at least, it looks like mirror reflections when you are done. You create the mirror effect by reading the array in different directions. Currently your program reads the array from left to right, seven rows at a time, but it is just as easy to read it in the reverse order.
100 IF Z=2 THEN B=l: E=N-6: S=l 110 FOR P=B TO E STEP 7*S 120 PRINT "LOADING ROWS";P;"TO"; P+6*S 130 LPRINT CHR$(27) "*"CHR$(5)CHR$(2*N)CHR$(0); 140 FOR C=N TO 1 STEP -1: GOSUB 180: NEXT C 150 FOR C=l TO N: GOSUB 180: NEXT C 160 LPRINT: NEXT P: NEXT Z 170 LPRINT CHR$(27)"@": END 180 F=0: FOR R=P TO P+6*S STEP S...
This adjustment makes it easier to compare the distance value with the value of the RND function (line 40, below). Once the computer knows the distance of each cell from the upper- left corner, it can use the following test to determine which cells receive and which cells continue to contain 0s.
70 LPRINT CHR$(27)"3"CHR$(20);CHR$(7); B=N: E=7: S=-1 FOR Z=l TO 2 100 IF Z=2 THEN B=l: E=N-6: S=l 110 FOR P=B TO E STEP 7*S P+6*S 120 PRINT "LOADING ROWS";P;"TO"; 130 LPRINT CHR$(27)"*"CHR$(0)CHR$(2*N)CHR$(0); 140 FOR C=N TO 1 STEP -1: GOSUB 180: NEXT C 150 FOR C=l TO N: GOSUB 180: NEXT C 160 LPRINT: NEXT P: NEXT Z 170 LPRINT CHR$(27)"@": END...
is nearly all of the available memory on many personal computers. You are, therefore, not able to print significantly larger figures of this type with such computers. If you like the effect that is produced by this use of random numbers but would like a bigger printout without using more memory, there is a solution.
By changing the value of N to different multiples of seven, you can generate this pattern in different sizes. Just be prepared to let your computer cook for several hours. Summary We used this chapter to demonstrate the way you can use your FX as though it were a plotter.
Chapter 14 Symmetrical Graphics Patterns In this chapter we continue to explore the generation of graphics patterns in memory. As in the last chapter, you will use ones and zeros in an array to generate pin patterns, but this time you will save mem- ory by using a one-dimensional array to print a two-dimensional figure.
SYMMETRY Table 14-1. Variables 90 IF N>MIN THEN 70 100 NEXT J: PRINT The J loop will Repeat four times (RE = 4). It has two subloops, each of which depends on the value of N. Each time through the first loop (lines 40 to 60), N increases by one-to the value of MAX.
Line in the L loop stores the ones and zeros in the array. The end of line 330 makes X alternate between zero and one. To print out the contents of the array at this point, type: 5 LPRINT CHR$(27)"Q"CHR$(44) 110 FOR K=l TO C: LPRINT A(K);: NEXT K: LPRINT..
Pin Pattern Calculation You will use the one-line array that you just created to generate a two-dimensional pattern. This technique results in a significant saving of memory compared to the method of generating an array that we used in the last chapter. Two patterns are used in each pass of the print head.
Graphics Width Settings The required graphics width is C, the size of the array. If, however, C is greater than the value n in the graphics entry string must 255, change from zero to one. With this in mind, add these three lines: 200 N1=C: N2=0 210 IF C>255 THEN Nl=C-256: N2=1 220 LPRINT CHR$(27)"*"CHR$(5)CHR$(Nl)CHR$(N2);...
Figure 14-4. Symmetric pattern 1 That’s enough to knock your eyes right out of their sockets! And all from a single one-dimensional array. that Variations The computer completely controls your symmetric pattern, dot for dot. Small changes in the program can affect the pattern in a big way. For example, try this simple change in line 300: FOR K=0 TO 0 And RUN the program again:...
Figure 14-5. Symmetric pattern 2 Here’s another interesting variation: 20 MAX=64: MIN=l: RE=l: N=1/2 N=N*2 70 N=N/2 Figure 74-6. Symmetric pattern 3 Quite a difference! Instead of adding and subtracting one from N, lines 40 and 70 now double and halve it. This geometric progression creates a very different pattern.
Also notice that, because the variable RE is set to one, this pattern repeats only once. Now’s the time to experiment with some of your own changes to the variables and loops. Summary In this chapter you used a single string of ones and zeros to create a two-dimensional figure.
Chapter 15 User-Defined Characters If you’ve studied the program examples in this manual, you are quite adept at printing both graphics and text with the FX. In this chapter we’re going to share the secrets of the ultimate in printer con- trol-defining your own characters.
Preparation DIP switch controls the use of the FX’s RAM buffer. You can use this RAM memory as a large text buffer to smooth printer/com- puter communications, or you can store in it a set of user-defined characters. Unfortunately, it can’t serve both purposes simultane- ously.
The semicolon is very important. The &” sequence expects CHR$(27) more data to follow (just as Graphics Mode does). The semicolon at the end of the line prevents an unwanted carriage-return code from disrupting the data. For each character to be defined (determined by c and c ), the printer expects 12 data numbers to follow.
To be consistent with the ROM characters, we use only rows. The character would normally go in the top 8 rows, but we shift all the dots down one row so that 7-bit systems can stay with the program. Also note that two adjacent dots cannot be printed in the row.
Attribute byte The attribute byte is the first of the 12 data numbers required to define any character. At print time it controls two aspects of the way the character is printed. First, it determines which 8 pins of the print head are used to print the character.
mined by the data numbers as columns 0 to 10, then in Proportional Mode the minimum and maximum starting and stopping columns will be 0 and 11. Why instead of l0? Column 11 is the maximum value because Proportional characters are always Emphasized; this makes each character wider by one intermediate column.
Note that the proportional print information is used only when the character is printed in Proportional Mode. Otherwise-the full range of columns 0 to 11 is used. Also note that if 7-bit system users set the high-order bit with CHR$(27)”>” before they use the CHR$(27)"&"...
RAM with: 180 LPRINT "EPSON" Oopsl Where is the rest of EPSON? All right, we confess-the only characters in the user-defined RAM are those you put there yourself. Characters that haven’t been defined print as blank spaces. So the...
RAM area is like a big blank chalk board waiting for you to fill it up. At this point, because you have only defined an E, that’s all you get from RAM. Downloading Command Wouldn’t it be nice if you could magically transport some of the ROM characters over to the RAM area so you wouldn’t have to switch back and forth or define an entire character set each time you use the RAM area? In plenty of applications you only need to define a...
Japanese character set (it has some 4000 symbols)? If you get carried away with user-defined characters, you may end up searching for more storage. Anticipating this need, Epson provides commands that will allow you to define and print certain control codes in the same way that you treat other characters.
Let’s use this command to see how the ROM control codes can print. Add: 2 LPRINT CHR$(27)"6" FOR X=128 TO 159: LPRINT CHR$(X);: NEXT X 6 LPRINT CHR$(27)"7" 8 STOP That’s where the international characters (Italic version) have been stored. So the CHR$(27)“6” command without the CHR$(27)“R” gives you access to the international characters.
And add: 0,121,0,73,0,73,0,73,0,79,0: ’ My S 1100 DATA 1110 DATA 0,127,0,65,0,65,0,65,0,127,0: ’ M The program now contains six DATA lines, but it uses only the first three. The three characters are stored in ASCII codes 1, 2, and 3 in RAM;...
Find 8 in the table; it is in the CHR$(93) row under the Spain heading. To print the character stored in to acti- 8, use CHR$(27)“R”CHR$(7) vate the Spanish character set, and print CHR$(93). Ole! This same technique can be used to access any of the normally unprintable con- trol codes.
1 2 3 4 5 6 7 8 S O F T W A R E If you find yourself defining characters in small groups, the same tech- nique can be used to store part of the CHR$(27) "&" command: Z$=CHR$(27)+"&"+CHR$(0) Z$ can be used to define each new string of characters with a simple command such as either of these:...
CHR$(27)“:“CHR$(n )CHR$(n )CHR$(n Downloads ROM characters into RAM. All three numbers are 0 CHR$(27)“6” Enables printing of codes 128 to 159 and 255 Disables printing of codes 128 to 159 and 255 CHR$(27)”7” CHR$(27)“I1” Enables printing of the codes 0 to 31 except those used as control codes.
Chapter 16 Combining User-Defined Characters In this chapter we’ll explore the technique of combining user- defined characters to make large letters and symbols. Large Letters: Double Wide We’ll start by placing two characters next to each other to form a double-width letter.
Very nice. Using two characters side by side provides a larger matrix and therefore gives more flexibility in character design. But there is one problem. When two user-defined characters are placed side by side, there is one intermediate column that, unless the first character is printed in Emphasized Mode, cannot contain any dots.
Large Letters: Double High Let’s stack two characters, one on top of the other, with these changes: 10 LPRINT CHR$(27)"l"CHR$(27)"Ul"; 100 LPRINT "A" 110 LPRINT "B" 2 0 0 D A T A 1 6 , 3 2 , 9 5 , 0 , 6 4 , 0 , 1 2 7 , 0 , 6 3 , 0 , 0 2 1 0 D A T A 1 4 , 0 , 1 2 3 , 0 , 3 , 0 , 1 2 3 , 0 1 1 2 7 , 0 , 1 5 Line 10 changes the lines spacing to 7-dot and turns on Unidirectional Mode for precise alignment of the two lines.
71 =G 199=G 231 =g Figure Double high and wide character 16-2. In order to define letters in groups of four, you’ll have to modify the definition process. Fortunately, the ASCII numbers that represent the four versions of each character have a consistent pattern. That pattern in shown in Table 16-1.
Table ASCII pattern 16-1. With this in mind, add these lines: READ L: PRINT CHR$(L) ' Print to screen 50 FOR Y=0 TO 1: FOR Z=0 TO 1: A=L+128*Y+32*Z and make these changes: LPRINT CHR$(27)"&"CHR$(0)CHR$(A)CHR$(A); 70 LPRINT CHR$(139); NEXT Z: NEXT Y Line 50 calculates the code (A), to be defined in line 60, by adding the appropriate amount to the base letter L.
characters in positions 6 and 7 of string A$, for example, MID$(A$,6,2) would be coded as A$(6,7). If your system uses this scheme, change line 140 to: 140 A=ASC(A$(X,X))+128*Y This program automatically prints all four parts of each letter. You type just a single letter;...
no space after the 0 and then press RETURN. The next prompt on the screen is: ENTER A MASTER PRINT MODE NUMBER For now, enter a 24. Remember, all codes from 0 to 255 produce a combination of print modes, but there are only 16 unique combina- tions.
190 ' SPACE 200 DATA 32 0,0,0,0,0,0,0,0,0,0,0 210 DATA DATA 0,0,0,0,0,0,0,0,0,0,0 DATA 0,0,0,0,0,0,0,0,0,0,0 DATA 0,0,0,0,0,0,0,0,0,0,0 ’ A 320 DATA 65 DATA 0,0,1,0,1,0,6,24,32,92,0 DATA 67,32,24,4,3,0,0,0,0,0,0 DATA 0,65,32,7,24,33,64,32,16,0,8 DATA 8,97,24,7,0,97,24,7,0,1,0 ’ M 380 DATA 77 DATA 0,64,0,127,0,32,16,7,8,0,4 DATA 4,0,8,7,16,32,0,127,0,64,0 DATA 0,1,0,127,0,1,0,127,0,1,0 DATA 0,1,0,127,0,1,0,127,0,1,0 ’...
positions. That includes Elite and Compressed Modes. For a compari- son of the three print pitches, RUN the program three more times and enter: MESSAGES, MESSAGES, MESSAGES, Figure 16-7. Messages in three pitches All three mode combinations include Double-Strike and Expanded print;...
Deleting line 20 ensures that the printer does not download the ROM characters. That makes your defined characters the only ones around-no funny stuff on the printer. Here is the data: 100 ' SIX 110 DATA 7,8,16,0,32,3,68,0,72,0,73 120 DATA 73,0,72,0,68,3,32,0,16,8,7 130 DATA 73,0,9,0,17,96,2,0,4,8,112 140 DATA 112,8,4,0,2,96,17,0,9,0,73 150 DATA 127,0,0,0,0,127,0,0,0,0,127...
210 ' Pattern 220 DATA "00012000, "01665620" 230 DATA "05055050","16634652" 240 DATA "45621663"," 250 DATA "04656630" , "00043000" Figure 16-9. Interlace Have fun creating your own designs with these characters. You may wish to SAVE the program before proceeding. Line Graphics The RX series printers have a set of line-graphics characters stored in ROM.
DATA ’ h 8,0,8,0,127,0,0,0,0,0,0: 980 DATA 8,0,8,0,127,0,8,0,8,0,8: 'i 990 DATA 8,0,8,0,8,0,80,8,0,8: 'j 1000 ’ k DATA 0,0,0,0,127,0,0,0,0,0,0: 1010 DATA 84,0,170,0,84,0,l70,0,84,0,170: ' 1 You can put the line-graphics characters to work like this: 100 LPRINT CHR$(27)"1" 170 LPRINT "ajjjjjjfjjjjjjjb" 175 LPRINT "k NAME k PHONE k" 180 LPRINT "gjjjjjjijjjjjjjh"...
Chapter 17 Business Applications In this chapter we turn our attention to business applications. First we program a sample barchart. Then we use designs from previous chapters to develop a program that puts the FX through its paces. The programs pull together many of the programming techniques that you’ve used in the course of this manual.
Barchart Figure 17-1. In line 130 the parameters for “&” specify that our 14 user-defined characters will be stored at positions (ASCII symbols ^ to k). Line 140 sets up a READ loop (Y) for the characters and sends the attribute byte--CHR$(139).
Since you will need to switch two features-line feeds and Empha- sized Mode-on and off within the program, you can store their com- mands as shorter strings: 50 B$=CHR$(27)+"E" 60 D$=CHR$(27)+"J"+CHR$(ll): C$=CHR$(27)+"F" If your system won’t send an change both instances to either 10 or 12.
330 LPRINT H$;H$;"d";: A$="j": GOSUB 800: LPRINT "c" LPRINT: LPRINT 340 LPRINT C$;H$;H$;H$;" JAN";H$;" FEB";H$;" MAR": LPRINT 390 LPRINT CHR$(27)"@": END Line 300 closes the P and M loops, prints the right-hand border, and sends control to either or 320. Line 310 prints the districts. Lines 320 through 340 print the bottom portion of the chart.
270 FOR M=l TO LPRINT H$; 280 FOR P=l TO 290 IF R>MAX(M,P) THEN LPRINT " ";ELSE LPRINT CHR$(93+P);" "; 300 NEXT P: NEXT M: LPRINT B$;H$;"k";C$;: IF F=0 THEN LPRINT: GOT0 320 310 LPRINT H$;CHR$(93+Z)" - DISTRICT ";Z: Z=Z+l 320 NEXT R: LPRINT H$;H$;B$;"g";H$jH$;H$;H$;"k"...
Since this program uses many of the routines from the BAR- CHART program above, begin by loading that program. Many of its lines need no changes, including: 110, 120, 150 and 799-1010 Delete lines 10 to 90. Make small changes to four lines: 100 DIM A(18): LPRINT CHR$(27)"3"CHR$(20)CHR$(27)"U1";...
7 WIDTH LPRINT 255 90 LPRINT CHR$(27)"QP"; 100 DIM A(18): LPRINT CHR$(27)"3"CHR$(20)CHR$(27)"U1"; 110 LPRINT CHR$(27) ":"CHR$(0)CHR$(0)CHR$(0); 120 LPRINT CHR$(27)"%"CHR$(1)CHR$(0); 130 LPRINT CHR$(27)"&"CHR$(0)"at 140 FOR Y=1 TO 20: LPRINT CHR$(139); 150 FOR X=1 TO 11: READ C: LPRINT CHR$(C);: NEXT X 160 NEXT Y: LPRINT CHR$(27)"C"CHR$(66);: GOSUB 700 170 LPRINT CHR$(27)"!8";"pmpsrpr mnopqrst";...
499 ' *** BOX SUBROUTINE *** 500 FOR K=1 TO 5: READ L$(K),M$(K),N$(K),R$(K): NEXT K 510 FOR K=1 TO C: READ W(K): NEXT K 520 FOR L=1 TO 5: IF L=4 THEN FOR G=1 TO H 530 IF FT=1 THEN LPRINT H$; LPRINT L$(L);: FOR K=1 TO C-1 FOR J=1 TO W(K): LPRINT M$(L);: NEXT J LPRINT N$(L);: NEXT K...
1100 D A T A 0 , 1 2 1 , 0 , 7 3 , 0 , 7 3 , 0 , 7 3 , 0 , 7 9 , 0 : ‘ m - S 1110 DATA 0,127,0,65,0,65,0,65,0,127,0:'n - 0 1120 DATA 0,63,64,8,64,8,64,28,64,32,0:'o- F 1130 DATA 0,32,64,0,64,63,64,0,64,32,0'p - T 1140 DATA 0,126,1,2,4,1,2,4,8,4,2,1,126,0: 'q - W...
You may prefer to work out what each line does on your own- three cheers if you do. But if you want a little guidance, here is a brief program overview, followed by a line-by-line description of the main portion of the program. STATEMENT breaks down into several large blocks of routines and data: Lines...
Deciphering the box routine in lines 500 through 660 is left as an exercise for you. The following hints will get you started. The subroutine at 500 is used to create three boxes of different sizes and characteristics, using the line-graphics characters. The data stored in lines determine which line-graphics characters are used 1300...
INDEX Note: Refer to Table of Contents and List of Figures for specific programs. Also, the chapter summaries are not indexed. Accessories, 16 American Standard Code for Information Interchange. See ASCII Apostrophe. See REMarks Apple II computers, 38, 40, 312-313 Seven-bit systems also Arrays, 173-176, 189-193...
Cable, 16, 35 CANcel, 46 Caret symbol. See Exponent character Carriage return, 23, 41 CHR$( 13) produces it. Line feed also Centronics. See Interface Channels. See Tabs, vertical Character fonts, shown, 253-270 See also User-defined characters Character size, 256-270, 327 See also specific pitches by name Character string function.
Dumping, hex. See Hex dumping Elite Mode, 52-53 ESCape “M” turns it on; ESCape "P” turns it off. Emphasized Mode, 62-64 ESCape “E” turns it on; ESCape “F” turns it off. END, v Environment, specifications for, 329 Epson computers. See HX-20; QX-10...
ESCape = CHR$(27), 42-43 format for commands, iv-v, 46-47, 57-58 listed by function, 283-286 listed by number, 271-281 specific modes or functions also ESCape “!“. Master Select. See Master Select ESCape "#“. Accepts eighth bit as is from computer. See Bit, high order ESCape “%“CHR$(n )CHR$(n ).
ESCape “I1”. Enables printing of control codes O-31. See User-defined characters. ESCape “J”CHR$(n). Produces an immediate one-time line feed of n/216-inch without a carriage return. See Line feed ). T urns Single-Density Graphics Mode on. ESCape “K”CHR$(n )CHR$(n See Graphics Mode ESCape “L”CHR$(n )CHR$(n ).
Firing of pins. See pins FE See Form feed Foreign language characters. See International character set Form feed, 103-105 CHR$(12) produces one. button, 35 Top of form also Forms length of, 103-107 ESCape “C”CHR$(0)CHR$(n) sets length to n inches; ESCape “C”CHR$(n) sets to n lines;...
Line feed, 98-101 CHR!§(lO) produces it. button, 35-36 computer interface and. See Interface DIP switch for, 23 one-time immediate, 99-100 ESCape “J”CHR$(n) produces it. reverse, 99, ESCape “j”CHR$(n) produces it. Line spacing, 93-98 ESCape “A”CHR$(n) sets to n/72”; ESCape “0” sets at 1/8”; ESCape “1”...
NEC, 151 Nine-pin graphics. See Graphics Mode Noise reduction. See Half-Speed Mode Offsets, 82-83 ON LINE light and button, 35 Overstrikes, 81-82 Page, top of. See Top of form Paper bail, 15, 24, 26, 29 loading, 24-32, 304 length. See Forms separator, 17-18 thickness adjustment, 32, 34 types of, 16, 24, 328...
Print head and dot graphics, 132-133 and dot matrix printing, 50 16,324, 328 life of, replacement, 324-325 Print modes. See Modes Print pitch summary table, 60 See also specific pitches by name Print quality, 61-66 Print speed. See Half-Speed Mode Print type chart, 78 Print width, See specific pitches by name: Width Printer buffer, 44...
Schematic, 331 Script Mode, 71-72 ESCape “SO” turns Superscript Mode on. ESCape “S1” turns Subscript Mode on. ESCape “T” turns either Script Mode off. Self test for printer. See Test Semicolons, iv, 45 Sensor. See Paper-out sensor Separator, paper. See paper Serial board.
Temperature, 329 Test automatic, 35-36 for seven-bit system, 309 Top of form, 31-33, 103-104 CHR$(12) sends the paper to top of form. ESCape “C” resets it to current paper position. ESCape “@” resets form length to default and sets top of form to current line. with skip-over-perforation, 109 Reset Code also...
Width of characters, 256-270 statements, 313-314 Word processing, 36, 321-322 Zero, slashed, 23...
While every precaution has been taken in the preparation of this book, Epson America, Inc. and the author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein.
Preface The User’s Manual for the FX Series Printers consists of two vol- umes: Tutorial and Reference. This volume is the Reference, which contains the appendixes to Volume 1. These appendixes are organized as follows: Appendix A deals with the characters: it gives ASCII codes and displays the dot matrix characters.
Control-Code Chart ......Epson Model Differences ......
Appendix A ASCII Codes and Character Fonts This appendix provides information about the way the ASCII codes are employed on the FX printers and about the character fonts associated with those codes. The first section summarizes the codes. The second section displays, in ASCII order, the decimal number, the hexadecimal number, a printout, and an enlarged dot matrix for each character in the two fonts that you can access directly: the Roman font for the USA character set (decimal...
International characters summary ASCII locations 0 to 31 and 128 to 159 store the international char- acters that are needed for sets other than the one for the USA. These characters are printable only with the CHR$(27) “6”, CHR$(27) “I”, or CHR$(27) “R”...
ASCII Character Matrixes As in the summaries above, this section follows the ASCII code arrangement, but this time we show the codes only as they are asso- ciated with characters—0 through 255. The characters for the Roman and Italic USA fonts, which together make up the USA character set, occupy ASCII positions 32 through 126 and 160 through 254, respec- tively.
Width Dec Hex Character Width Character...
Dec Hex Character Width Dec Hex Character Width...
Character Width Width Dec Hex Character...
Width Dec Hex Character Width Dec Hex Character...
Dec Hex Character Width Dec Hex Character Width 102 66 103 67 104 68 105 69 106 6A 107 6B 108 6C 109 6D 110 6E...
Width Dec Hex Character Width Character Dec Hex 120 78 121 79 122 7A 123 7B 124 7C 125 7D 126 7E 127 7F 128 80...
Dec Hex Character Width Dec Hex Character Width 1 4 7 150 96 143 8F 144 90 153 99...
Width Dec Hex Character Width Dec Hex Character...
Hex Character Width Dec Hex Character Width...
Width Character Dec Hex Character Width...
Dec Hex Character Width Dec Hex Width Character 228 E4 229 E5 230 E6 231 E7 232 E8 233 E9 234 EA 235 EB 236 EC...
Dec Hex Character Width Dec Hex Character Width 255 FF...
Appendix B Control Codes in Numeric Order You activate an FX control code by using LPRINT CHR$(n), where n is the number in the decimal column below. When the ESC column contains a dash, you use only CHR$(n) but when ESC is written in this ESC column, you must precede the CHR$(n) with CHR$(27).
ESC Dec Hex Symbol Function Vertical tab. Empties the printer buffer, then advances the paper to the next vertical tab stop. Form feed. Empties the printer buffer, then advances the paper to the next logical top of form. Carriage return. Prints the contents of the buffer and resets the buffer character count to 0.
ESC Dec Hex Symbol Function Master Print Mode Select (Master Select). ESC 33 21 ! Selects 16 unique print mode combinations. Format: CHR$(27)” ! “CHR$(n) where n = 0 - 255. See Appendix D. Accepts the eighth bit “as is” from the ESC 35 23 # computer.
ESC Dec Hex Symbol Function Selects a vertical tab channel. E S C 4 7 2 F / Format: CHR$(27)“/“CHR$(n) where n = 0 - 7. Sets line spacing to 1/8-inch (g-dot). ESC 49 Sets line spacing to 7/72-inch (7-dot). Returns line spacing to the default of 1/6 inch ESC 50 32 2 (12-dot).
ESC Dec Hex Symbol Function Sets the eighth bit to 0 (limits the range to 61 3D = 0 - 127). Sets the eighth bit to 1 (limits the range to ESC 62 3E > 128 - 255). Redefines one of the 4 alternate graphics ESC 63 3F ? codes -- “K”,“L",“Y”, or “Z”...
ESC Dec Hex Symbol Function Resets the current tabs and sets up to 32 ESC 68 44 D horizontal tabs in the current pitch. Tabs may range up to the maximum width for the character and printer size. For example, the maximum tab for Pica characters on an 8- inch line is 79.
ESC Dec Hex Symbol Function Turns Single-Density Graphics Mode ON. ESC 75 4B K Prints 480 dots per 8-inch line. Format: CHR$(27)“K”CHR$(n )CHR$(n followed by n data numbers, where n = n + 256*n = 0 - 255, = 0 - 255. For example, to print 480 dots, n = 224, n = 1.
ESC Dec Hex Symbol Function Sets the right margin. Also cancels all text ESC 81 51 Q that is in the print buffer. Format: CHR$(27)“Q”CHR$(n) where n = 1 - maximum number of characters per line in the current pitch: FX-100 FX-80 2-136 in Pica...
ESC Dec Hex Symbol Function Turns High-Speed Double-Density Graphics ESC 89 59 Y Mode ON; gives the same density as CHR$(27)” L”, but cannot print two adjacent dots in the same row. Turns Quadruple-Density Graphics Mode ON. ESC 90 5A Z Prints 1920 dots per 8-inch line.
ESC Dec Hex Symbol Function On the FX-80 only, causes an immediate ESC 106 6A j reverse line feed in an increment of 1/216- inch without a carriage return. Similar to CHR$(27)“J”. Format: CHR$(27)“j”CHR$(n) where n = 0 - 255. Sets the left margin.
The printer’s high-order control codes from 128 to 155 and 255 mir- ror their low-order counterparts (0 - 27 and 127). For ready reference, both sets are listed here: High High Function Symbol Terminates horizontal and vertical tab setting. Sounds beeper. Backspace.
Appendix C Control Codes by Function This Appendix shows the same control codes as Appendix B, but this time arranged by categories before ASCII order. If your computer cannot generate lowercase letters, use the equivalent decimal ASCII values. See Appendix B or refer to the pages suggested by the Index for usage instructions.
Print Enhancement CHR$(27)“S0” Turns Superscript Mode ON. Turns Subscript Mode ON. CHR$(27)“S1” CHR$(27)“T” Turns either Script Mode OFF. Turns Underline Mode OFF. CHR$(27)"-0” Turns Underline Mode ON. CHR$(27)“-1” Mode and Character-Set Selection CHR$(27)“!"CHR$(n) Master Select. CHR$(27)”%“CHR$(n )CHR$(n Selects a character set by source: ROM (factory) or RAM (user-defined).
Turns One-Line Unidirectional Mode ON. CHR$(27)” < ” CHR$(27)” = ” Sets the high-order bit OFF. Sets the high-order bit ON. CHR$(27)” > " Turns Continuous Unidirectional Mode OFF. CHR$(27)“ U0 ” Turns Continuous Unidirectional Mode ON. CHR$(27)“Ul” Turns Immediate Mode OFF. CHRS(27)“i0”...
Control Code Comparison The first part of this appendix consists of a chart of the commands used on Epson printers. It shows similarities and differences between the MX III, the FX, and the RX. Unless otherwise specified, the FX column applies to both the FX-80 and the FX-100, and the RX column RX-100.
Epson Model Differences In this discussion of software and hardware differences between the MX III, the FX and the RX, the command name (backspace, vertical tab, etc.) is that of the most recent model which carries it. CHR$(8) - Backspacing On the MX III in Expanded Mode, moves the print head to the left one Pica position.
CHR$(15) - Compressed Mode selection On the MX III, prints 132 characters per 8-inch line. On the FX-80 and RX-80, prints 132 characters per 8-inch line, but can print 137 characters if the right margin is changed. On the FX-100 and RX-100 prints 233 characters per 13.6-inch line.
Escape”/” , “B”, and “b” - Vertical tabbing On the FX and RX-100 only lets you set up to 16 vertical tabs and store up to eight vertical tab channels in memory. ESCape “3" - Special line spacing On all three models, you can set and reset the line feed function by changing hardware (DIP switch and/or cable wiring).
Escape ” G” - Double-Strike Mode selection On the MX III, FX-100, and RX, moving in and out of Double- Strike Mode on one line produces a descent of one-third dot per change. ESCape ”H” - Double-Strike Mode selection On the MX III, this code also cancels Script Mode. ESCape ”...
ESCape ”Y" - High-Speed Double-Density Graphics Mode selection On the FX and RX, prints ESCape”L” graphics at twice the usual speed. There is one limitation: it will not print adjacent dots in the same row. ESCape “Z” - Quadruple-Density Graphics Mode selection On the FX and RX, prints 1920 dots per B-inch line;...
ESCape”s” - Half-speed printing On the FX, prints at half the normal speed, which results in 80 char- acters per second. On the RX, prints at half the normal speed, which results in 50 characters per second. Dumping programs in hexadecimal On the FX and RX, you can use the hex dumping facility to aid you in debugging.
Appendix E Defaults and DIP Switches In this Appendix we list the default settings for your printer, show- ing which settings you can change and the way you can change them. Some of the defaults can be changed by using DIP switches; the sec- ond section illustrates and discusses those defaults.
2K buffer available for user-defined characters Paper-out sensor on Non-slashed zero (although there’s no code for “turning on” slashed zero, you can slash one zero at a time with backspace) Carriage return issued at the end of a line without an automatic line feed Bidirectional movement of the print head Skip-over-perforation feature off...
T a b l e E - 1 . D I P s w i t c h f u n c t i o n Switch 1 Note: The shaded boxes show the factory settings. Figure E-Z. Factory setting the DIP switches Examining the Switches Switches...
E-2. Table International DIP switch settings See Chapter 6 for a discussion of the international sets. 1-5: selects a default print weight. When it is ON, Emphasized Switch is the default. When it is OFF, Single-Strike is the default. 7-4: controls the RAM memory. When it is ON, makes a 2K Switch buffer available.
2-2: controls the beeper. When it is ON, the beeper sounds Switch when it receives a CHR$(7) or to indicate the paper has run out. When it is OFF, CHR$(7) or paper-out doesn’t sound beeper. For printer detected error other than paper-out sensing (for which switch must also be set), the beeper will sound regardless of the setting of switch 2-2.
Appendix F Troubleshooting This appendix approaches troubleshooting from several directions. The first section uses a columnar format to match solutions with prob- lems. Other sections cover beeper error warnings, hexadecimal code dumping, coding and seven-bit solutions, and specific solutions for several popular personal computer systems.
Changing form measurements Don’t set, form lengths of 0 or The ESCape”C” command is not working properly. 128. Don’t set the skip larger than the The ESCape“N” skip-over-per- form length. foration doesn’t work. Tabbing Can’t set vertical tabs greater Vertical tabs don’t work cor- than the form length.
Printer “freezes” in Graphics The printer expects a certain Mode. number of pin patterns, deter- mined by n and n . It will wait patiently until the quota is full. Note that 9-Pin Graphics Mode requires two bytes for each col- umn of graphics.
Loading paper It may be running against the rib- Paper goes crooked as it rolls bon guide. Move the printhead to down. the middle of its path. Paper crunches up. The paper guides are set incor- rectly. Move them to fit this paper.
1. A short circuit between the collector and the emitter of a head tran- sistor along with a shorted dot driver winding produces: PI, PI, PI . . . PI, PI, PI on power-up or self-test, and PI, PI, PI, PI when on-line and printing.
Figure F-1. Best-case hex dump Most BASIC , however, are not quite that straightforward. For exam- ple, the TRS-80 Model III prints Figure F-2: Figure F-2. TRS-80 Model III hex dump Notice that the FX is receiving decimal code 10 as hex 0D, which is decimal 13.
printing, either by trial and error or by using the hex dumping capabil- ity of the FX, you can start overcoming them. Because each computer system deals with ASCII codes differently, it is impossible to provide solutions for all potential problems in one appendix.
These codes can be sent directly to the printer by POKEing them to a special memory location where they are immediately forwarded to the printer. The format is: POKE 14312, N where N is the decimal value of the code you wish to send to the printer.
50 IF B>9 THEN B=B - 7 60 T=ASC(MID$(B$,P + 1, l)) - 48 70 IF T>9 THEN T=T-7 80 POKE A,B*l6 + T 90 A=A+1 100 NEXT P 110 POKE 16422, 187 120 POKE 16423, 64 This driver will also work on the TRS-80 Model III-with one change in line change 32E837 to D3FB.
User-defined characters can’t be printed with the top 8 pins (the standard position for most characters). Eight pins can’t be used in defining characters. Here we suggest some ways to work around these types of problems. High-order bit control If you own a seven-bit system, the FX can help you. It gives you three instructions to let you control the high-order (eighth) bit: ESCape ”>”...
ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ Setting the eighth bit on in line adds to each of the number in line 20; thus it prints Italic characters. The ESCape ”=” in line 30 effectively subtracts from each of the numbers in line 40, so the second line prints as the characters from 65 throught 90.
Solutions for Specific Systems The next four sections illustrate dealing with interface puzzles on four types of computers: the Apple II, the TRS-80, the IBM-PC, and the QX-10. Apple II solutions There are two types of problems that you who own Apple II com- puters will need to address.
code and the program will not work properly. The programs in this manual do not use CHR$(9), but some do use its high-order version - CHR$(137) - which your system will change to CHR$(9). In these cases use the following method to change your printer initialization code to a number that is not used in the program.
QX-10 solutions There are two types of computer-printer interface problems that you owners of Epson QX-10s may need to address. The first is making a width statement when a line is to be more than 80 characters wide. The second is changing any occurrence of the number nine to some other number.
Sometimes it may be easier to use another low-order value. For example: FOR X=1 TO 10 IF X=9 THEN X=10 When DATA numbers include you can sometimes simply double each of them or change each 9 to 8 or The best number to substi- tute for 9 in pin patterns is usually...
Appendix G Mixing Print Modes One of the most pleasing aspects of your FX printer is its wide vari- ety of print modes. By mixing modes as shown in Table G-1, you can print characters in different type styles. The details are in Chapter 5;...
By using the character form of some of the numbers, you can shorten the command string. Table G-2 shows some convenient char- acters to be used for the various combinations. You can find the Mas- ter Select code for any valid combination of pitch and weight by reading across in the row for the pitch you have selected and down in the column for the weight you want.
it stays on until turned off. When two modes that conflict are turned on at the same time, the printer must choose which one to use. For example, suppose you turn on both Elite and Compressed Pitches. Since the printer can only print one pitch at a time, it must make a choice;...
Appendix H Customizing the FX You can adapt your FX to fit a variety of needs. You can alter the print capability both by hardware switches that change default condi- tions and by software codes that activate or deactivate different print modes.
Keep in mind that this puts extra wear on your ribbon and slows your printing speed. A few word processing programs support the FX’s Proportional Mode. Since there is no DIP switch for this mode, consult your pro- gram’s manual for instructions on activating Proportional printing. If you wish to use right-justification with Proportional, be sure that your program can do so.
The ribbon cartridge prints about 3 million characters. See your Epson dealer for replacements. Rarely Once in a great while your printer should be lubricated. Epson rec- B710200001) ommends two lubricants: (Epson Part No.
The expected life of an FX print head is about charac- ters (assuming an average of dots per character). See your Epson dealer for FX print head replacements. To remove the old print head: If you have been printing, turn the printer OFF for about minutes to allow the print head to cool.
Now pull the cable from the connector block. Hold the block firmly because it has to stay put. Pull the print head straight up and off. To install the new print head: Place the new print head onto the head mount and flip the locking lever back toward the front of the printer.
Appendix J Technical Specifications Printing Printing method ..Impact dot matrix Printing speed ... characters per second Paper feed speed ..Approximately 150 ms/line (at 1/6 inch/line) Printing direction ..Bidirectional, logic seeking Unidirectional (left to right) in Graphics Mode Character set ....
Column width: Maximum characters per line FX-100 FX-80 Pica Pica Expanded Elite Elite Expanded Compressed 132* Compressed Expanded if right margin is changed (See Chapter 9). *137 Paper FX-80 Paper width Adjustable sprocket pin- P i n - f e e d ....9.5” to 10"...
Appendix K The Parallel Interface The FX printer uses a parallel interface to communicate with the computer; this appendix describes it. Connector pin assignments and a description of respective interface signals are shown in Table K-1. Table K-1. Pins and signals Direc- Signal Return...
Table K-1, continued Signal Return Direc- Description Signal tion — — Pulled up to + 5 volts through 3.3K — ohm resistance. When this signal is LOW, the paper is AUTO FEED — automatically fed 1 line after printing. (The signal level can be fixed to this by setting DIP switch 2-4 to ON.) Unused.
4. Data transfer must be carried out by observing the ACKNLG or BUSY signal. (Data transfer to this printer can be carried out only after receipt of the ACKNLG signal or when the level of the BUSY signal is LOW.) Under normal conditions, printer cable pins 11, 12, activated when the paper-out condition is detected.
Table K-2. Signal interrelations DATA ENTRY ERROR BUSY ACKNLG SLCT IN DC1/DC3 On-Line HIGH Not generated Disabled HIGH/LOW DC1/DC3 Enabled (normal entry) HIGH LOW/HIGH Generated after data entry HIGH Enabled* HIGH same same Enabled (normal entry) DC1//DC3 HIGH same same *Data entry will be acknowledged, but the input data will be lost until DC1is input.
INDEX Note: Refer to Table of Contents and List of Figures for specific programs. Also, the chapter summaries are not indexed. Accessories, 16 American Standard Code for Information Interchange. See ASCII Apostrophe. See REMarks Apple II computers, 38, 40, 312-313 See also Seven-bit systems Arrays, 173-176,189-193...
Cable, 16, 35 CANcel, 46 Caret symbol. See Exponent character Carriage return, 23, 41 CHR$(13) produces it. See also Line feed Centronics. See Interface Channels. See Tabs, vertical Character fonts, shown, 253-270 See also User-defined characters Character size, 256-270, 327 See also specific pitches by name Character string function.
Dumping, hex. See Hex dumping Elite Mode, 52-53 ESCape "M" turns it on; ESCape “P”’ turns it off. Emphasized Mode, 62-64 ESCape “E” turns it on; ESCape “F” turns it off. END, v Environment, specifications for, 329 Epson computers. See HX-20; QX-10...
ESCape = CHR$(27), 42-43 format for commands, iv-v, 46-47, 57-58 listed by function, 283-286 listed by number, 271-281 See also specific modes or functions ESCape “!”. Master Select. See Master Select ESCape "#". Accepts eighth bit as is from computer. See Bit, high order ESCape “%“...
ESCape “I1”. Enables printing of control codes 0-31. See User-defined characters. ESCape “J” CHR$(n). Produces an immediate one-time line feed of n/216-inch without a carriage return. See Line feed ). T urns Single-Density Graphics Mode on. ESCape “K” CHR$(n )CHRS(n See Graphics Mode ).
Firing of pins. See pins FF. See Form feed Foreign language characters. See International character set Form feed, 103-105 CHR$(12) produces one. button, 35 See also Top of form Forms length of, 103-107 ESCape “C” CHR$(0)CHR$(n) sets length to n inches; ESCape “C”...
Nine-Pin, 152-154 “^“ CHR$(d)CHR$(n )CHR$(n ) enters Nine-Pin Graphics Escape Mode. reassigning code, 150-152 reassigns an alternate code to Graphics Escape "?s" CHR$(n) Mode n. summary table, 151 Grid. See dot matrix Half-Speed Mode, 89, 322 ESCape turns it on; ESCape “s0” returns it to normal. "s1"...
Line feed, 98-101 CHR$(10) produces it. button, 35-36 computer interface and. See Interface DIP switch for, 23 one-time immediate, 99-100 ESCape “J”CHR$(n) produces it. reverse, 99, 101 ESCape “j”CHR$(n) produces it. Line spacing, 93-98 ESCape “A”CHR$(n) sets to n/72”; ESCape “0” sets at 1/8";...
NEC, 151 Nine-pin graphics. See Graphics Mode Noise reduction. See Half-Speed Mode Off sets, 82-83 ON LINE light and button, 35 Overstrikes, 81-82 Page, top of. See Top of form Paper bail, 15, 24, 26, 29 loading, 24-32, 304 length. See Forms separator, 17-18 thickness adjustment, 32, 34 types of, 16, 24, 328...
Print head and dot graphics, 132-133 and dot matrix printing, 50 life of, 16, 324, 328 replacement, 324-325 Print modes. See Modes Print pitch summary table, 60 See also specific pitches by name Print quality, 61-66 Print speed. See Half-Speed Mode Print type chart, 78 Print width.
Schematic, 331 Script Mode, 71-72 ESCape “S0” turns Superscript Mode on. ESCape “S1” turns Subscript Mode on. ESCape “T” turns either Script Mode off. Self test for printer. See Test Semicolons, iv, 45 Sensor. See Paper-out sensor Separator, paper. See paper Serial board.
Temperature, 329 Test automatic, 35-36 for seven-bit system, 309 Top of form, 31-33, 103-104 CHR$(12) sends the paper to top of form. ESCape “C” resets it to current paper position. ESCape “@” resets form length to default and sets top of form to current line. with skip-over-perforation, 109 See also Reset Code Tractor...
Width of characters, 256-270 statements, 313-314 Word processing, 36, 321-322 Zero, slashed, 23...
Control Codes by Function Print Width Commands Turns Elite Mode ON. CHR$(27)"M" CHR$(27)“P” Turns Elite Mode OFF. Turns Compressed Mode ON. CHR$(15) [^O] Turns Compressed Mode OFF. CHR$(18) [^R] Turns One-Line Expanded Mode ON. CHR$(14) [^N] Turns One-Line Expanded Mode OFF. CHR$(20) [^T] Turns Continuous Expanded Mode ON.
Forms Control Commands Produces a form feed. CHR$(12) [“L] Produces a carriage return. CHR$(13) CHR$(27)“8” Turns the paper-out OFF. sensor CHR$(27)“9” Turns the paper-out sensor ON. CHR$(27)“C”CHR$(n) Sets the form length in lines: n = 0 - 127. CHR$(27)“C”CHR$(0)CHR$(n) Sets the form length in inches: n = 0 - 22. CHR$(27)“N”CHR$(n) Produces a variable skip-over-perforation.
CHR$(27)”%“CHR$(n )CHR$(n Selects a character set: n selects ROM (0) or RAM (1); n is 0. CHR$(27)“&”CHR$(n)CHR$(c )CHR$(c )CHR$(A)CHR$(d ) ... CHR$(d )... Defines characters c to c in RAM area: n is 0. Each character requires an attribute byte (A), followed by 11 data numbers to d CHR$(27)“:“CHR$(n )CHR$(n...
ASCII Codes Character Character Character D e c or Function or Function D e c H e x or Function none none < none none > none none none none none none none none none none none none none none none none none...
Character Character Character or Function D e c H e x or Function or Function < > — The DIP Switches Switch 1 Function No. ON International character International character 1-7 ON International character 1-6 ON 1-5 Emphasized Print weight Single-strike User-defined 1-4 2K buffer...