home *** CD-ROM | disk | FTP | other *** search
-
- program FX80;
-
- { This program will control most of the frequently used -- and
- also some infrequently used -- configuration parameters for the
- Epson FX80. The code compiles 'as is' using TURBO Pascal. Feel
- free to modify it in any way. A nice project might be a font
- creation routine. Please get word to me concerning any changes.
- I'd like to see them. Go to it!
-
- Mark Davis
- 2315 Mtn Oaks Cir
- Birmingham, AL 35226
-
- }
- { Modified slightly -- to accept generic Epson commands,
- since the RX-80, etc will not respond to the "!" command strings
- which work with the FX-80. Also minor screen changes, including
- ClrScr at entry and exit. Renamed "FXRX80.PAS"
-
- 5/31/85
- Phil Wheeler
- 5539 Towers St
- Torrance, CA 90503
-
- }
- { Modified to send LineFeed and FormFeeds and to trap errors caused
- by input of integers outside the range specified in the case
- statement. Added some FX only commands to turn on Compressed-Elite,
- near letter quality, reset to default type without changing
- other printer settings, turn underline on and off, turn paper
- out sensor on and off, and select sub/superscript. An on screen
- reminder has been added that codes may be combined to produce
- special type faces (i.e., "Tiny Type" may be selected by combining
- subscript, compressed and elite types). Renamed "FX-SET.PAS"
-
- 9/18/87
- Jim Connolly
- 4922 Palo Alto SE
- Albuquerque, NM 87108
-
- }
- type
- Command_type = string[3];
- Prompt_type = string[38];
- var
- Input : byte;
- Exit : boolean;
- Esc : char;
- Command: Command_type;
-
- procedure Give_printer(Command: Command_type);
-
- { Sends a string of up to 3 chars to printer }
-
- begin
- if (Command = chr(12)) or (Command = chr(10)) then
- write(Lst,Command)
- else
- write(Lst, Esc, Command);
- end;
-
- function Get_parm(Prompt: Prompt_type): integer;
-
- { Returns an integer taken after prompt
- for keyboard input.
- }
-
- var parm: integer;
-
- begin
- gotoXY(40,24);
- write(Copy(Prompt,1,Length(Prompt)));
- readln(parm);
- Get_parm := parm;
- gotoXY(40,24);
- ClrEol;
- end;
-
- procedure Scrn_put(X,Y:integer; text:Prompt_type);
-
- { Put a menu line on the screen at X,Y }
-
- begin
- gotoXY(X,Y);
- writeln(Copy(text,1,Length(text)));
- end;
-
- begin
- ClrScr;
- Esc := chr(27);
- textcolor(Green);
- textbackground(Black);
- Scrn_put(24,1,'EPSON FX SETUP PROGRAM');
- textcolor(LightGray);
- Scrn_put(5,2,' 0 - RESET');
- Scrn_put(5,3,' 1 - Elite ON');
- Scrn_put(5,4,' 2 - Elite OFF');
- Scrn_put(5,5,' 3 - Compressed ON');
- Scrn_put(5,6,' 4 - Compressed OFF');
- Scrn_put(5,7,' 5 - Expanded type ON');
- Scrn_put(5,8,' 6 - Expanded type OFF');
- Scrn_put(5,9,' 7 - Emphasized ON');
- Scrn_put(5,10,' 8 - Emphasized OFF');
- Scrn_put(5,11,' 9 - Double-strike ON');
- Scrn_put(5,12,'10 - Double-strike OFF');
- Scrn_put(5,13,'11 - Italics ON');
- Scrn_put(5,14,'12 - Italics OFF');
- Scrn_put(5,15,'13 - Near-Letter-Quality ON');
- Scrn_put(5,16,'14 - Near-Letter-Quality OFF');
- Scrn_put(5,17,'15 - Elite-Compressed Type');
- Scrn_put(5,18,'16 - Reset to Default Type');
- Scrn_put(5,19,'17 - Subscript ON');
- Scrn_put(5,20,'18 - Superscript ON');
- Scrn_put(40,2,'19 - Cancel Sub/Superscript');
- Scrn_put(40,3,'20 - Proportional mode ON');
- Scrn_put(40,4,'21 - Proportional mode OFF');
- Scrn_put(40,5,'22 - Underline ON');
- Scrn_put(40,6,'23 - Underline OFF');
- Scrn_put(40,7,'24 - Paper out sensor OFF');
- Scrn_put(40,8,'25 - Paper out sensor ON');
- Scrn_put(40,9,'26 - Set left margin');
- Scrn_put(40,10,'27 - Set right margin');
- Scrn_put(40,11,'28 - Set form length');
- Scrn_put(40,12,'29 - Skip over perf ON');
- Scrn_put(40,13,'30 - Skip over perf OFF');
- Scrn_put(40,14,'31 - n/72 line spacing');
- Scrn_put(40,15,'32 - n/216 line spacing');
- Scrn_put(40,16,'33 - 1/8 line spacing');
- Scrn_put(40,17,'34 - 1/6 line spacing (standard)');
- Scrn_put(40,18,'35 - Advance to Top of Form');
- Scrn_put(40,19,'36 - Advance 1 Line');
- textcolor(Green);
- Scrn_put(20,21,'Combine options with multiple entries.');
- Scrn_put(28,22,'99 - EXIT TO DOS');
- textcolor(LightGray);
- Exit := false;
- repeat
- begin
- gotoXY(10,24);
- write('Select option by number: ');
- ClrEol;
- read(Input);
-
- { parse Input and select output string }
-
- case Input of
-
- 0 : Command := '@';
- 1 : Command := 'M';
- 2 : Command := 'P';
- 3 : Command := chr(15);
- 4 : Command := chr(18);
- 5 : Command := 'W1';
- 6 : Command := 'W0';
- 7 : Command := 'E';
- 8 : Command := 'F';
- 9 : Command := 'G';
- 10 : Command := 'H';
- 11 : Command := '4';
- 12 : Command := '5';
- 13 : Command := 'x'+'1';
- 14 : Command := 'x'+'0';
- 15 : Command := #15+ESC+#13;
- 16 : Command := 'P';
- 17 : Command := 'S1';
- 18 : Command := 'S0';
- 19 : Command := 'T';
- 20 : Command := 'p1';
- 21 : Command := 'p0';
- 22 : Command := '-1';
- 23 : Command := '-0';
- 24 : Command := '8';
- 25 : Command := '9';
- 26 : Command := 'l'+chr(get_parm('left margin at: '));
- 27 : Command := 'Q'+chr(get_parm('right margin at: '));
- 28 : Command := 'C'+chr(get_parm('form length: '));
- 29 : Command := 'N'+chr(get_parm('number of lines: '));
- 30 : Command := 'O';
- 31 : Command := 'A'+chr(get_parm('n/72 spacing, n = '));
- 32 : Command := '3'+chr(get_parm('n/216 spacing, n = '));
- 33 : Command := '0';
- 34 : Command := '2';
- 35 : Command := chr(12);
- 36 : Command := chr(10);
- 99 : Exit := True;
- else
- Command := chr(7);
-
- end; {case}
-
- if not Exit then Give_printer(Command);
-
- end; {until}
-
- until Exit;
- ClrScr;
-
- end.