Parallel port direct access under DOS on WinXP machine

Posted on 2009-02-19
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.
Question by:rossmcm
    LVL 63

    Expert Comment

    DOS compatability mode may work.
    windows Xp DOS programs compatability

    I hope this helps !

    Author Comment

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

    LVL 14

    Expert Comment

    I believe this will help you.


    Author Comment


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

    Accepted Solution

    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.

    Author Closing Comment

    Thanks Johnny.  DIrect I/O did the trick, but not without some head-scratching.  However the support I got from Michael at 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.


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
    In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now