please send me basic commands for accessing pc parallel port c coding on visual c++ ,
i typed following program but it compile correctly but doesnt access parallel port,
#include<stdio.h>
#include<conio.h>
#define portaddress 0x378
int main()
{
int a;
printf("Enter a number:");
scanf_s("%d",&a);
if(a<9)
{
_outp(portaddress,0x00);
}
else
{
_outp(portaddress,0x255);
}
system("pause");
return 0;
}
//i have winxp i have lpt1 driver,pinout32 userport almost all the thing,but still it doesnt work ,i have tried many different codes
i typed following program but it compile correctly but doesnt access parallel port,
#include<stdio.h>
#include<conio.h>
#define portaddress 0x378
int main()
{
int a;
printf("Enter a number:");
scanf_s("%d",&a);
if(a<9)
{
_outp(portaddress,0x00);
}
else
{
_outp(portaddress,0x255);
}
system("pause");
return 0;
}
//i have winxp i have lpt1 driver,pinout32 userport almost all the thing,but still it doesnt work ,i have tried many different codes