in my interurupt routien, i check these, then i set a flag bit in a file for that area:
sensors
btfss INTCON, 0 ;iocb flag
goto exit_ir
bsf bump, 7 ;bumper flag bit, bypasses delays
goto exit_ir
In my delay area i just poll for a flag, just as Nigel stated.
Delay_0
btfsc bump, 7 ;sensors flag bit
return (this will skip the rest of the delay and return to where you were previously before the delay)
decfsz counta, f
goto $+2
decfsz countb, f
goto Delay_0
decfsz count1, f
goto d1
retlw 0x00