home *** CD-ROM | disk | FTP | other *** search
- {
-
- PRINTER SETUP FOR THE IBM CONFIGURED OKIDATA 192 - 193
- Modified for Okidata 390 - 391 Epson & IBM Proporinter Mode 9\88
-
- Select fonts, print quality, line spacing, form length, margins, alternate
- character sets, special functions, default setup, printer test
- by Norman Newbury, January 1987 *** FOR PUBLIC DOMAIN USE ***
-
-
- }
-
- program okiprint;
-
- uses
- Crt, Printer, Oki390;
-
- type
- AnyString = String[80]; { type for Center procedure }
- const
- Beep : Char = ^G; { beep the console on error }
- Working : Boolean = true; { loop control for main program }
- Done : Boolean = false; { loop control for procedures }
- IBM2 : Boolean = false; { flag for IBM character set 2 }
- IOerr : Boolean = false; { for I/O error handling }
- SetStr : String[20] = 'ASCII unslashed 0'; { character set name }
-
- Text : Integer = 11; { Screen colors can be changed here }
- Back : Integer = 0; { by changing integer values. }
- Border : Integer = 14; { 0 to 15 for regular non─blinking }
- Bold : Integer = 15; { }
- var
- I : Integer; { loop counter }
- Ch : Char; { characters read from keyboard }
- OrigMode : Word;
-
-
- {****************************************************************************}
- {* *}
- {* SCREENS *}
- {* *}
- {****************************************************************************}
-
-
- Procedure ClearBox(X1,Y1,X2,Y2 : Integer);
- begin
- Window(X1,Y1,X2,Y2);
- ClrScr;
- Window(1,1,80,25);
- end; { of procedure ClearBox }
-
- procedure Center(x,y : Integer; Text : AnyString); { Centers any string on }
- begin { the screen }
- if y < 0 then y := 12;
- if x < 0 then x := (80-Length(Text)) Div 2; { negative num for x or y }
- GotoXY(x,y);Write(Text); { centers side to side or }
- end; { of procedure Center } { top to bottom or both }
-
-
- procedure FirstScreen;
- begin
- TextColor(Border); TextBackground(Back);
- ClearBox(1,1,80,40);
- GotoXY(1,1);Write(Chr(201)); { upper left corner }
- GotoXY(80,1);Write(Chr(187)); { upper right corner }
- for I := 2 to 23 do begin
- GotoXY(1,I);Write(Chr(186)); { vertical borders }
- GotoXY(80,I);Write(Chr(186));
- end;
- GotoXY(1,24);Write(Chr(200)); { lower left corner }
- GotoXY(80,24);Write(Chr(188)); { lower right croner }
- GotoXY(1,4);Write(Chr(204)); { left intersection }
- GotoXY(1,21);Write(Chr(204)); { left intersection }
- GotoXY(80,4);Write(Chr(185)); { right intersection }
- GotoXY(80,21);Write(Chr(185)); { right intersection }
- for I := 2 to 79 do begin
- GotoXY(I,1);Write(Chr(205)); { horizontal borders }
- GotoXY(I,4);Write(Chr(205));
- GotoXY(I,21);Write(Chr(205));
- GotoXY(I,24);Write(Chr(205));
- end;
- Textcolor(Text);
- Center(-1,2,
- 'PRINTER SETUP FOR THE EPSON OR IBM CONFIGURED OKIDATA MICROLINE 390 OR 391');
- GotoXY(25,7);Write('Written 1/87 by Norman Newbury');
- GotoXY(25,8);Write(' Modified 9/88 by S. Kline');
- GotoXY(12,11);
- Write('This Program is free to any one who wants it so long as');
- GotoXY(12,12);
- Write('it is not sold. I encourage you to copy and pass it on.');
- Center(-1,16,'Printer must be ready or program will not run');
- TextColor(Bold);
- Center(-1,22,'PREPARE PRINTER FOR OPERATION');
- Center(-1,23,'PRESS ANY KEY TO CONTINUE');
- GotoXY(12,16);TextColor(Border + Blink);Write('==>');
- CH:=Readkey;
- end;{ of procedure FirstScreen }
-
-
- procedure DoneScreen;
- begin
- ClearBox(2,5,78,20);
- TextColor(Text);
- Center(-1,-1,'PRINTER HAS YOUR SELECTION ');
- delay(1000);
- end; { DoneScreen }
-
-
- procedure MainMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(27,6); Write('1 - PRINT SIZE AND QUALITY');
- GotoXY(27,8); Write('2 - SET LINE SPACING');
- GotoXY(27,10);Write('3 - SET MARGINS');
- GotoXY(27,12);Write('4 - SELECT FANCY SETS');
- GotoXY(27,14);Write('5 - SELECT LANGUAGE SET');
- GotoXY(27,16);Write('6 - SPECIAL FUNCTIONS');
- GotoXY(27,18);Write('7 - ENGAGE DEFAULT SETTINGS');
- GotoXY(27,20);Write('8 - PRINT TEST');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'MAIN MENU');
- Center(-1,23,'Press 1 - 8 To Select a Task');
- TextColor(Bold);
- Center(-1,22,'Esc TO EXIT PROGRAM');
- end; { of procedure MainMenu }
-
-
- procedure FontMenu;
- begin
- TextColor(Text); TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(23,6); Write('1 - PICA.................. 10 CPI');
- GotoXY(23,8); Write('2 - ELITE................. 12 CPI');
- GotoXY(23,10);Write('3 - CONDENSED............. 15 CPI');
- GotoXY(23,12);Write('4 - PICA COMPRESSED....... 17 CPI');
- GotoXY(23,14);Write('5 - ELITE COMPRESSED...... 20 CPI');
- GotoXY(23,16);Write('6 - DOUBLE WIDE PICA...... 5 CPI');
- GotoXY(23,18);Write('7 - DOUBLE WIDE ELITE..... 6 CPI');
- GotoXY(23,20);Write('8 - DOUBLE WIDE CONDENSED 8.5 CPI');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'FONT SELECTION');
- Center(-1,23,'Press 1 - 8 To Select a Font');
- end; { Font Menu }
-
-
- procedure QualityMenu;
- begin
- ClearBox(2,5,78,20);
- GotoXY(27,8); Write('1 - NORMAL DATA PROCESSING');
- GotoXY(27,10);Write('2 - LETTER QUALITY');
- GotoXY(27,12);Write('3 - ENHANCED');
- GotoXY(27,14);Write('4 - EMPHASIZED');
- GotoXY(27,16);Write('5 - ENHANCED AND EMPHASIZED');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'PRINT QUALITY MENU');
- Center(-1,23,'Press 1 - 5 To Select Impact Quality');
- end; { QualityMenu }
-
-
- procedure LineSpaceMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(25,8); Write('1 - 6 LINES PER INCH');
- GotoXY(25,10);Write('2 - 8 LINES PER INCH');
- GotoXY(25,12);Write('3 - VARIABLE LINE SPACING (max N is 127)');
- GotoXY(25,14);Write('4 - N/180 FINE LINE SPACING (max N is 255)');
- GotoXY(25,16);Write('5 - N/360 (max N is 255)');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'LINE SPACING MENU');
- Center(-1,23,'Press 1 - 5 To Set Line Spacing ');
- TextColor(Bold);
- Center(-1,22,'Esc TO RETURN TO MAIN MENU');
- end; { of LineSpaceMenu }
-
-
- procedure MarginsMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(22,9) ;Write('1 - SET LEFT MARGIN');
- GotoXY(22,11);Write('2 - SET RIGHT MARGIN');
- GotoXY(22,13);Write('3 - RESET MARGINS TO COLUMNS 1 - 80 ');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'MARGINS MENU');
- Center(-1,23,'Press 1 - 3 To Set Margins');
- TextColor(Bold);
- Center(-1,22,'Esc TO RETURN TO PREVIOUS MENU');
- end; { of Margins Menu }
-
-
- procedure LanguageSetMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXy(28,7); Write('1 - ASCII (slashed 0)');
- GotoXy(28,8); Write('2 - LATIN AMERICAN (IBM - ASCII unslashed 0)');
- GotoXy(28,9); Write('3 - BRITISH');
- GotoXy(28,10);Write('4 - GERMAN');
- GotoXy(28,11);Write('5 - FRENCH');
- GotoXy(28,12);Write('6 - SWEDISH');
- GotoXy(28,13);Write('7 - DANISH I');
- GotoXy(28,14);Write('8 - NORWEGIAN');
- GotoXy(28,15);Write('9 - DANISH II (IBM - DUTCH)');
- GotoXy(28,16);Write('I - ITALIAN');
- GotoXy(28,17);Write('F - FRENCH CANADIAN');
- GotoXy(28,18);Write('S - SPANISH');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'LANGUAGE SET MENU');
- Center(-1,23,'Press 1 - S To Select a Language Set');
- TextColor(Bold);
- Center(-1,22,'Esc TO RETURN TO MAIN MENU');
- end; { of language set menu }
-
-
- procedure CharacterSetMenu;
- begin
- TextColor(Text); TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(23,6); Write('1 - PROPORTIONAL.......... 10 CPI');
- GotoXY(23,8); Write('2 - PROPORTIONAL DOUBLE... 5 CPI');
- GotoXY(23,10);Write('3 - PROPORTIONAL CONDENSED 17 CPI');
- GotoXY(23,12);Write('4 - DOUBLE HEIGHT................');
- GotoXY(23,14);Write('5 - ITALICS ON...................');
- GotoXY(23,16);Write('6 - IBM SET 1....................');
- GotoXY(23,18);Write('7 - IBM SET 2....................');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'FONT SELECTION');
- Center(-1,23,'Press 1 - 7 To Select a Font');
- end; { Font Menu }
-
-
-
- procedure SpecialFunctionMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(24,9); Write('1 - SKIP OVER PERFORATION');
- GotoXY(24,11); Write('2 - SET FORM LENGTH');
- GotoXY(24,13);Write('3 - PRINTHEAD LEFT TO RIGHT ONLY');
- GotoXY(24,15);Write('4 - PRINTHEAD BIDIRECTIONAL');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'SPECIAL FUNCTIONS MENU');
- Center(-1,23,'Press 1 - 4 To Set a Special Function');
- TextColor(Bold);
- Center(-1,22,'Esc TO RETURN TO MAIN MENU');
- end; { of SpecialFunctionMenu }
-
-
- procedure PrintTestMenu;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(15,7);
- Write('If you are using paper less than the full carriage');
- GotoXY(15,8);
- Write('width you could print off the form with this test.');
- Center(-1,10,'Set your right margin if necessary.');
- GotoXY(23,15);Write('1 - DO THE PRINT TEST');
- GotoXY(23,17);Write('2 - SET MARGINS BEFORE PRINT TEST');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'PRINT TEST MENU');
- Center(-1,23,'Press 1 - 2 To Set Up The Print Test');
- TextColor(Bold);
- Center(-1,22,'Esc EXIT TO MAIN MENU (no test)');
- end; { of procedure PrintTestMenu }
-
-
- Procedure DefaultScreen;
- begin
- TextColor(Text);TextBackground(Back);
- ClearBox(2,5,78,20);
- GotoXY(27,8); Write('PICA FONT DATA PROCESSING MODE');
- GotoXY(27,9); Write('6 LINES PER INCH');
- GotoXY(27,10);Write('66 LINES PER PAGE');
- GotoXY(27,11);Write('11 INCH PAGE LINGTH');
- GotoXY(27,12);Write('RESET MARGINS TO COLUMN 1 - 80 ');
- GotoXY(27,13);Write('PERFORATION SKIP to DEFAULT');
- GotoXY(27,14);Write('BIDIRECTIONAL PRINTING');
- ClearBox(2,2,78,3);ClearBox(2,22,78,23);
- Center(-1,2,'DEFAULTS SELECTED');
- TextColor(Bold);
- Center(-1,23,'PRESS ANY KEY TO CONTINUE');
- end; { of defaultScreen }
-
-
- {****************************************************************************}
- {* *}
- {* UTILITY PROCEDURES *}
- {* *}
- {****************************************************************************}
-
-
- procedure ResetPrintMode; { clears special print & returns DP mode}
- begin
- { Write(Lst,Rset);} { Reset to default }
- Write(Lst,Enhanced_Off); { enhanced off }
- Write(Lst,Emphasized_Off); { emphasized off }
- Write(Lst,Utility); { data processing mode }
- Write(Lst,Pica); { pica - 10 cpi }
- end; { of ResetPrintMode}
-
-
- procedure SkipPerf; { sets printer to skip over perforation }
- var Lines : Integer;
- begin
- ClearBox(2,22,78,23);TextColor(Text);
- Center(-1,23,'Range is 0 - 127 lines');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);
- Center(-1,5,'A Value of 0 resets it to the default.');
- Center(-1,-1,'ENTER NUMBER OF LINES TO SKIP AT PERFORATION ');
- Read(Lines); IOerr := (IOresult<>0);
- if IOerr or (Lines < 0) or (Lines > 127) then begin
- Center(-1,14,'Error, try again'+ Beep);
- end; { of if error }
- until (Lines >= 0) and (Lines <128) and not IOerr;
- {$I+} { compiler directive }
- if Lines = 0 then Write(Lst,Default_Perf)
- else Write(Lst,Set_Perf_Skip,Chr(Lines)); { set perf skip }
- end; { of procedure SkipPerf }
-
-
-
- procedure FormLength; { sets form length 1 to 22 inches }
- var Inches : Integer;
- begin
- ClearBox(2,22,78,23);TextColor(text);
- Center(-1,23,'Range is 1 - 22 inches');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);
- Center(-1,-1,'ENTER FORM LENGTH IN INCHES ');
- Read(Inches); IOerr := (IOresult<>0);
- if IOerr or (Inches < 1) or (Inches > 22) then begin
- Center(-1,14,'Error, try again' + Beep);
- end; { of if error }
- until (Inches > 0) and (Inches < 23) and not IOerr;
- {$I+} { compiler directive }
- Write(Lst,Set_Form_Length,Chr(Inches)); { set form length }
- DoneScreen;
- end; { of procedure FormLength }
-
-
- {****************************************************************************}
- {* *}
- {* FONT SELECTION *}
- {* *}
- {****************************************************************************}
-
-
- {function Correct_Mode(var LQ : string; tipe :string): string;
-
- var
- LQ1,S : string;
- T : byte;
- Code : integer;
-
- begin
-
- LQ1:=LQ;LQ:='';
- GoToXY(20,LastRow);Write(LQ1);
- S:=Copy(Tipe,19,2);
- Val(S,T,Code);
- T:=ABS(T)+Abs(2);
- Str(T,S);
- Insert(S,LQ1,19);
- Delete(LQ1,21,1);
- LQ:=LQ1;
- end;}
-
- procedure SelectFont(IBM_Mode : boolean);
- const Condensed : Boolean = false;
- var
- Pic,El,Con : Boolean;
-
- begin
- Pic:=False;El:=False;Con:=False;
- FontMenu; ResetPrintMode; Condensed := false;
- repeat
- Ch:=Readkey;
- until (Ch IN ['1','2','3','4','5','6','7','8']);
- case Ch of
- '1' : Begin
- Write(Lst,Pica); { pica - 10 char/inch }
- Pic:=True;
- end;
- '2' : Begin
- Write(Lst,Elite); { elite - 12 char/inch }
- El:=True;
- end;
- '3' : Begin
- Write(Lst,Condense); { condensed - 15 char }
- Con:=True;
- end;
- '4' : Begin
- Write(Lst,Compress,Pica ); { pica compressed}
- Pic:=True;
- { Condense := True;}
- end;
- '5' : Begin
- Write(Lst,Compress,Elite); { elite compressed}
- El:=True;
- { Condensed := True; }
- end;
- '6' : Begin
- Write(Lst,Pica, { pica }
- Double_Wide); { double wide on }
- Pic:=True;
- end;
- '7' : Begin
- Write(Lst,Elite, { elite }
- Double_Wide); { double wide on }
- El:=True;
- end;
- '8' : Begin
- Write(Lst,Compress,Pica,
- Double_Wide);
- Pic:=True;
- end;
- end; { of case }
- If not Condensed then begin { data processing only }
- QualityMenu; { with condensed font }
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2','3','4','5']);
- write(mode);
- case Ch of
- '1' : write(Lst,Utility); { data processing }
- '2' : Begin
- if NOT IBM_Mode then
- Write(Lst,LQ);
- if IBM_Mode then
- begin
- if Pic then
- Write(Lst,LQ,CHR(2));
- if El then
- Write(Lst,LQ,CHR(10));
- if Con then
- Write(Lst,LQ,Chr(26));
- end;
- end;
- '3' : Write(Lst,Enhanced_On); { enhanced }
- '4' : Write(Lst,Emphasis_On); { emphasized }
- '5' : Write(Lst,Enhanced_Emphasis_On); { both emphasized and }
- { enhanced printing }
- end; { of case }
- end; { of if not condensed }
- DoneScreen;
- end; { of SelectFont }
-
- {****************************************************************************}
- {* *}
- {* LINE SPACING *}
- {* *}
- {****************************************************************************}
-
-
- procedure SetLineSpacing;
- var N : Integer;
- begin
- LineSpaceMenu;TextColor(Text); Done := false;
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2','3','4','5','6',#27]);
- case Ch of
- '1' : Write(Lst,Six_Lines); { 1/6 spacing (12/72) }
- '2' : Write(Lst,Eight_Lines); { 1/8 spacing }
- '3' : begin
- ClearBox(2,22,78,23);
- Center(-1,23,'Range is 1 - 255');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);
- Center(-1,-1,'ENTER Variable Line Space VALUE ');
- Read(N); IOerr := (IOresult<>0);
- if IOerr or (N < 1) or (N > 255) then begin
- Center(-1,14,'Error, try again'+ Beep);
- end; { of if error }
- until (N > 0) and (N < 256) and not IOerr;
- {$I+} { compiler directive }
- Write(Lst,Var_Line,Chr(N)); { set spacing to N/72 }
- end;
- '4' : begin
- ClearBox(2,22,78,23);
- Center(-1,23,'Range is 1 - 255');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);
- Center(-1,-1,'ENTER (N/216) VALUE ');
- Read(N);IOerr := (IOresult<>0);
- if IOerr or (N < 1) or (N > 255) then begin
- Center(-1,14,'Error, try again'+ Beep);
- end; { of if error }
- until (N > 0) and (N < 256) and not IOerr;
- {$I+} { compiler directive }
- Write(Lst,Fine_Line,Chr(N)); { set spacing to N/216 }
- end;
- '5' : begin
- ClearBox(2,22,78,23);
- Center(-1,23,'Range is 1 - 255');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);
- Center(-1,-1,'ENTER (N/360) VALUE ');
- Read(N);IOerr := (IOresult<>0);
- if IOerr or (N < 1) or (N > 255) then begin
- Center(-1,14,'Error, try again'+ Beep);
- end; { of if error }
- until (N > 0) and (N < 256) and not IOerr;
- {$I+} { compiler directive }
- Write(Lst,N360,Chr(N)); { set spacing to N/360 }
- end;
- #27 : Done := true;
- end; { of case }
- if not Done then begin SkipPerf; DoneScreen; end;
- end; { of SetLineSpacing }
-
-
- {****************************************************************************}
- {* *}
- {* SET MARGINS *}
- {* *}
- {****************************************************************************}
-
-
- procedure SetMargins;
- var
- Left,Right : Integer;
- begin
- MarginsMenu;Done := false;
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2','3',#27]);
- case Ch of
- '1' : begin
- ClearBox(2,22,78,23);
- Center(-1,23,'Minimum between left and right is 10');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);TextColor(Text);
- Center(-1,-1,'ENTER LEFT COLUMN NUMBER ');
- Read(Left); IOerr := (IOresult<>0);
- if IOerr or (Left < 1) or (Left > 255) then begin
- Center(-1,15,'Error try again'+ Beep);
- end; { of if error }
- until not IOerr and ((Left >= 1) and (Left <= 255));
- {$I+} { compiler directive}
- Write(Lst,Left_Margin,Chr(Left)); { set left margin }
- end; { of case '1' }
- '2' : begin
- ClearBox(2,22,78,23);
- Center(-1,23,'Minimum between left and right is 10');
- {$I-} { compiler directive }
- repeat
- ClearBox(2,5,78,20);TextColor(Text);
- Center(-1,10,'Left margin set at column ');
- Write(Left);
- Center(-1,14,' ENTER RIGHT COLUMN NUMBER ');
- Read(Right);IOerr := (IOresult<>0);
- if IOerr or (Right-Left < 10) or (Right > 255) then begin
- Center(-1,16,'Error, try again'+ Beep);
- end; { of if error }
- until not IOerr and (((Right-Left) >= 10) and (Right <= 255));
- {$I+}
- Write(Lst,Right_Margin,Chr(Right));
- end { of case '2'};
- '3' : write(Lst,Set_Both_Margins); { reset to 1 - 80 }
- #27 : Done := true;
- end; { of case }
- if not Done then DoneScreen;
- end; { Set Margins }
-
-
- {****************************************************************************}
- {* *}
- {* CHARACTER SETS *}
- {* *}
- {****************************************************************************}
-
-
- procedure SelectCharacterSet;
- const Condensed : Boolean = false;
- begin
- CharacterSetMenu; ResetPrintMode; Condensed := false;
- repeat
- Ch:=Readkey;
- until (Ch IN ['1','2','3','4','5','6','7']);
- case Ch of
- '1' : Write(Lst,Proportional); { proportional}
- '2' : Write(Lst,Proportional_Double); { proportional double}
- '3' : Write(Lst,Proportional_Double_Condense); { proportional double condensed}
- '4' : Write(Lst,Double_Height); { double height}
- '5' : Write(Lst,Italics); { Italics On}
- '6' : Write(Lst,IBM1); { IBM 1}
- '7' : Write(Lst,IBM2A); { IBM 2}
- end; { of case }
- if not Done then DoneScreen;
- end; { SelectCharacterSet }
-
-
-
-
- {****************************************************************************}
- {* *}
- {* LANGUAGE SETS *}
- {* *}
- {****************************************************************************}
-
-
- procedure SelectLanguageSet;
- begin
- LanguageSetMenu;Done := false;
- repeat
- CH:=ReadKey;
- Ch := UpCase(Ch);
- until (Ch IN ['1','2','3','4','5','6','7','8','9','I','F','S',#27]);
- case Ch of
- '1' : begin
- Write(Lst,USA);
- SetStr := 'ASCII slashed 0';
- end;
- '2' : begin
- Write(Lst,LATIN_AMERICAN);
- SetStr := 'Latin American';
- end;
- '3' : begin
- Write(Lst,BRITISH);SetStr := 'British';
- end;
- '4' : begin
- Write(Lst,GERMAN);SetStr := 'German';
- end;
- '5' : begin
- Write(Lst,FRENCH);SetStr := 'French';
- end;
- '6' : begin
- Write(Lst,SWEDISH);SetStr := 'Swedish';
- end;
- '7' : begin
- Write(Lst,DANISH_I);SetStr := 'Danish I';
- end;
- '8' : begin
- Write(Lst,NORWEGIAN);SetStr := 'Norwegian';
- end;
- '9' : begin
- Write(Lst,DANISH_II);SetStr := 'Danish II';
- end;
- 'I' : begin
- Write(Lst,ITALIAN);SetStr := 'Italian';
- end;
- 'F' : begin
- Write(Lst,FRENCH_CANADIAN);
- SetStr := 'French Canadian';
- end;
- 'S' : begin
- Write(Lst,SPANISH);SetStr := 'Spanish';
- end;
- #27 : Done := true;
- end; { of case }
- if not Done then DoneScreen;
- end; { SelectLanguageSet }
-
-
-
- {****************************************************************************}
- {* *}
- {* SPECIAL FUNCTIONS *}
- {* *}
- {****************************************************************************}
-
-
- procedure SelectSpecialFunction;
- begin
- Done := false;
- While not Done do begin
- SpecialFunctionMenu;
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2','3','4',#27]);
- case Ch of
- '1' : begin SkipPerf; DoneScreen; end;
- '2' : begin FormLength; SkipPerf; DoneScreen; end;
- '3' : begin
- Write(Lst,UNIDIRECTIONAL); { printhead l to r }
- DoneScreen;
- end;
- '4' : begin
- Write(Lst,BIDIRECTIONAL); { printhead l and r }
- DoneScreen;
- end;
- #27 : Done := true;
- end; { of case }
- end; { of while not done }
- end; { SelectSpecialFunction }
-
-
- {****************************************************************************}
- {* *}
- {* ENGAGE DEFAULTS *}
- {* *}
- {****************************************************************************}
-
-
- procedure EngageDefaults; { Epson mode - back to system startup }
- begin
- DefaultScreen;
- ResetPrintMode;
- Write(Lst,PICA); { PICA }
- Write(Lst,SIX_LINES); { 6 Lines per Inch }
- Write(Lst,FORM_LENGTH_11); { Form Length 11 inches }
- Write(Lst,Default_Perf); { skip over perforation }
- Write(Lst,LEFT_MARGIN_1, { Left Margin 1 }
- RIGHT_MARGIN_80); { Right Margin 80 }
- Write(Lst,BIDIRECTIONAL); { Bidirectional Printing }
- CH:=ReadKey;
- end; { EngageDefaults }
-
-
- {****************************************************************************}
- {* *}
- {* PRINT TEST *}
- {* *}
- {****************************************************************************}
-
-
- procedure DoPrintTest;
- var
- Index : Integer; { array index }
- Counter : Integer; { character counter }
- Code : String[3]; { holds ASCII code }
- PrintStr : Array[1..255] of String [6]; { array of print str}
- begin
- Done := false;
- while not Done do begin
- PrintTestMenu;
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2',#27]);
- case Ch of
- '1' : begin
- Index := 0;Counter := 0;
- for I := 1 to 6 do WriteLn(Lst);
- if IBM2
- then Write(Lst,'IBM set 2, ')
- else Write(Lst,'IBM set 1, ');
- WriteLn(Lst,'Language set: ',SetStr);
- WriteLn(Lst,'┌─────────────────────────────┐');
- WriteLn(Lst,'│Special for this language set│');
- WriteLn(Lst,'├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤');
- WriteLn(Lst,'│#│&│0│@│O│[│\│]│^│_│`│{│|│}│~│');
- WriteLn(Lst,'└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘');
- WriteLn(Lst);
- WriteLn(Lst,'TEST LINE TEST LINE;test line test line');
- WriteLn(Lst,'TEST LINE TEST LINE;test line test line');
- WriteLn(Lst,'233 columns, (the maximum possible)');
- Write(Lst,'L--------10--------20--------30--------4');
- Write(Lst,'0--------50--------60--------70--------8');
- Write(Lst,'0--------90--------100-------110-------1');
- Write(Lst,'20-------130-------140-------150-------1');
- Write(Lst,'60-------170-------180-------190-------2');
- Write(Lst,'00-------210-------220-------230R');
- WriteLn(Lst);WriteLn(Lst);
- WriteLn(Lst,'Printable characters for ',SetStr);
- WriteLn(Lst,'─────────────────────────────────────────');
- if IBM2 then begin { start building array }
- for I := 3 to 6 do begin
- Index := Index +1;Str(I,Code);
- PrintStr[Index] := Code+' '+Chr(I)+'│';
- Write(Lst,Chr(I));
- end;
- Index := Index +1;
- PrintStr[Index] := '21'+' '+Chr(21)+'│';
- Write(Lst,Chr(21));
- end;
- for I := 33 to 99 do begin
- Index := Index +1;Str(I,Code);
- PrintStr[Index] := Code+' '+Chr(I)+'│';
- Write(Lst,Chr(I));
- end;
- for I := 100 to 126 do begin
- Index := Index +1;Str(I,Code);
- PrintStr[Index] := Code+' '+Chr(I)+'│';
- Write(Lst,Chr(I));
- end;
- if IBM2 then I := 128 else I := 160;
- for I := I to 254 do begin
- Index := Index +1;Str(I,Code);
- PrintStr[Index] := Code+' '+Chr(I)+'│';
- Write(Lst,Chr(I));
- end;
- WriteLn(Lst);WriteLn(Lst);WriteLn(Lst);
- for I := 1 to Index do begin { print out the array }
- Write(Lst,PrintStr[I]);
- Counter := Counter +1;
- if Counter >= 8 then begin
- Write(Lst,Chr(10),Chr(13));
- Counter := 0;
- end;
- end;
- Done := true;
- Write(Lst,Chr(27),Chr(60),Chr(12));
- end; { of case 1 }
- '2' : begin SetMargins;Done := false; end;
- #27 : Done := true;
- end; { of case '1' }
- end; { of while }
- end; { DoPrintTestn }
-
-
- {****************************************************************************}
- {* *}
- {* BEGIN PROGRAM *}
- {* *}
- {****************************************************************************}
-
-
- begin
- CheckBreak:=False;
- OrigMode:=LastMode;
- TextMode(Lo(LastMode)+Font8x8);
- FirstScreen;
- Clearbox(2,5,78,20);
- Print_Select;
- while working do begin
- MainMenu;
- repeat
- CH:=ReadKey;
- until (Ch IN ['1','2','3','4','5','6','7','8',#27]);
- case Ch of
- '1' : SelectFont(IBM_Mode);
- '2' : SetLineSpacing;
- '3' : SetMargins;
- '4' : SelectCharacterSet;
- '5' : SelectLanguageSet;
- '6' : SelectSpecialFunction;
- '7' : EngageDefaults;
- '8' : DoPrintTest;
- #27 : working := false;
- end; { of case }
- end; { of while working }
- ClearBox(2,5,78,20);TextColor(Border + Blink); { end of program }
- Center(-1,-1,'BYE');delay(2000); { routine here }
- TextColor(7);TextBackground(0);ClrScr;
- TextMode(OrigMode);
- end. { of program Printer }