> Recursive routines (ones that call themselves) obviously must be > re-entrant, but re-entrant routines do not need to be used recursively. > The compiler I use for the > 68HC11 (Whitesmiths) has recursive routines and they are a must for me. > I am in the middle of a math computation (e.g. divide), and an interrupt > occurs where the ISR needs to perform the same kind of math computation, > the math routine better be re-entrant. But just because those two routines > are using the math function at the same time does not mean a large amount > of stack space is used. The PIC (except the high-end ones?) do not have a data stack, so even the re-entrancy which you mention is difficult to achive. I know, I have written my own PIC compiler. The best (compact) PIC code uses fixed addresses for data, allocated pseudo-stack wise. This makes re-entracy impossible. I think the best a compiler could do is generate separate code for everything which is used during an interrupt. Lucky that PICs do not have nested interrupts.... wouter.