I need to output an incrementing number to a parallel port. I'm currently using this code:
int main (int argc, char **argv)
unsigned char num;
par = fopen("0x378", "w");
for (num=0; num!=255; num++)
fwrite(&num, sizeof(num), 1, par);
printf("Outputting: %d\n", num);
Where the parallel port has the adress 378h.
But all that does is to create a file called 0x378. How do I get the program to open the parallel port of that address? I'm using MS Visual C++ compiler, but I need a C program.
Cheers for any help.