Originally Posted by
MacGyver
OK, this is a common mistake to assume that you can actually do what you're trying. Windows XP does not allow you to interface with ports in this manner without going through the proper OS way. Turbo C is actually not producing an executable that is natively run on Windows, in the traditional sense. Instead, Windows is emulating in this case, and doing who-knows-what when your code tries to do anything native.
If you want to program for Windows, get a real Windows compiler, not Turbo C, and write real Windows code.