coding for reading output port

Discussion in 'Programmer's Corner' started by ohorit, Mar 23, 2008.

  1. ohorit

    Thread Starter Member

    Mar 8, 2008
    12
    0
    can anyone give me a source where i can find the program for reading the outport port of pentium-4 processor by c language,matlab can be helpful too.i will be very much thankful if u can.
     
  2. Mark44

    Well-Known Member

    Nov 26, 2007
    626
    1
    There are several functions you can use, depending on whether you want to read a byte, word, or dword (double word). The functions are _inp, _inpw, and _inpd. These C run-time functions are declared in conio.h.

    Depending on what operating system you're using, you might not be able to use the functions above. From what I've read, you can use them in DOS and in Windows versions up to and including Windows 98. You can't use them in Windows 2000, WinXP and later in user-mode programs. (They can be used in drivers, which run in kernel mode.)

    You can probably find more information on the Web--I did a google search on _inp and got lots of hits.
    Mark
     
Loading...