delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq155.html   search  

| Previous | Next | Up | Top |

18.12 How to read and write ports

Q: I need to read from and write to PC ports, and I'm accustomed to using the inp and outp functions. But I hear they aren't available in DJGPP?


A: They are in v2.x. Just #include <pc.h> and you get their prototypes. The functions themselves are in the default library. Note that there are also size-specific versions for byte- word- and dword-long access (e.g., inportl for reading a 32-bit dword), as well as functions to read/write sequences of bytes and words, like inportsb and outportsw; these are DJGPP-specific.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)