Parallel port direct access under DOS on WinXP machine

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.
rossmcmAsked:
Who is Participating?
 
JohnnyCanuckCommented:
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.

http://www.direct-io.com/
0
 
SysExpertCommented:
DOS compatability mode may work.
windows Xp DOS programs compatability

http://www.sysopt.com/tutorials/article.php/12034_3532691_2

I hope this helps !
0
 
rossmcmAuthor Commented:
There is no mention of DOS compatibility in that dialog, only Win95, 98, NT, 2k.  I will try it under Win98 however.

0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
JohnnyCanuckCommented:
I believe this will help you.

http://www.dosprn.com/

0
 
rossmcmAuthor Commented:
JohnnyCanuck:

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.

SysExpert:

Putting the DOS box into Win98 compatible mode didn't work either
0
 
rossmcmAuthor Commented:
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.


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.