home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / portio.zip / portio.h < prev    next >
C/C++ Source or Header  |  1993-05-03  |  2KB  |  49 lines

  1. /* portio.h -  header file for port access routines                 */
  2. /********************************************************************/
  3. /*                                                                  */
  4. /*  Function prototypes for port access routines                    */
  5. /*       inp(port)   - read single byte from I/O port               */
  6. /*       inpw(port)  - read single word from I/O port pair          */
  7. /*       outp(port)  - write single byte to I/O port                */
  8. /*       outpw(port) - write single word to I/O port pair           */
  9. /*                                                                  */
  10. /*  For IBM C Set/2  Version 1.0                                    */
  11. /*                                                                  */
  12. /* DISCLAIMER:                                                      */
  13. /* -------------------------                                        */
  14. /* This code and the accompanying documentation is hereby placed in */
  15. /* the public domain.  It is not part of any standard product and   */
  16. /* is provided solely as an example for your private and/or         */
  17. /* commercial use.  You may freely use or distribute this code in   */
  18. /* derived works as long as you do not attempt to prevent others    */
  19. /* from doing likewise.  Neither the author, nor his employer,      */
  20. /* shall be liable for any damages arising from your use of this    */
  21. /* code; it is provided solely ASIS with no warranty whatsoever.    */
  22. /*                                                                  */
  23. /* Author contact:   Michael Thompson                               */
  24. /*                   tommy@msc.cornell.edu                          */
  25. /********************************************************************/
  26.  
  27. #pragma checkout( suspend )
  28.    #ifndef __CHKHDR__
  29.       #pragma checkout( suspend )
  30.    #endif
  31. #pragma checkout( resume )
  32.  
  33. #ifndef __portio_h
  34.    #define __portio_h
  35.  
  36.    unsigned short _Far16 _Fastcall inp(unsigned short port);
  37.    unsigned short _Far16 _Fastcall inpw(unsigned short port);
  38.    unsigned short _Far16 _Fastcall outp(unsigned short port,
  39.                                         unsigned short byte);
  40.    unsigned short _Far16 _Fastcall outpw(unsigned short port,
  41.                                          unsigned short word);
  42. #endif
  43.  
  44. #pragma checkout( suspend )
  45.    #ifndef __CHKHDR__
  46.       #pragma checkout( resume )
  47.    #endif
  48. #pragma checkout( resume )
  49.