home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / PASLIBR.ZIP / CH4_1.DOC < prev    next >
Encoding:
Text File  |  1991-03-15  |  2.9 KB  |  152 lines

  1. ..pgno01
  2. ..foot60A4-##
  3. ..head02L──────────────────────────────────────────────────────────────────────
  4. ..head04L──────────────────────────────────────────────────────────────────────
  5. ..head03ABiosPrtChar
  6. ■ Description
  7.  
  8.   Send a character to the printer.
  9.  
  10.  
  11. ■ Summary
  12.  
  13.   Procedure BiosPrtChar( Ch : Char; PrtNo : Integer );
  14.  
  15.   Ch          character to be printed.
  16.  
  17.   PrtNo       printer number of printer to print to.
  18.  
  19.  
  20. ■ Remarks
  21.  
  22.   PrtNo 1 = LPT1:
  23.   PrtNo 2 = LPT2:
  24.   PrtNo 3 = LPT3:
  25.  
  26.  
  27. ■ See Also
  28.  
  29.   BiosPrtStat, DosPrtChar
  30.  
  31.  
  32. ■ Example
  33.  
  34.   Program Example;
  35.   Uses FPPrt;
  36.   Var
  37.      i : Integer;
  38.   Begin
  39.      For i := 1 To 80 Do
  40.         BiosPrtChar( 'A', 1 );
  41.   End.
  42.  
  43.   Here PrtChar will print the letter A out to printer one 80 times.
  44. ..page
  45. ..head03ABiosPrtInit
  46. ■ Description
  47.  
  48.   Initialize the printer
  49.  
  50.  
  51. ■ Summary
  52.  
  53.   Function BiosPrtInit( PrtNo : Integer ) : Integer;
  54.  
  55.   PrtNo       number of printer to initialize.
  56.  
  57.  
  58. ■ Remarks
  59.  
  60.   This functions returns the status of the printer after the
  61.   initialization process is completed.
  62.  
  63.  
  64. ■ Example
  65.  
  66.   Program Example;
  67.   Uses FPPrt;
  68.   Begin
  69.      If ( BiosPrtInit( 1 ) And 16 ) <> 0 Then 
  70.         Writeln( 'Printer initialized' );
  71.   End.
  72.  
  73.   The printer that is hooked up to the first parallel port will be
  74.   initialized.  (Refer to BiosPrtStatus for a description of the
  75.   printer status byte).
  76. ..page
  77. ..head03ABiosPrtStatus
  78. ■ Description
  79.  
  80.   Returns the current status of the printer.
  81.  
  82.  
  83. ■ Summary
  84.  
  85.   Function BiosPrtStat( PrtNo : Integer ) : Integer;
  86.  
  87.   PrtNo       is an integer representing the printer number to check
  88.               the status for.
  89.  
  90.  
  91. ■ Remarks
  92.  
  93.   PrtStatus will return an integer giving the status of the printer
  94.   using the following bit values.
  95.  
  96.      Bit     Value            Meaning
  97.      ───   ─────────   ───────────────────────────
  98.       0  -     1     - Time-out
  99.       1  -     2     - Not used
  100.       2  -     4     - Not used
  101.       3  -     8     - I/O error
  102.       4  -    16     - Printer selected
  103.       5  -    32     - Out-of-paper signal
  104.       6  -    64     - Acknowledgment from printer
  105.       7  -   128     - Printer not busy
  106.  
  107.  
  108. ■ Example
  109.  
  110.   Program Example;
  111.   Uses FPPrt;
  112.   Begin
  113.      If ( BiosPrtStatus( 1 ) And 128 ) <> 0 Then
  114.         BiosPrtchar( 'A', 1 );
  115.   End.
  116.  
  117.   If printer one is not busy then the letter A will be sent out to
  118.   printer one.
  119. ..page
  120. ..head03ADosPrtChar
  121. ■ Description
  122.  
  123.   Send a character to the printer.
  124.  
  125.  
  126. ■ Summary
  127.  
  128.   Procedure DosPrtChar( Ch : Char );
  129.  
  130.   Ch          character to be printed.
  131.  
  132.  
  133. ■ See Also
  134.  
  135.   BiosPrtChar, BiosPrtStat
  136.  
  137.  
  138. ■ Example
  139.  
  140.   Program Example;
  141.   Uses FPPrt;
  142.   Var
  143.      i : Integer;
  144.   Begin
  145.      For i := 1 To 80 Do
  146.         DosPrtChar( 'A' );
  147.   End.
  148.  
  149.   Here PrtChar will print the letter A out to printer one 80 times.
  150. ..page
  151. 
  152.