Manuale d’uso / di manutenzione del prodotto FX del fabbricante Epson
Vai alla pagina of 268
.
FCC COMPLIANCE STATEMENT FOR AMERICAN USERS This equipment generates and uses radio frequency energy and if not installed and used properly, that is, in strict accordance with the manufacturer’s instructions, may cause interference to radio and television reception.
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 e.
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.
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.
FX Series Printer User’s Manual Volume 1 Contents Preface ..................................... . Conventions Used in This Manual ............... . List of Figures ......................................................... List of Tables ............
2 BASIC and the Printer ........................ . 37 BASIC Communications ....................... . 38 Character strings ........................... . 39 BASIC print commands ..................... . 39 ASCII and BASIC basics ..................... . 40 Control codes .
6 Special Printing Features ....................... . 81 Backspace ................................... . 81 Overstrikes ................................ . 81 Offsets .................................... . 82 Unidirectional Mode .......................
9 Margins and Tabs ............................ . 113 Margins.. ................................... . 113 Left margin ................................ . 113 Margins and pitches ........................ . 114 Right margin ..............................
12 Design Your Own Graphics .................... . 159 Planning Process ............................. . 159 STRATA Program ............................ . 160 Three-Dimensional Program ................... . 163 First version of 3D program .............
16 Combining User-Defined Characters ............. . 215 Large Letters: Double Wide .................... . 215 Large Letters: Double High ..................... . 217 Giant Letters: Double High and Double Wide ..... . 217 Core Sets ....................
List of Figures Easy-1 FX ticket program ......................... . 8 Easy-2 Ticket to success .......................... . 10 1-1 The FX-80 and FX-100 printers .............. . 14 1-2 Printer parts .............................. . 15 1-3 Paperpath .
5-1 Master Select Program ..................... . 74 5-2 Master Select choices ...................... . 75 5-3 Dress-up combinations ..................... . 77 6-1 Bidirectional line .......................... . 84 6-2 Unidirectional line ............
12-1 STRATA layout .......................... . 161 12-2 STRATA logo ............................ . 162 12-3 STRATA program ......................... . 163 12-4 Corner of the FX-80 design .................. . 164 12-5 FX-80 figure ....................
17-1 17-2 17-3 17-4 Barchart ................................. . Program for BARCHART .................. . Statement form ........................... .
List of Tables 1-1 DIP switch functions ......................................... 23 2-1 Several computers’ print LIST commands ...... 38 2-2 Several computers’ printer activating commands . 40 2-3 ASCII codes on the FX ...........................
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.
l Program debugging mode (hexadecimal dump of codes received from the computer) l Fast print speed-160 characters per second-for rapid processing of documents l 2K print buffer for smooth operation l .
You can use this manual as a reference, a tutorial study guide, or some combination of the two. l 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.
.
6.
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 1. 3. Turn the printer and computer on and load a short BASIC pro- gram.
130 LPRINT "7 :"; E$" !X"; E$"4"; " " E$" - 1"; 140 LPRINT "TICKET TO SUCCESS!"; E$"!@"; E$"5"; E$"+0"; 150 LP.
Figure Easy-2. Ticket to success 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.
110 Prints the outside border, then the top of the inside border (which was defined as the “:” character). 120 Prints another line of borders. 130 Prints more borders, then uses the Master Select to turn on Emphasized Double-Strike Pica. Also turns on Italic and Under- line Modes.
280 Returns the printer to its defaults. 300-330 Provides data for the FX letters as user-defined characters 0-3. 350-410 Provides data for the ticket borders.
Chapter 1 The FX Printers Once you’ve unpacked your new printer, the first thing you should do is make sure you have all of the parts. With the FX-80 or FX-100 printer, you should receive the items shown in Figure 1-1: 1. The printer itself 2. A manual-feed knob 3.
Figure 1-1. The FX-80 and FX-100 printers 14.
Figure 1-2. Printer parts 1 5.
Additional Supplies and Accessories The following items may be purchased separately from your Epson dealer: Printer cable or interface kit. Each computer system has its own way of connecting to a printer. Some computers need a cable only, others require both a cable and board.
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.
Figure 1-8. DIP switch vent 21.
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 No . 1-8 1-7 1-6 O N ON ON ON Function International character International character OFF OFF OFF OFF International character 1-5 Emphasized Print weight 1-4 .
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.
Figure 1-11. Ribbon insertion 25.
Figure 1-12. Printer readied for paper insertion l Be sure the printer is turned off. Lift the front protective lid and move the print head to the middle of the platen. l Remove the center protective lid. l 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.
l 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. l Reinstall the center protective lid underneath the paper.
Now follow these steps to load your paper into the friction feeder: l 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. l Engage the friction-control mechanism by pushing the friction- control lever to the back.
sides of the tractor assembly are firmly in place. Rock the front of the unit downward, pressing firmly until it locks into place. Figure 1-16. Tractor unit installation Figure 1-17.
To load the paper into the unit, use this procedure: l Be sure the printer is turned off; then open the front protective lid to move the print head to the middle of the platen. l 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.
Figure 1-19. Top of form 1-21). The other end of the cable plugs into your computer. If your 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-20. Paper thickness adjustment 34.
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; press the ON LINE button to turn it off.
loaded because the printer’s test uses all 136 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 2-1. Several computers’ print LIST commands Command Computer LLIST Epson QX-10™, IBM-PC ® , and Radio Shack TRS-80 ® LIST"COM0:" Epson HX-20 Notebook Computer™ PR#1 Apple ® II.
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).
Table 2-2. Several computers’ printer activating commands Activating commands Computer 10 LPRINT CHR$(193) Epson QX-10, IBM-PC, and Radio Shack TRS-80 5 OPEN "0",#1, "COMØ" Epso.
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 255) in order to make room for more features.
Now RUN it. You should hear a short beep. (If you don’t hear it, check DIP switch 2-2, using the procedure we gave in Chapter 1.) That’s the printer’s beeper, which most often sounds to inform you that you’ve run out of paper (Appendix F lists other causes of beep- ing).
Here are two examples of ESCape code sequences: LPRINT CHR$(27)CHR$(71) LPRINT CHR$(27)CHR$(38)CHR$(0)CHR$(1)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.
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.
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 that much power.
of line 10 is the number 4, and the symbol for the 53 of line 30 is the number 5, so enter the following: 10 LPRINT CHR$(27)“4” 30 LPRINT CHR$(27)"5"; Now use RUN to make sure that both ESCape sequences work as before. You can also shorten your programs by storing the ESCape code in a character string.
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 3-1 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.
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 1, 3, 5, etc.
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 3Ø LPRINT CHR$(27)"P"; 4Ø LPRINT PICA PITCH IS THE NORMAL PRINT WIDTH" When you RUN it, you should get: COMPARE ELITE PITCH WITH THE PICA BELOW PICA PITCH IS THE NORMAL PRINT WIDTH Figure 3-6.
NEW 2Ø LPRINT CHR$(15)"COMPRESSED MODE IS SET WITH CHR$(15)" 3Ø LPRINT "IT WILL STAY ON UNTIL YOU CANCEL IT" 4Ø LPRINT CHR$(l8)"PICA AGAIN" COMPRESSED MODE IS SET WITH.
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).
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.
40 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$(1) can use an alternative form for this pair. For continuous Expanded, and for the other modes which use CHR$(1) and CHR$(0) as a toggle switch, you can use an abbreviation. Here, for example, you can use: LPRINT CHR$(27)"W"CHR$(1) or you can use: LPRINT CHR$(27)"W1" for the same result.
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 t.
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 IS 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.
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.
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.
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 GOE.
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.
68.
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: NEW 20 LPRINT CHR$(27)"-1UNDERLINING.
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" (instead of line 70’s Reset Code) in your program.
NEW 20 Y$(1)="SINGLE-STRIKE Y$(2)="SNGL-STRIKE EMPHASIZED " 30 Y$(3)="DOUBLE-STRIKE Y$(4)="DBL-STRIKE EMPHASIZED " 40 Z$(1)="PICA Z$(2)="ELITE : Z$(3)="COM.
0 SINGLE-STRIKE PIC A 1 SINGLE-STRIKE ELIT E 4 SINGLE-STRIKE COMPRESSED 8 SNGL-STRIKE EMPHASIZED PICA 16 DOUBLE-STRIKE PIC A 17 DOUBLE-STRIKE ELITE 20 DOUBLE-STRIKE COMPRESSED 24 DEL-STRIKE EMPHASIZED.
Double-Strike, use LPRINT CHR$(27)“!T". N/A indicates that the two modes cannot be combined. Table 5-1. Master Select Quick Reference Chart WEIGHT PITCH Single Strike Emphasized Double Strike D.
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.
.
Here are the commands that we introduced in this chapter. CHR$(27) “-1” Turns Underline Mode ON CHR$(27)“-0” Turns Underline OFF CHR$(27)“S1” Turns Subscript Mode ON.
80.
Chapter 6 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.
The 17 backspaces (line 40) are printed in Compressed Mode. The difference in character widths makes the second printing of the word BACKSPACES be offset from the first.
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)"U1" Figure 6-2.
line feed, which means that the subsequent movement of the print head will be from the left margin to the right. To see this in action, delete line 10 and change line 40 to read: 40 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.
Table 6-2. International characters in Roman typeface USA FRANCE GERMANY U.K . DENMARK SWEDEN ITAL Y SPAI N JAPAN 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.
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 80 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.
CHR$(27)“s1” CHR$(27)“s0” CHR$(27)“i1” CHR$(27)“i0” Turns Half-Speed ON; If your system can’t send lowercase letters, use CHR$(115) CHR$(1) Turns Half-Speed OFF For the FX-80 only, turns Immediate-Print Mode ON. If your system can’t send lower- case letters, use CHR$(105)CHR$(1).
92.
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.
Figure 7-1. Default line spacing To see 12-dot spacing, reset the printer (to clear any previous modes), and enter: NEW 20 FOR X=0 to 4 30 LPRINT TAB(6*X)"STAIR STEPS" 40, NEXT X 94.
Your first STEPS print in 12-dot spacing. Now tighten up the line spacing by adding lines 10 and 50: 10 LPRINT CHR$(27)"0" 50 LPRINT CHR$(27)"2" The CHR$(27)“0” of line 10 changes the usual 12-dot (1/6-inch) line spacing to a handy variation: 9-dot (l/B-inch) spacing.
To show what varying n can mean, the following program increases the line spacing by one dot’s worth on each line feed: 20 FOR X=0 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.
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.
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.
Figure 7-3. Staggering STAIR STEPS 100.
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. 10 LPRINT "REVERSE FEED" 20 LPRINT 30 LPRINT "ARE YOU WATCHING?&q.
Table 7-1. Line-spacing commands Line spacing Command 7/72" CHR$(27)“1” 9/72' CHR$(27)“0” (1/8”) 12/72" CHR$(27)"2" (l/6”) (default) n/72” CHR$(27)“A”CHR$(n).
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.
CHR$(12) sends the paper to the top of the next form. It gives the 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 11 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); 30 LPRINT "TWO-LINE FORM"CHR$(12); Figure 8-3.
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.
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.
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.
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. Switch 2-2 When on; activates the beeper; when off, deactivates it Switch 1-3 When off, makes the paper-.
112.
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: NEW 10 LPRINT "LEFT MARGIN" 253 LPRINT CHR$(27)"1"CHR$(10) 30 LPRINT "LEFT MARGIN SET AT 10 40 LPRINT Figure 9-1. Left margin setting As Figure 9-1 shows, line 10 prints at the default (zero) left margin, and line 30 makes the new left margin start 10 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$(15) and then your computer’s print listing command. Figure 9-3 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 FX-80, n can range from 2 to 80 in Pica, 3 to 96 in Elite, and 4 to 137 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 1 to 80. Keep this difference in mind when you use the two commands together.
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, 24, 32, . . . every eight Pica 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 S handle numbers differently from strings. This difference is most evident when you are printing columns that contain mixtures of numbers and strings: many BASIC S 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 1 ) . . . CHR$(n k )CHR$(O) where n 1 and n k stand for the first and last of a series of new tab stops, and the CHR$(0) informs 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 8 sets, called channels. Ordinary vertical tabs Most often you probably will only need one series of vertical tabs.
Figure 9-10. Ordinary vertical tabs Once you have tabbed to a stop, you can print more than one line of text at that position. See this by changing line 50 and adding the three lines shown below to your current program. If you enter the number of spaces that we have indicated with M S , the entries will line up neatly.
Figure 9-11. Text at tab stop 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 1 ) . . . CHR$(n k )CHR$(0) where N stands for a reference number between zero and seven under which this channel will be stored.
TOF OF PAGE TOP OF PAGE TOP OF PAGE TAB #1 FOR CHANNEL 1 TAB #1 FOR CHANNEL 2 TAB #2 FOR CHANNEL 2 TAB #1 FOR CHANNEL 3 TAB #2 FOR CHANNEL 1 TAB #2 FOR CHANNEL 3 Figure 9-13.
CHR$(27)“1”CHR$(n) Sets the left margin to n. (If you can’t use low- ercase letters, use CHR$(108) 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.
130.
Chapter 10 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: 480 main columns X 792 rows gives you a grand total of 380,160 dot positions per FX-80 page. And that doesn’t even take into account intermediate columns, the FX-100’s abil.
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.
Often a figure needs more than half a line. To reserve more than 255 columns for graphics, the second number (n,) must be greater than 0. But n 2 does not represent a number of single dots; it represents a num- ber of groups, each of which contains 256 dots.
Since computers use the binary numbering system (O S 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-3. Pins labelled uniquely The hardware makes this the most practical labelling system.
Print head Decimal sum of the desired pin pattern 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 CHR$(128), of course. And how about the bottom graphics pin? That’s right, LPRINT CHR$(l).
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.
Line 40 completes the loop. Line 50 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).
See what a big difference the line spacing makes? All of the 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 You enter Graphic s Mode with the CHR$(27)“K” CHR$(n 1 )CHR$(n 2 ) command. You determine the number of graphics columns by filling the two reservation slots, n 1 , and n 2 . You fire your pin patterns by adding up the pin labels, which consist of powers of two.
Chapter 11 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.
Graphics and the Reset Code You may have wondered about the semicolon we had you place after the B$ in line 40. If this line were text rather than graphics data, this semicolon would cause the text and the Reset Code (CHR$(27)“@“) in line 80 to be placed in the same text buffer and consequently the Reset Code would wipe the text out.
for form feed-CHR$(12)--to the printer, the computer system inter- cepts it and sends instead a series of line feeds-CHRS(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, 4, and 6 (exponential values 2, 8, and 32) in the second. And it alternates that sequence for 50 columns-50 columns in Single-Density.
Pattern Prints as (Overlapping dots) In double-density mode 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 t.
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.
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)+&quo.
MODE # 0 MODE # 1 MODE # 2 MODE # 3 MODE # 4 MODE # 5 MODE # 6 Figure 11-4. Seven density modes Figure 11-4 displays all seven of the FX modes that affect graphics density. Table 11-1 describes them. More Graphics Programming Tips The next two sections discuss two modes that the FX offers to help you solve potential graphics problems.
Table 11-1. Graphics Modes Mode Density 0 Single 1 Low-Speed Double High-Speed Double 2 Alternate code Description CHR$(27)“K” 60 dots per inch; 480 dots per 8” line 816 dots per 13.6” line CHR$(27)“L” 120 dots per inch; 960 dots per 8” line 1632 dots per 13.
You should get another printout of Figure 11-4. A second time you can make good use of the reassigning code occurs when you want to change a program in which you have not concatenated the graphics codes. Using the "?” sequence allows you to change every instance of your graphics command by entering only one line.
Figure 11-5. Nine-pin usage (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 1 produces Double-Density. In this format, n 1 and n 2 represent the usual width settings, but each print pattern requires two bytes (instead of one).
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.
50 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 50 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 19: RESTORE: LPRINT A$; 79 NEXT X: NEXT Y Although the new loop in line 30 repeats the pattern 10 times, you don’t need 10 repetitions of the DATA statements.
80 LPRINT CHR$(27)"@": END 90 DATA 8,28,62,93,-6,28,93,62,28,8 100 READ R: FOR J=1 TO -N 110 LPRINT CHR$(R);: NEXT J 120 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 1 )CHRS(n 2 ) Enters Low-Speed Double-Density Graphics Mode and specifies the width setting. Width = n 1 +(256*n 2 ), where n 1 is 0 - 255 and n 2 is 0- 7 CHR$(27)“Z”CHR!$(n 1 )CHR$(n 2 ) Enters Quadruple-Speed Graphics Mode and specifies the width setting.
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.
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.
l00 LPRINT CHR$(27)"1" 590 FOR K=1 TO 6 600 LPRINT CHR$(27)"L"CHR$(60)CHR$(0); 610 READ N: IF N=128 THEN 650 620 IF N>=0 THEN LPRINT CHR$(N);: GOT0 610 630 READ P,R: FOR J=1 TO .
Figure 72-4. Corner of the FX-80 design 164.
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: 1 for the low pin 64 for the high pin 1, 2, 4, 8, 16, 3.
170 FOR Y=1 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 819 columns [51+(3x256) = 819]. Line 170 fires the bottom graphics pin 819 times.
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,12,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,.
100 LPRINT CHR$(1)CHR$(2)CHR$(4)CHR$(8)CHR$(16) 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$(1); 130 GOTO 50 140 NEXT D: G.
7 WIDTH LPRINT 255 10 LPRINT CHR$(27)"1" 20 G$=CHR$(27)+"L"+CHR$(l2l)+CHR$(3): GOSUB 160 30 FOR D=1 TO 17.: PRINT "ROW 40 LPRINT G$; 50 READ L,H 60 L=L*7: H=H*7 70 IF L=0 THEN.
These changes fill in the diagonals as illustrated in Figure 12-9: 100 LPRINT CHR$(1)CHR$(3)CHR$(7)CHR$(15) CHR$(31)CHR$(63)CHR$(127); 120 LPRINT CHR$(127)CHR$(63)CHR$(31)CHR$(15) CHR$(7)CHR$(3)CHR$(1); Figure 12-9.
Figure 12-10. Most distinct version Figure 12-11. Reversed version 172.
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.
Figure 13-1. Computer memory as sketch pad 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- ure 13-2).
Figure 13-3. Ones and zeros become dots and blanks 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 S 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 13-5. Plotting a circle 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=1 TO N: FOR .
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: 50 LPRENT A(R,C);: NEXT C: LPRINT 60 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=1: E=N-6: S=1 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. 10 DEFINT A: N=21: DIM A(N,N) 20 FOR R=1 TO N: FOR C=1 TO N 30 D=SQR((R-11)^2 + (C-11)^2) 40 IF INT(D+.
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 14 and subtracts 5 from it, putting it out of the trouble range. Adjust this test to fit your system.
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.
100 IF Z=2 THEN B=1: E=N-6: S=1 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:.
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 1s and which cells continue to contain 0s.
70 LPRINT CHR$(27)"3"CHR$(20);CHR$(7); 80 B=N: E=7: S=-1 90 FOR Z=1 TO 2 100 IF Z=2 THEN B=1: E=N-6: S=1 110 FOR P=B TO E STEP 7*S 120 PRINT "LOADING ROWS";P;"TO"; P+6*S .
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.
Table 14-1. Variables for SYMMETRY Variable Purpose A Array C Counter of array elements DOT Counter of dots; used to calculate P H Highest number used in calculating P J Loop counter K Loop counter L .
Line 320 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=1 TO C: LPRINT A(K);: NEXT K: LPRINT: LPRINT "C="C and RUN your growing program.
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.
Graphics Width Settings The required graphics width is C, the size of the array. If, however, C is greater than 255, the value n 2 , in the graphics entry string must change from zero to one.
10 DIM A(480): X=1: C=0 20 MAX=5: MIN=1: RE=4: N=0 30 FOR J=1 TO RE 40 N=N+1 50 GOSUB 300 60 IF N<MAX THEN 40 70 N=N-1 80 GOSUB 300 90 IF N>MIN THEN 70 100 NEXT J: PRINT 110 FOR K=1 TO C: PRINT .
Figure 14-4. Symmetric pattern 1 That’s enough to knock your eyes right out of their sockets! And all that from a single one-dimensional array. Variations The computer completely controls your symmetric pattern, dot for dot. Small changes in the program can affect the pattern in a big way.
Figure 14-5. Symmetric pattern 2 Here’s another interesting variation: 20 MAX=64: MIN=1: RE=1: N=1/2 40 N=N*2 70 N=N/2 Figure 14-6. Symmetric pattern 3 Quite a difference! Instead of adding and subtracting one from N, lines 40 and 70 now double and halve it.
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.
198.
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 1-4 controls the use of the FX’s 2K 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 CHR$(27)"&" sequence expects 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 1 and c 2 ), the printer expects 12 data numbers to follow.
To be consistent with the ROM characters, we use only 7 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 same 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 11 instead of 10? 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.
but before you print the user-defined E, make it more visible by adding: 170 LPRINT CHR$(27)"!8"; 190 LPRINT CHR$(27)"!@" Line 170 uses the Master Select code to print Double-Strike, Expanded, Emphasized Pica characters. Line 190 uses the Master Select to return to Pica Mode.
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.
and make these changes: 130 LPRINT CHR$(27)"&"CHR$(0)"rt"; 140 FOR Y=1 TO 3: LPRINT CHR$(139); 160 NEXT Y 180 LPRINT "rst" AR E Line 130 controls the reading of the data. It expects data for three characters: r, s, and t.
Let’s use this command to see how the ROM control codes can print. Add: 2 LPRINT CHR$(27)"6" 4 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.
And add: 1100 DATA 0,121,0,73,0,73,0,73,0,79,0: ’My S 1110 DATA 0,127,0,65,0,65,0,65,0,127,0: 'My Oh SO W 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; they are printed by line 180.
Find 8 in the table; it is in the CHR$(93) row under the Spain heading. To print the character stored in 8, use CHR$(27)“R”CHR$(7) to acti- vate the Spanish character set, and print CHRS(93). Ole! This same technique can be used to access any of the normally unprintable con- trol codes.
12345678SOFTWAR 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.
CHR$(27)“: “CHR$(n 1 )CHR$(n 2 )CHR$(n 3 ) Downloads ROM characters into RAM. All three numbers are 0 CHR$(27)“6” Enables printing of codes 128 to 159 and 255 CHR$(27)”7” Disables printing of codes 128 to 159 and 255 CHR$(27)“11” Enables printing of the codes 0 to 31 except those used as control codes.
214.
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)"1"CHR$(27)"U1"; 100 LPRINT "A" 110 LPRINT "B.
71 = G 103 = g 128 64 32 16 8 4 2 1 128 64 32 16 6 4 2 1 199=G 231=g Figure 16-2. Double high and wide character 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.
Table 16-1. ASCII pattern Pattern Example Roman letter = L G = 72 lowercase letter = L + 32 g = 72 + 32 = 110 Italic letter = L + 128 G = 72 + 128 = 200 Italic lowercase letter = L + 160 g = 72 + 160 .
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; it does the rest.
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. You may want to refer to Figure 5-2 for the other possibilities.
190 'SPACE 200 DATA 32 210 DATA 0,0,0,0,0,0,0,0,0,0,0 220 DATA 0,0,0,0,0,0,0,0,0,0,0 230 DATA 0,0,0,0,0,0,0,0,0,0,0 240 DATA 0,0,0,0,0,0,0,0,0,0,0 310 ’ A 320 DATA 65 330 DATA 0,0,1,0,1,0,6,24,.
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, 48 MESSAGES, 49 MESSAGES, 52 Figure 16-7. Messages in three pitches All three mode combinations include Double-Strike and Expanded print; the only difference between them is the pitch.
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.
210 ' Pattern 220 DATA "00012000", "01665620" 230 DATA "05055050", "16634652" 240 DATA "45621663", "05055050" 250 DATA "04656630", "00043000" Figure 16-9. Interlace Have fun creating your own designs with these characters.
970 DATA 8,0,8,0,127,0,0,0,0,0,0: ’ h 980 DATA 8,0,8,0,127,0,8,0,8,0,8: ' i 990 DATA 8,0,8,0,8,0,8,0,8,0,8: ' j 1000 DATA 0,0,0,0,127,0,0,0,0,0,0: ’ k 1010 DATA 84,0,170,0,84,0,170,0,84,.
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.
Figure 17-1. Barchart In line 130 the parameters for “&” specify that our 14 user-defined characters will be stored at positions 94 to 107 (ASCII symbols ^ to k). Line 140 sets up a READ loop (Y) for the characters and sends the attribute byte—CHRS(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$(11): C$=CHR$(27)+"F" If your system won’t send an 11, change both instances to either 10 or 12.
330 LPRINT H$;H$;"d";: A$="j": GOSUB 800: LPRINT "c" 335 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 310 or 320.
270 FOR M=1 TO 3: LPRINT H$; 280 FOR P=1 TO 3 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$;C.
STRATA SOFTWAR E 80 TRACK DRIVE DATA TOWN, U.S.A. 0124 8 PHONE FX1-0080 STATEMEN T ACCOUNT NO. DATE AMOUNT REMITTED PLEASE DETACH AND RETURN WITH YOUR PAYMENT DATE INVOICE NO.
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.
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$(.
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$; 540 .
1100 DATA 0,121,0,73,0,73,0,73,0,79,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: &apos.
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.
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.
INDEX Note: Refer to Table of Contents and List of Figures for specific programs. Also, the chapter summaries are not indexed. A 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 DIMensioning, 176 Arrow.
C 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.
Control codes, 41-42 Hex dumping and. See Hex dumping for FX compared with those for MX and RX, 287-294 listed by function, 283-286 listed by number, 271-281 See also specific modes and functions Control panel, 35 Conventions used in this manual, iii-vi Core sets of user-defined characters, 223-226 Corvus Concept computers, 151 Covers.
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.
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 ESCape “K”CHR$(n 1 )CHR$(n 2 ). T urns Single-Density Graphics Mode on.
F 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 See also Top of form Forms length of, 103-.
Nine-Pin, 152-154 ESCape “^”CHR$(d)CHR$(n 1 )CHR$(n 2 ) enters Nine-Pin Graphics Mode. reassigning code, 150-152 ESCape “?s”CHR$( n reassigns an alternate code to Graphics ) Mode n. summary table, 151 Grid. See dot matrix H Half-Speed Mode, 89, 322 ESCape “s1” turns it on; ESCape “s0” returns it to normal.
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.
N NEC, 151 Nine-pin graphics. See Graphics Mode Noise reduction. See Half-Speed Mode O Offsets, 82-83 ON LINE light and button, 35 Overstrikes, 81-82 P Page, top of.
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.
S 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.
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.
W Width of characters, 256-270 statements, 313-314 Word processing, 36, 321-322 Z Zero, slashed, 23 251.
Un punto importante, dopo l’acquisto del dispositivo (o anche prima di acquisto) è quello di leggere il manuale. Dobbiamo farlo per diversi motivi semplici:
Se non hai ancora comprato il Epson FX è un buon momento per familiarizzare con i dati di base del prodotto. Prime consultare le pagine iniziali del manuale d’uso, che si trova al di sopra. Dovresti trovare lì i dati tecnici più importanti del Epson FX - in questo modo è possibile verificare se l’apparecchio soddisfa le tue esigenze. Esplorando le pagine segenti del manuali d’uso Epson FX imparerai tutte le caratteristiche del prodotto e le informazioni sul suo funzionamento. Le informazioni sul Epson FX ti aiuteranno sicuramente a prendere una decisione relativa all’acquisto.
In una situazione in cui hai già il Epson FX, ma non hai ancora letto il manuale d’uso, dovresti farlo per le ragioni sopra descritte. Saprai quindi se hai correttamente usato le funzioni disponibili, e se hai commesso errori che possono ridurre la durata di vita del Epson FX.
Tuttavia, uno dei ruoli più importanti per l’utente svolti dal manuale d’uso è quello di aiutare a risolvere i problemi con il Epson FX. Quasi sempre, ci troverai Troubleshooting, cioè i guasti più frequenti e malfunzionamenti del dispositivo Epson FX insieme con le istruzioni su come risolverli. Anche se non si riesci a risolvere il problema, il manuale d’uso ti mostrerà il percorso di ulteriori procedimenti – il contatto con il centro servizio clienti o il servizio più vicino.