do I need delays always in FDD code
Posted: Sun Jul 16, 2006 5:34 pm
In my FDD code I use timeout code, like this:
I don't need to insert a wait() in there do I like, the Main Status Register is never out of date is it?
and for other ports do I need a wait between in/outport to give it time?
Code: Select all
unsigned char FDD_ReadyGet(){
unsigned int delay;
delay=timer_ticks+2000; //2second timeout
while(delay>timer_ticks){
if((inportb(MAIN_STAT)&0xC0)==0xC0){return 1;}
}
return 0;
}
and for other ports do I need a wait between in/outport to give it time?