Shop OBEX P1 Docs P2 Docs Learn Events
How can I give a DOS program running under Windows XP access to the I/O ports ? — Parallax Forums

How can I give a DOS program running under Windows XP access to the I/O ports ?

BeanBean Posts: 8,129
edited 2009-03-16 23:41 in General Discussion
I have a DOS program written in Turbo Pascal that outputs to the parallel port ($378).
It doesn't work when running in Windows XP because windows blocks direct port access.
I have found a program named NTPORT to allows you to use ports in windows programs, but it doesn't say anything about working with DOS programs.

Does anyone know of a program that will give DOS programs direct access to the I/O ports on Windows XP ?

Thanks,

Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...

·

Comments

  • LeonLeon Posts: 7,620
    edited 2009-03-12 14:58
    giveio is often used, IIRC.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • mikedivmikediv Posts: 825
    edited 2009-03-12 15:39
    Bean did you try run-as and then manually set the parellel port in device manager???? I have a very old eprom burner Parellel port burner works fine when I do it this way
    ·
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-03-12 16:19
    mikediv said...
    Bean did you try run-as and then manually set the parellel port in device manager???? I have a very old eprom burner Parellel port burner works fine when I do it this way
    Could you explain that in a little more detail?· I have sought a solution to this problem for years.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-12 16:49
    Yeah, me too. I've kept a legacy Win98 machine running next to my XP machine (with a KVM switch) for years because of two things: 1) a parallel port device programmer, and 2) a parallel port security dongle used by a CAM program.

    -Phil
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2009-03-13 00:50
    Bean,
    Not directly related but - I have attached a .Net 2008 application (called BeanPort ! - Just for you) that uses inpout32.dll to allow direct hardware access to parallel port - Unzip the attached - ensure the inpout32.dll is in the application path and run it - This will read and change D0 - D7 on a parallelport. So what I am really saying is that a 'Dos Console App' is possible under windows.·It can only be used on a 32bit op sys - XP,2k etc - if you have a 64bit opsys there is a dll called inpout64.dll. Have a look at the following link also -

    www.lvr.com/parprtib.htm

    Loads of info there and interesting projects ..

    Regards,
    John Twomey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Those who can, do.Those who can’t, teach.

    Post Edited (QuattroRS4) : 3/13/2009 1:06:14 AM GMT
  • NetHogNetHog Posts: 104
    edited 2009-03-13 06:03
    Hi Bean, do you have to use a DOS program for this?
    Short answer is that it's not going to happen (NT does not allow user apps direct access to any ports)
    Longer answer, you can 'emulate' a port (using something called a VDD), and use a device driver (such as NTPORT) to talk to actual hardware.
  • bambinobambino Posts: 789
    edited 2009-03-13 14:26
    QuattroRS4,

    Can that app read the port as well!
  • Tom BuettnerTom Buettner Posts: 1
    edited 2009-03-13 18:47
    I have never used this but it sound like it is what you are looking for.
    PortTalk http://www.beyondlogic.org/porttalk/porttalk.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-13 19:50
    Ow! My brain hurts after reading that page! 'Remember when we actually had control over our own PCs?

    -Phil
  • mikedivmikediv Posts: 825
    edited 2009-03-13 21:31
    Soory been busy, when you run the older program dos/app even if its just a plain dos based program no window" create a short cut on your desktop right click on it and run as administrator
    but first go into your device manager and make sure your parellel port is set to a hard address not automatic .. that will give you direct control of the P-Port
    If this is not clear "I'm doing my best" I can upload my eprom program for you to run the way I am stating and you can see how it will let windows/XP/Vista give you back direct control of the ports
    Bean I am not that great at explaining things PM me for my phone number
    ·
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2009-03-13 21:36
    Bambino,
    Yes - the sample app reads and writes D0...D7 on a parallel port - set to default port 378(hex) 888(dec)

    max input = 255 = D0 to D7 all high
    min = 0 = D0 to D7 all low ..

    and yes it has been tested on and works with NT,2K,XP

    Regards,
    John Twomey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Those who can, do.Those who can’t, teach.
  • bambinobambino Posts: 789
    edited 2009-03-15 06:01
    Thanks QuattroRS4
    A little trouble getting it to fit in vb2008.

    Of course that's about par for the course. Everything I've touched this weekend went south!
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2009-03-16 09:30
    Bambino,
    Have things changed direction from south yet?

    As the old saying goes -·'If everything seems to be going well, you have obviously overlooked something!'

    Regards,
    John Twomey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Those who can, do.Those who can’t, teach.

    Post Edited (QuattroRS4) : 3/16/2009 9:39:54 AM GMT
  • BradCBradC Posts: 2,601
    edited 2009-03-16 10:10
    Phil Pilgrim (PhiPi) said...
    Ow! My brain hurts after reading that page! 'Remember when we actually had control over our own PCs?

    -Phil

    Some of us still do. Oh the heady power of root access [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • bambinobambino Posts: 789
    edited 2009-03-16 23:41
    Negative,

    I fooled with it for a while(not long actually)(I have saved it for latter), Couldn't get the IDE to load it as a resource, so I couldn't reference it in code! The day after that, a project of mine got offered cash money, if I could give birth to it by April fools day! So everything, to include eatting and sleeping has been put on the back burner for a while! Man, I've been staring at this screen so long, I need a BC powder just to enter my shop!
Sign In or Register to comment.