home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / portio2.zip / portio / read.me
Text File  |  1993-07-11  |  2KB  |  42 lines

  1.                 PORTIO for OS/2
  2.  
  3. PORTIO was originally written by Michael Thompson (tommy@msc.cornell.edu)
  4. to allow port access under OS/2 2.X using the IBM C Set/2 compiler.  This
  5. code has been ported over to BCOS2.
  6.  
  7. Since BCOS2's linkage editor (TLINK) does not handle IOPL code properly a
  8. substancial modification was required.    Since TLINK does not fill in the
  9. word count field in call gates, parameters do not get copied to the IOPL
  10. routine's stack (normally done by the hardware transparently if the word
  11. count field is used).  A macro ($IOPL) to copy the non-priviledged stack to
  12. the priviledged stack has been provided as an example of how to build IOPL
  13. code using BCOS2.  Once Borland fixes TLINK this macro will no longer be
  14. required.
  15.  
  16.  Function definitions for port access routines
  17.       inp(port)   - read single byte from I/O port
  18.       inpw(port)  - read single word from I/O port pair
  19.       outp(port,short)    - write single byte to I/O port
  20.       outpw(port,short) - write single word to I/O port pair
  21.  
  22.  Originally for IBM C Set/2  Version 1.0
  23.  Ported to Borland C++ for OS/2 Version 1.0
  24.  
  25. DISCLAIMER:
  26. -------------------------
  27. This code and the accompanying documentation is hereby placed in
  28. the public domain.  It is not part of any standard product and
  29. is provided solely as an example for your private and/or
  30. commercial use.  You may freely use or distribute this code in
  31. derived works as long as you do not attempt to prevent others
  32. from doing likewise.  Neither the authors, nor their employers,
  33. shall be liable for any damages arising from your use of this
  34. code; it is provided solely ASIS with no warranty whatsoever.
  35.  
  36. Author contact:   Michael Thompson
  37.           tommy@msc.cornell.edu
  38.  
  39. Ported to Borland C++ for OS/2 by:
  40.           Cy Schubert
  41.           cschuber@bcsc02.gov.bc.ca
  42.