• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 899
  • Last Modified:

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.
0
rossmcm
Asked:
rossmcm
  • 3
  • 2
1 Solution
 
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
 
JohnnyCanuckCommented:
I believe this will help you.

http://www.dosprn.com/

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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
 
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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now