1 LISP LIBRARY PACKAGES MANUAL 1 LISP LIBRARY PACKAGES FXPRINTER 1 PRINTING 1 FXPRINTER 6 FXPrinter allows, through the functions that it holds, a user to print Lisp files to an Epson FX-80 printer. Following is the documentation that shows how to use this interface program. For the functions to work properly, the Epson Intelligent Serial Interface (Cat. No. 8148) must be installed on the Epson printer. This interface allows 2K bytes of storage (frequently, the printer will be running at half speed so that storage will be necessary). The serial interface has a series of dip switches that must be correctly set in order for proper interfacing between Lisp machine and printer to take place. Although some of these are factory set, it is a good idea to check all of them before starting off. There are two switch boards, located at the open end of the interface board. Tables one and two on pages four and five of the Intelligent Serial Interface user manual instruct the user how these settings should be. Those of immediate interest are: 1. Bit rate selection. This should be set to the rate selected when queried by the program. Switches 1-5, 1-6, 1-7, and 1-8 control the rate setting, and should be set at ON OFF ON OFF for 300-baud rate, ON OFF OFF OFF for 1200-baud rate, OFF ON ON OFF for 2400-baud, OFF ON OFF ON for 4800-baud, or OFF ON OFF OFF for 9600-baud. The fastest that the printer-1108 interface can run at is 9600 baud. 2. Flag reset timing selection. The serial interface will take in 2K of characters, and then send a flag across to the transmitting machine that the buffer is full. The interface will then clear a designated amount of the buffer before resetting the flag and allowing more information to be sent. The reset timing is initially set to 152 bytes, and must be changed to 1,936 bytes in order for proper interfacing at baud rates above 1200. Switches 2-3 and 2-4 control the flag reset selection, and should both be set to ON . All other switch settings are factory set correctly for proper interfacing. That is, switches 1-1, 1-2, 1-3, 1-4, 2-5, and 2-6 should be OFF, and switches 2-1 and 2-2 should be ON. 2 Cable Connections Between 1108 and Printer 1 For the connection between the 1108 and the Epson printer, a cable must be made up as specified below. This cable interfaces the Epson Serial Interface and the RS232 port at the back of the 1108. The cable is a male-to-male, 6-conductor, 25-pin connector. Pin connections go straight through as follows: Pin 1 goes through to pin 1, pin 2 to pin 2, pin 3 to pin 3, 6 to 6, 7 to 7, and 20 to 20. On the 1108 end, pins 4 and 8 should be jumpered together. 2 Running RS232.PRINT 1 After loading the file FXPRINTER.DCOM, call the function RS232.PRINT with the file, bit map, or window to be printed as its argument, e.g., (RS232.PRINT 'FOOFILE). The function will then query the user to see if the paper is correctly set. If no answer is given, it will default as no, and ask the user again, until a response of Y(es) is given. Next, the user is asked which bit rate setting he/she wishes to use. If no answer is received within 60 seconds, the default of 1200 baud is used. Note: Make sure that the setting specified during program operation is the same as that set on the Epson printer. Also note: When bit maps and windows are printed using the FXPrinter code, they are rotated by a negative 90 degrees on the page. If this is undesirable, call the function RS232.PRINT with the second argument non-NIL, e.g., (RS232.PRINT 'FOOBITMAP T). Bit maps may be printed in two sizes; normally the bit map is printed using a large size. If a small size is desired, then call the function RS232.PRINT with the fourth argument non-NIL, e.g., (RS232.PRINT 'FOOBITMAP NIL NIL T). This will cause FOOBITMAP to be printed about half the size. The query for baud rate selection marks the last of the user interaction with the program. At this point the file is printed out with all fonts set in the file intact. The paper perforations are automatically skipped over if a file is being printed out (this depends on proper initial paper setting, so the paper should be set correctly at the beginning) and the end of file marks the end of the program. If the user already has the printer set up correctly, and wants the baud rate to be 9600, he/she can avoid the queries made by the program by setting the third argument to a non-NIL value. This will cause the program to skip the inquiries, use 9600 baud as the rate the computer is set to, and begin printing immediately. An example is (RS232.PRINT ABITMAP NIL T). This informs the function that the bit map ABITMAP is to be printed, it may be printed rotated by -90 degrees (which will allow the printing to take place faster, using a quicker bit map access function) the bit map is to be printed in the large-size mode (which is faster still, using a quicker printing process), and questions about baud rate and paper position may be avoided (i.e., assume the paper is in position, and the baud rate is set at 9600), so that printing starts immediately. Printing out a file takes place the same way, except that the second and third arguments are discarded by the program, since a file cannot be rotated on a page or shrunk (in other words, calling (RS232.PRINT 'FOOFILE T T T) will not cause the file to be rotated or shrunk down, but will cause the queries to be skipped). Since printing a window will first have the window transformed into a bit map, call the function RS232.PRINT the same way for a window as for a bit map. A quick recap on calling the FXPrinter code: RS232.PRINT has the format: (RS232.PRINT FILENAME NOROTATE? STANDARD.SETUP COMPRESS?) Where FILENAME is a file or a bit map, NOROTATE? determines if the bit map is to be rotated or not, COMPRESS? determines if the bit map is to be compressed or not, and STANDARD.SETUP determines if the computer is to avoid asking questions by using a standard setup form. 1. For a file: a) (RS232.PRINT 'THEFILE), or b) (RS232.PRINT 'THEFILE NIL T), to avoid queries on paper position and baud rate selection. 2. For a bit map or window: a) (RS232.PRINT ABITMAP), or b) (RS232.PRINT ABITMAP T), so that there is no rotation of the image on the page, or c) (RS232.PRINT ABITMAP T T), so that there is no rotation and there are no queries from the computer (this will run slower due to the avoidance of rotating the bit map), or d) (RS232.PRINT ABITMAP NIL T), so that there is rotation of the image, and no user interaction with the computer. e) (RS232.PRINT ABITMAP NIL NIL T), which does the same as (a), except prints the bit map smaller than in (a), or f) (RS232.PRINT ABITMAP T NIL T), so that there is no rotation, as in (b), or g) (RS232.PRINT ABITMAP NIL T T), or h) (RS232.PRINT ABITMAP T T T), so that there are no questions. Notes 1 1 If using the FX80 as your default printer, the DEFAULTPRINTINGHOST must be set to 'FX80 or to a list of printers with 'FX80 as the first element. You may wish to set a variable called DEFAULTLOCALBAUDRATE to the desired baud rate to avoid being asked to specify it every time. Likewise, you may set a variable called SUPPRESS.PAPER.SET.FLAG to true in order to avoid continuous prompting. If you ask to print a bit map that is too large to fit on the page as specified, the computer will determine a way of printing the bit map (trying to preserve the size), and will ask if you want the bit map printed that way. By responding yes, you will get the bit map printed the way the computer did it. Responding no prints the bit map the way the settings were originally set, and responding abort will cause the computer to not print the bit map. At the moment, TEdit and Press files may not be printed on the FX80.(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC ) STARTINGPAGE# 261) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (270 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (270 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))))) )T..)2T)T(( )T)TB PAGEHEADING VERSOHEADB PAGEHEADING RECTOHEADA PAGEHEADINGFOOTINGVA PAGEHEADINGFOOTINGRMODERN MODERN MODERN MODERNMODERNMODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN     HRULE.GETFNMODERN    HRULE.GETFNMODERN   HRULE.GETFNMODERN (("%!FY HRULE.GETFNMODERN+ HRULE.GETFNMODERNl"  ; HRULE.GETFNMODERN HRULE.GETFNMODERN]~r-% !_XvsQ&A HRULE.GETFNMODERN  HRULE.GETFNpDz