C, the golden rule for any interrupt routine is to make it as short as possible. An Interrupt is to process whatever triggered it, save the bit of information (like a byte that triggered a UART receive interrupt), set a flag or status, then exit the interrupt. Your main program then checks the "flag" and then checks the saved data and only then determines if it is time to process all of it, or wait for more data.
An interrupt routine should never have things like HSEROUT, as that call alone takes more time than the interrupt itself. That is, if receiving characters at 9600 baud, an interrupt processed on byte at a time, and sending a string out simply locks up the next received byte (it is missed while sending output).
Things like string outputs should only be done in the main program. It can be interrupted as it sends, which is ok, provided the interrupt routine gets the trigger event and saves it, then sets a flag.
An interrupt routine should never have things like HSEROUT, as that call alone takes more time than the interrupt itself. That is, if receiving characters at 9600 baud, an interrupt processed on byte at a time, and sending a string out simply locks up the next received byte (it is missed while sending output).
Things like string outputs should only be done in the main program. It can be interrupted as it sends, which is ok, provided the interrupt routine gets the trigger event and saves it, then sets a flag.