What precautions should I use when writing interrupt code ?

You should often try to keep your interrupt code as short & fast as possible. In many cases, no other interrupt can take place while you are servicing an interrupt so shorter interrupt code can be helpful.