home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / flash-c1.zip / CH4_1.DOC < prev    next >
Text File  |  1990-02-11  |  3KB  |  155 lines

  1. ..pgno01
  2. ..foot63A4-##
  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.   #include <fpclib.h>
  35.  
  36.   main()
  37.   {
  38.      int i;
  39.  
  40.      for ( i = 1; i < 80; i++ )
  41.         BiosPrtChar( 'A', 1 );
  42.   }
  43.  
  44.   Here PrtChar will print the letter A out to printer one 80 times.
  45. ..page
  46. ..head03ABiosPrtInit
  47. ■ Description
  48.  
  49.   Initialize the printer
  50.  
  51.  
  52. ■ Summary
  53.  
  54.   Function BiosPrtInit( PrtNo : Integer ) : Integer;
  55.  
  56.   PrtNo       number of printer to initialize.
  57.  
  58.  
  59. ■ Remarks
  60.  
  61.   This functions returns the status of the printer after the
  62.   initialization process is completed.
  63.  
  64.  
  65. ■ Example
  66.  
  67.   #include <fpclib.h>
  68.  
  69.   main()
  70.   {
  71.      if ( BiosPrtInit( 1 ) & 16 )
  72.         printf( "Printer initialized\n" );
  73.   }
  74.  
  75.   The printer that is hooked up to the first parallel port will be
  76.   initialized.  (Refer to BiosPrtStatus for a description of the
  77.   printer status byte).
  78. ..page
  79. ..head03ABiosPrtStatus
  80. ■ Description
  81.  
  82.   Returns the current status of the printer.
  83.  
  84.  
  85. ■ Summary
  86.  
  87.   Function BiosPrtStat( PrtNo : Integer ) : Integer;
  88.  
  89.   PrtNo       is an integer representing the printer number to check
  90.               the status for.
  91.  
  92.  
  93. ■ Remarks
  94.  
  95.   PrtStatus will return an integer giving the status of the printer
  96.   using the following bit values.
  97.  
  98.      Bit     Value            Meaning
  99.      ───   ─────────   ───────────────────────────
  100.       0  -     1     - Time-out
  101.       1  -     2     - Not used
  102.       2  -     4     - Not used
  103.       3  -     8     - I/O error
  104.       4  -    16     - Printer selected
  105.       5  -    32     - Out-of-paper signal
  106.       6  -    64     - Acknowledgment from printer
  107.       7  -   128     - Printer not busy
  108.  
  109.  
  110. ■ Example
  111.  
  112.   #include <fpclib.h>
  113.  
  114.   main()
  115.   {
  116.      if ( BiosPrtStatus( 1 ) & 128 )
  117.         BiosPrtchar( 'A', 1 );
  118.   }
  119.  
  120.   If printer one is not busy then the letter A will be sent out to
  121.   printer one.
  122. ..page
  123. ..head03ADosPrtChar
  124. ■ Description
  125.  
  126.   Send a character to the printer.
  127.  
  128.  
  129. ■ Summary
  130.  
  131.   Procedure DosPrtChar( Ch : Char );
  132.  
  133.   Ch          character to be printed.
  134.  
  135.  
  136. ■ See Also
  137.  
  138.   BiosPrtChar, BiosPrtStat
  139.  
  140.  
  141. ■ Example
  142.  
  143.   #include <fpclib.h>
  144.  
  145.   main()
  146.   {
  147.      int i;
  148.  
  149.      for ( i = 0; i < 80; i++ )
  150.         DosPrtChar( 'A' );
  151.   }
  152.  
  153.   Here PrtChar will print the letter A out to printer one 80 times.
  154. ..page
  155.