unit EpsonLX;  {Epson LX-850}

interface


uses Printer,dos,Tpcrt;

var  DraftCode,
     DraftEliteCode,
     NLQCode,
     CourierCode,
     SanserifCode,
     ItalicCode,
     CancelItalicCode,
     UprightCode,
     EmphasizedCode,
     CancelEmphasizedCode,
     BoldCode,
     CancelBoldCode,
     UnderlineCode,
     CancUnderlineCode,
     PicaCode,
     EliteCode,
     CondensedCode,
     CancelCondensedCode,
     ExpandedCode,
     CancelExpandedCode,
     ProportionalCode,
     FixedCode,
     CombinedCode,
     LineFeedCode,
     FormFeedCode,
     FeedNCode,
     TopPageCode,
     PageLengthCode,
     MarginsCode,
     TopMarginCode,
     BottomMarginCode,
     ReturnCode,
     BackSpaceCode,
     ResetPrinterCode:array[1..3] of char;

procedure     Draft;
procedure     DraftElite;
procedure     NLQ;
procedure     Courier;
procedure     Sanserif;
procedure     Italic;
procedure     CancelItalic;
procedure     Upright;
procedure     Emphasized;
procedure     CancelEmphasized;
procedure     Bold;
procedure     CancelBold;
procedure     Underline;
procedure     CancelUnderline;
procedure     Pica;
procedure     Elite;
procedure     Condensed;
procedure     CancelCondensed;
procedure     Expanded;
procedure     CancelExpanded;
procedure     Proportional;
procedure     Fixed;
procedure     Combined(n:integer);
procedure     LineFeed;
procedure     FormFeed;
procedure     Feed(n:integer);
procedure     SetTopPage;
procedure     SetPageLength(n:integer);
procedure     SetMargins(left,right:integer);
procedure     SetTopMargin(n:integer);
procedure     SetBottomMargin(n:integer);
procedure     SendReturn;
procedure     BackSpace;
procedure     InitPrinter;

var status:byte;

implementation





procedure   Draft;
begin

     write(lst,DraftCode[1],DraftCode[2],DraftCode[3]);
end;


procedure   DraftElite;
begin

     write(lst,DraftEliteCode[1],DraftEliteCode[2],DraftEliteCode[3]);
end;
procedure   NLQ;
begin

     write(lst,NLQCode[1],NLQCode[2],NLQCode[3]);
end;
procedure   Courier;
begin

     write(lst,CourierCode[1],CourierCode[2],CourierCode[3]);
end;
procedure   Sanserif;
begin

     write(lst,SanSerifCode[1],SanSerifCode[2],SanSerifCode[3]);
end;
procedure   Italic;
begin

     write(lst,ItalicCode[2]);
end;
procedure   CancelItalic;
begin

     write(lst,CancelItalicCode[2]);
end;


procedure   Upright;
begin

     write(lst,UpRightCode[1],UpRightCode[2],UpRightCode[3]);
end;
procedure   Emphasized;
begin

     write(lst,EmphasizedCode[1],EmphasizedCode[2],EmphasizedCode[3]);
end;
procedure   CancelEmphasized;
begin

     write(lst,CancelEmphasizedCode[1],CancelEmphasizedCode[2],CancelEmphasizedCode[3]);
end;
procedure   Bold;
begin

     write(lst,BoldCode[1],BoldCode[2]);
end;
procedure   CancelBold;
begin

     write(lst,CancelBoldCode[1],CancelBoldCode[2]);
end;
procedure   Underline;
begin

     write(lst,UnderLineCode[1],UnderlineCode[2],UnderlineCode[3]);
end;

procedure   CancelUnderline;
begin

     write(lst,CancUnderLineCode[1],CancUnderlineCode[2],CancUnderlineCode[3]);
end;


procedure   Pica;
begin

     write(lst,PicaCode[1],PicaCode[2],PicaCode[3]);
end;
procedure   Elite;
begin

     write(lst,EliteCode[1],EliteCode[2],EliteCode[3]);
end;
procedure   Condensed;
begin

     write(lst,CondensedCode[1],CondensedCode[2],CondensedCode[3]);
end;
procedure   CancelCondensed;
begin

     write(lst,CancelCondensedCode[1],CancelCondensedCode[2],CancelCondensedCode[3]);
end;
procedure   Expanded;
begin

     write(lst,ExpandedCode[1],ExpandedCode[2],ExpandedCode[3]);
end;
procedure   CancelExpanded;
begin

     write(lst,CancelExpandedCode[1],CancelExpandedCode[2],CancelExpandedCode[3]);
end;
procedure   Proportional;
begin

     write(lst,ProportionalCode[1],ProportionalCode[2],ProportionalCode[3]);
end;

procedure   Fixed;
begin

     write(lst,FixedCode[1],FixedCode[2],FixedCode[3]);
end;

procedure   Combined;
begin

     write(lst,CombinedCode[1],CombinedCode[2],CombinedCode[3]);
end;

procedure   LineFeed;
begin

     write(lst,LineFeedCode[1]);
end;
procedure   FormFeed;

begin

     write(lst,FormFeedCode[1]);
end;

procedure   Feed;
begin

     write(lst,FeedNCode[1],FeedNCode[2],FeedNCode[3],chr(n));
end;

procedure   SetTopPage;
begin

     write(lst,TopPageCode[1],TopPageCode[2],TopPageCode[3]);
end;
procedure   SetPageLength;
begin

     write(lst,PageLengthCode[1],PageLengthCode[2],chr(n));
end;
procedure   SetMargins;
begin

     write(lst,MarginsCode[1],MarginsCode[2],chr(left));
end;
procedure   SetTopMargin;
begin

     write(lst,TopMarginCode[1],TopMarginCode[2],TopMarginCode[3]);
end;
procedure   SetBottomMargin;
begin

     write(lst,BottomMarginCode[1],BottomMarginCode[2],BottomMarginCode[3]);
end;
procedure   SendReturn;
begin

     write(lst,ReturnCode[1],ReturnCode[2],ReturnCode[3]);
end;
procedure   BackSpace;
begin

     write(lst,BackSpaceCode[1],BackSpaceCode[2],BackSpaceCode[3]);
end;

procedure   InitPrinter;
begin
     write(lst,ResetPrinterCode[1],ResetPrinterCode[2],ResetPrinterCode[3]);
end;

begin

              DraftCode[1]:=#27;
              DraftCode[2]:=#120;
              DraftCode[3]:=#0;

              DraftEliteCode[1]:=#27;
              DraftEliteCode[2]:=#33;
              DraftEliteCode[3]:=#1;

              NLQCode[1]:=#27;
              NLQCode[2]:=#120;
              NLQCode[3]:=#1;

              CourierCode[1]:=#27;
              CourierCode[2]:=#107;
              CourierCode[3]:=#0;

              SanSerifCode[1]:=#27;
              SanSerifCode[2]:=#107;
              SanSerifCode[3]:=#1;

              ItalicCode[1]:=#28;
              ItalicCode[2]:=#52;

              CancelItalicCode[1]:=#27;
              CancelItalicCode[2]:=#53;


              UpRightCode[1]:=#28;
              UpRightCode[2]:=#52;

              EmphasizedCode[1]:=#27;
              EmphasizedCode[2]:=#69;

              CancelEmphasizedCode[1]:=#27;
              CancelEmphasizedCode[2]:=#70;

              BoldCode[1]:=#27;
              BoldCode[2]:=#71;

              CancelBoldCode[1]:=#27;
              CancelBoldCode[2]:=#72;

              UnderLineCode[1]:=#27;
              UnderLineCode[2]:=#45;
              UnderLineCode[3]:=#1;

              CancUnderLineCode[1]:=#27;
              CancUnderLineCode[2]:=#45;
              CancUnderLineCode[3]:=#0;


              PicaCode[1]:=#27;
              PicaCode[2]:=#80;

              EliteCode[1]:=#27;
              EliteCode[2]:=#77;

              CondensedCode[1]:=#27;
              CondensedCode[2]:=#15;
              CondensedCode[3]:=#0;

              CancelCondensedCode[1]:=#18;

              ExpandedCode[1]:=#27;
              ExpandedCode[2]:=#14;

              CancelExpandedCode[1]:=#20;

              FeedNCode[1]:=#27;
              FeedNCode[2]:=#102;
              FeedNCode[3]:=#1;


              PageLengthCode[1]:=#27;
              PageLengthCode[2]:=#67;



              MarginsCode[1]:=#27;
              MarginsCode[2]:=#108;

              FormFeedCode[1]:=#12;
              LineFeedCode[1]:=#10;

              ResetPrinterCode[1]:=#27;
              ResetPrinterCode[2]:=#64;
              ResetPrinterCode[3]:=#0;

end.


