If possible configure your external interrupt pin to Edge triggered rather than level triggered. If you can do that, then you can safely skip checking for IR in a loop in your ISR.
Pseudo code
void main()
{
do {
delay(1 sec);
speed = count /2; turns
count = 0;
}while(1);
}
void ISR_ex0(void) interrupt 0
{
if(1 == IR)
{
count++;
//reset the IR if needed
IR=0
}
}
implement the delay function
So in your main function you are waiting for a second and check how many interrupts are fired in that interval by means of count. And after reading counts you are resetting it for next second. So you get a speed value every second.