unit StarLC20;

interface


uses TPcrt,dos,Printer;




procedure     Draft;
procedure     DraftElite;
procedure     NLQ;
procedure     Courier;
procedure     Sanserif;
procedure     Italic;
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     DoubleSize;
procedure     NormalSize;
procedure     Size(n:integer);
procedure     InitPrinter;



implementation

var  DraftCode,
     DraftEliteCode,
     NLQCode,
     CourierCode,
     SanserifCode,
     ItalicCode,
     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,
     DoubleSizeCode,
     NormalSizeCode,
     ResetPrinterCode:array[1..3] of char;



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[1],ItalicCode[2],ItalicCode[3]);
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],BoldCode[3]);
end;
procedure   CancelBold;
begin

     write(lst,CancelBoldCode[1],CancelBoldCode[2],CancelBoldCode[3]);
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;
var ii:integer;
begin
     for ii:=1 to n do LineFeed;
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),chr(right));
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;

procedure   DoubleSize;
begin



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

procedure   NormalSize;
begin



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


procedure   Size;
begin
     write(lst,DoubleSizeCode[1],DoubleSizeCode[2],chr(n));
end;

begin


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

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

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

              CourierCode[1]:=#27;
              CourierCode[2]:=#73;
              CourierCode[3]:=#51;

              SanSerifCode[1]:=#27;
              SanSerifCode[2]:=#73;
              SanSerifCode[3]:=#50;

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

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

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

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

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

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


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

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


              PicaCode[1]:=#18;
              PicaCode[2]:=#0;
              PicaCode[3]:=#0;

              EliteCode[1]:=#27;
              EliteCode[2]:=#58;
              EliteCode[3]:=#0;

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

              ExpandedCode[1]:=#27;
              ExpandedCode[2]:=#87;
              ExpandedCode[3]:=#1;

              CancelExpandedCode[1]:=#27;
              CancelExpandedCode[2]:=#87;
              CancelExpandedCode[3]:=#0;

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


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


              TopPageCode[1]:=#27;
              TopPageCode[2]:=#52;
              TopPageCode[3]:=#0;


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

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

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

              DoubleSizeCode[1]:=#27;
              DoubleSizeCode[2]:=#104;
              DoubleSizeCode[3]:=#1;


              NormalSizeCode[1]:=#27;
              NormalSizeCode[2]:=#104;
              NormalSizeCode[3]:=#0;

end.


