reading from ports.

Hello.
What is "inport(int portid)" in conio.h ?
How it works ?
What is portid ?
Thanks.
Computers communicate with external devices (printer, keyboard, internet, etc) using ports.

The inport() and outport() functions in old compilers read from and write to a specific port, respectively.

By the way, Don't do that. Use the modern OS system functions to handle external devices. Unless you are writing a device driver, and working in Assembly language, you are making a mistake. (Oh, unless you are programming on an old 8086 or the like.)
Last edited on
Topic archived. No new replies allowed.