R
rick
Greetings to all,
i am not sure this is the write group to post my question to. If it is
not i apologize. In the mean time if you have the answer to my
question please help. THANKS!!
i am trying to write a program using parallel port. I wrote this
program to change the port number to one or zero. I am not able to
change the port number from one to zero. It takes it sever run time to
change from one to zero. WHY? ANY SUGGESTIONS?
#include <conio.h>
#include <stdio.h>
#include <dos.h>
int main()
{
char ch, ch2;
while (getch() != 'E')
{
printf ("please enter z to write zero to the parallel port \n");
printf ("please enter o to write one to the parallel port \n");
ch = getch();
if (ch = = 'z')
{
outportb (0x3BC, 0x00);
printf ("writing 0 to the parallel port \n");
}
if (ch == 'o')
outportb (0x3BC, 0x0F);
printf ("writing one to the parallel port \n");
}
};
i am not sure this is the write group to post my question to. If it is
not i apologize. In the mean time if you have the answer to my
question please help. THANKS!!
i am trying to write a program using parallel port. I wrote this
program to change the port number to one or zero. I am not able to
change the port number from one to zero. It takes it sever run time to
change from one to zero. WHY? ANY SUGGESTIONS?
#include <conio.h>
#include <stdio.h>
#include <dos.h>
int main()
{
char ch, ch2;
while (getch() != 'E')
{
printf ("please enter z to write zero to the parallel port \n");
printf ("please enter o to write one to the parallel port \n");
ch = getch();
if (ch = = 'z')
{
outportb (0x3BC, 0x00);
printf ("writing 0 to the parallel port \n");
}
if (ch == 'o')
outportb (0x3BC, 0x0F);
printf ("writing one to the parallel port \n");
}
};