Let's say the code is something simple:
------------------------------------------------------------------

#include <stdio.h>
#include <conio.h>
int main(void)
{
printf(" [%2x] ",_inp(0x378));
return 0;
}

------------------------------------------------------------------

If you try to run this under MS VC++, which is what I'm using, you're going to get "The exception Priviledge instruction. (0xc0000096) occured in the application at location 0x004010f7." So anyway, you can use a program from this link to help you get around that problem: http://www.beyondlogic.org/porttalk/porttalk.htm. Once you have gotten around that problem, you should be able to print out the memory content in 0x378. (after your program is compiled, run the .exe file) Now compare that to the memory content in 0x378 by means of using the debug program in DOS. (use "i" then the port address). You should see the discrepancy. My guess is, somehow MS VC++ is working with offsets. But that is just a guess.