home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / CLIBSRC1.ZIP / BIOS_PRN.CAS < prev    next >
Encoding:
Text File  |  1992-06-10  |  1.4 KB  |  46 lines

  1. /*---------------------------------------------------------------------------
  2.  * filename - bios_prn.cas
  3.  *
  4.  * function(s)
  5.  *        _bios_printer - printer I/0
  6.  *--------------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1991, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16.  
  17. #pragma inline
  18. #include <bios.h>
  19.  
  20. /*--------------------------------------------------------------------------*
  21.  
  22. Name            _bios_printer - printer I/O
  23.  
  24. Usage           unsigned _bios_printer(unsigned cmd, unsigned port, unsigned abyte);
  25.  
  26. Prototype in    bios.h
  27.  
  28. Description     Interface to BIOS interrupt 0x17 printer controller
  29.                 services.  Compatible with MSC.  Similar to the older
  30.                 biosprint() function, but parameters are in a different
  31.                 order and have different types, and the return value
  32.                 also has a different type.
  33.  
  34. Return value    printer status byte as returned through the AH register
  35.                 by interrupt 0x17.
  36.  
  37. *---------------------------------------------------------------------------*/
  38. unsigned _bios_printer(unsigned cmd, unsigned port, unsigned abyte)
  39. {
  40. asm     mov     ah,cmd
  41. asm     mov     al,abyte
  42. asm     mov     dx,port
  43. asm     int     17h
  44.         return  _AH;
  45. }
  46.