home *** CD-ROM | disk | FTP | other *** search
- {--------------------------------------------------------------------}
- {- Before compiling this demo program make sure the Unit Directories-}
- {- in the Options, Directories menu specify where to find the -}
- {- FlashPac Units. -}
- {- -}
- {- Compiler Directory -}
- {- -------- ----------------- -}
- {- TP4 A:\TP4 -}
- {- TP5 A:\TP5 -}
- {- TP55 A:\TP55 -}
- {- -}
- {--------------------------------------------------------------------}
-
- program testit;
- uses Crt,FPPrt,FPVideo;
-
- Type
- Str8 = String[8];
- Var
- Done : Boolean;
-
-
- Function DecToBin(Num : Integer) : Str8;
- Var
- i,j : Integer;
- St : Str8;
- Begin
- For i := 8 DownTo 1 Do Begin
- St[i] := Chr( (Num Mod 2) + 48);
- Num := Num Div 2;
- End;
- St[0] := Chr(8);
- DecToBin := St;
- End;
-
-
- Procedure TestBiosPrtChar;
- Var
- i,j,k : Integer;
- Ch : Char;
- Begin
- For j := 1 To 10 Do Begin
- For i := 1 To 26 Do Begin
- k := BiosPrtChar(Chr(i+64),0);
- If (k And $10) <> 0 Then
- Writeln('Printer not selected... Status = ',DecToBin(k) );
- End;
- k := BiosPrtChar(Chr(10),0);
- If (k And $10) <> 0 Then
- Writeln('Printer not selected... Status = ',DecToBin(k) );
- k := BiosPrtChar(Chr(13),0);
- If (k And $10) <> 0 Then
- Writeln('Printer not selected... Status = ',DecToBin(k) );
- End;
- End;
-
- Procedure TestBiosPrtInit;
- Var
- k : Integer;
- Begin
- k := BiosPrtInit(0);
- End;
-
- Procedure TestBiosPrtStat;
- Var
- i : Integer;
- Begin
- For i := 1 To 500 Do
- Writeln('Printer Status = ',DecToBin(BiosPrtStat(0)) );
- End;
-
- Procedure TestDosPrtChar;
- Var
- i,j : Integer;
- Ch : Char;
- Begin
- For j := 1 To 10 Do Begin
- For i := 1 To 26 Do
- DosPrtChar(Chr(i+64));
- DosPrtChar(Chr(10));
- DosPrtChar(Chr(13));
- End;
- End;
-
- Function GetMenuSelection : Integer;
- Var
- Item : integer;
- Begin
- Item := 0;
- TextAttr := 7;
- Repeat
- ClrWin(1,1,80,25,7);
- Window(1,1,80,25);
- GotoxyAbs(1,1);
- WriteStLn(' ');
- WriteStln(' 1. BiosPrtChar ');
- WriteStln(' 2. BiosPrtInit ');
- WriteStln(' 3. BiosPrtStat ');
- WriteStln(' 4. DosPrtChar ');
- WriteStln(' ');
- WriteStln(' 5. Quit');
- WriteStln(' ');
- WriteSt('Enter selection to test ==> ');
- Readln(Item);
- Until Item In [1..5];
- GetMenuSelection := Item;
- End;
-
- begin
- DirectVideo := True;
- ClrWin(1,1,80,25,7);
- GotoxyAbs(1,1);
- Done := False;
- While Not Done Do Begin
- Case GetMenuSelection Of
- 1 : TestBiosPrtChar;
- 2 : TestBiosPrtInit;
- 3 : TestBiosPrtStat;
- 4 : TestDosPrtChar;
- 5 : Done := True;
- End;
- End;
- End.