[SOLVED] C programmin for parallel port interfacing

Status
Not open for further replies.

rahul.6sept

Full Member level 5
Joined
Nov 17, 2006
Messages
243
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
Guwahati, India
Activity points
2,889
Dear all,

I need a C program for transferring data to the Parallel port of PC.If anyone does have plz provide me.

Sincerely yours,

Rahul
 

using borland c++ 3.1 compiler:

#include <stdio.h>
#include <dos.h>
#include <conio.h>

/********************************************/
/*This program set the parallel port outputs*/
/********************************************/

void main (void)
{
clrscr(); /* clear screen */
outportb(0x378,0xff); /* output the data to parallel port */
getch(); /* wait for keypress before exiting */
}
 

PS : 0x378,0xff: port address may vary
 

Guys,

Here is a solution proper to use with modern Windows versions, above 95/98 :
https://www.edaboard.com/threads/120838/

Windows upper XP, protects access to hardware resources.
Some persons uses unlocks programs, like that :


But it is a problem if you wish distribute your software.
Note that it works also with older Windows versoions.

+++
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…