home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / BIOSPRIN.CAS < prev    next >
Encoding:
Text File  |  1990-06-07  |  1.5 KB  |  46 lines

  1. /*---------------------------------------------------------------------------
  2.  * filename - biosprin.cas
  3.  *
  4.  * function(s)
  5.  *        biosprint - printer I/0
  6.  *--------------------------------------------------------------------------*/
  7.  
  8. /*[]------------------------------------------------------------[]*/
  9. /*|                                                              |*/
  10. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  11. /*|                                                              |*/
  12. /*|                                                              |*/
  13. /*|     Copyright (c) 1987,1988,1990 by Borland International    |*/
  14. /*|     All Rights Reserved.                                     |*/
  15. /*|                                                              |*/
  16. /*[]------------------------------------------------------------[]*/
  17.  
  18. #pragma inline
  19. #include <bios.h>
  20.  
  21. /*--------------------------------------------------------------------------*
  22.  
  23. Name        biosprint - printer I/O
  24.  
  25. Usage        int biosprint(int cmd, int byte, int port);
  26.  
  27. Prototype in    bios.h
  28.  
  29. Description    interface to BIOS interrupt 0x17 printer controller
  30.         services.
  31.  
  32. Return value    printer status byte as returned through the AH register
  33.         by interrupt 0x17.
  34.  
  35. *---------------------------------------------------------------------------*/
  36. int biosprint(int cmd, int byte, int port)
  37. {
  38. RealMode:
  39. asm    mov    ah,cmd
  40. asm    mov    al,byte
  41. asm    mov    dx,port
  42. asm    int    17h
  43. Exit:
  44.     return    _AH;
  45. }
  46.