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

  1. /*---------------------------------------------------------------------------
  2.  * filename - bios_com.cas
  3.  *
  4.  * function(s)
  5.  *        _bios_serialcom - communications I/O (MSC-compatible)
  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_serialcom - communications I/O
  23.  
  24. Usage           unsigned _bios_serialcom(unsigned cmd, unsigned port,
  25.                                          unsigned abyte);
  26.  
  27. Prototype in    bios.h
  28.  
  29. Description     Direct interface to BIOS interrupt 0x14.  Compatible with MSC.
  30.                 Similar to the older bioscom() function, but parameters are
  31.                 in a different order and have different types, and the
  32.                 return value also has a different type.
  33.  
  34.  
  35. Return value    value return to the AX register for the function specified
  36.                 by cmd.
  37.  
  38. *---------------------------------------------------------------------------*/
  39. unsigned _bios_serialcom(unsigned cmd, unsigned port, unsigned abyte)
  40. {
  41. asm     mov     ah, cmd
  42. asm     mov     al, abyte
  43. asm     mov     dx, port
  44. asm     int     14h
  45.  
  46. return( _AX );
  47. }
  48.