How can I give a DOS program running under Windows XP access to the I/O ports ?
![Bean](https://forums.parallax.com/uploads/userpics/855/n505WZVEIPHT1.jpg)
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...
·
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
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
-Phil
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
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.
Can that app read the port as well!
PortTalk http://www.beyondlogic.org/porttalk/porttalk.htm
-Phil
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
·
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.
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!
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
Some of us still do. Oh the heady power of root access [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
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!