We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Parallel port direct access under DOS on WinXP machine

rossmcm asked
Medium Priority
Last Modified: 2012-05-06
I have a legacy app written in DOS Turbo Pascal that talks to hardware over a parallel printer port - i.e the printer port is used as 8-bit ports.  Under Win98 it works fine in a DOS box but I need to run the same app in a DOS box on a WinXP machine.  WinXP of course does not permit direct access to ports.

Does anyone know of a solution that works?.  I've tried a couple that involve running an app to reset the permissions or such like but these hang my machine.
Watch Question

Top Expert 2007

DOS compatability mode may work.
windows Xp DOS programs compatability


I hope this helps !


There is no mention of DOS compatibility in that dialog, only Win95, 98, NT, 2k.  I will try it under Win98 however.

I believe this will help you.




It's not a printing problem I'm having.  Before  Windows the printer port was implemented as a hardware addressed 8-bit port at address $378 etc. and you accessed it via x86 In and OUT instructions. This worked in Win3x, and Win9x platforms but WinXP prevented applications from directly addressing the I/O space, so DOS programs that use the printer port in this way don't work.


Putting the DOS box into Win98 compatible mode didn't work either
I see.  Windows XP doesn't allow direct hardware access so there is nothing you can do from within XP to make your program work.  You could maybe give this a try.  It has a shareware version for testing.


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks Johnny.  DIrect I/O did the trick, but not without some head-scratching.  However the support I got from Michael at Direct-io.com was responsive and helpful, even after I had paid up my $29 !

The main issue that had me stumped was that (in XP anyway) the range of port addresses you need to specify for access to LPT1 is not what you would expect from reading the printer base address from the DOS BIOS at 0000:0408.
There are some other snags you have to watch for but these are all covered in the knowledge base.

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.