Hi thanks, for the "while" code, it is smaller. But I still have the problem.
I didn't mention the pic is a 16f84a.
I have 2 microswitch connected to portb.2 and portb.3
I have 3 bc548 connected through a resistor to portb.4, .5 and .6.
On portb.0 I have a photomicrosensor.
I hope that helps.
BTW, If I rotate the last 2 lines of code, the interrupt stop working.
Bookmarks