Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using parallel ports in WindowsXP 1

Status
Not open for further replies.

Hitping

Technical User
Jul 26, 2003
23
0
0
IR
Hi
I'm writing a program to interface two computers with parallel ports and a cable(NULL MODEM).
I run debug on both computers and for example in first one I type:

mov al,FF
mov dx,378 ;sending 11111111 on first register port
out dx,al

and in second computer I typed :

mov dx,379 ;recieving data on second register port
in al,dx

but in second computer I didn't recieve any data .
I think that its reason is for windows xp.
If you know how to do this please help me
thanks







 
Hitping,

The one thing I can think of is this - The ports have to be set up as bi-directional ports if you connect them pin 1-1, 2-2 etc. You can set them up in the BIOS.

Another thing - On the XP machine(s) run debug from command.com instead of cmd.exe -Maybe XP has some restrictions towards direct hardware port access ... not sure!

Good Luck §;O)


Jakob
 
I do not think that XP allows direct access to the ports.

rgds
Zeit.
 
you are sending it through first register, why are you recieveing it through the second registert aren't you supposed to receive it on the same port??
 
Hitping,

I agree with Zeitghost. You can't use direct access to hardware (under windows environment) without ask permission to windows protection. And you need special Virtual Driver for that.

-- AirCon --
 
Hi AirCon,
Thanks for your comment.
Now I know that direct access to ports is not supported in windows xp,and I have to use a driver with my programs to work with ports directly.
Can you tell me how to write or get such a driver?
 
Hitping,

Take a look at this:
thread272-711863

Thanks for the star
Regards

-- AirCon --
 
not sure about XP but at least win9x accept parallel port IO for compatibility reasons. of course, this is not direct IO as windows manages port IO itself, but on application side it is transparent. i suppose parallel port addressing should work..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top