[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: [rtl] Parallel port problem]



Bart Vandewoestyne wrote:
> 
> 
> which is ok for the moment, but let's say that the bin on pin 11 gets
> low and i get 0XXXXXX then normally i should leave the while loop, but
> it is not sure if that will happen, because one of the X's could be
> non-zero and that means i will stay in the while loop.

If you are planning to connect other pins then this maybe better:

 void count(int time)
 {
   int value = 0;
   while (value < time) {
     while (inb(BASEPORT+1) & 0x80);
     while (inb(BASEPORT+1) | 0x7F)) ;
     value++;
   }
 }