> > > More, the serial_hw_write looks like this: > > > procedure serial_hw_write(byte in data) is > -- wait until TXREG is empty > while ! PIR1_TXIF loop end loop > -- then put new byte in TXREG (prepare for transmission) > TXREG = data > end procedure > > > Now, comment "TXREG = data" in the lib (or the "while" line), and compile > the contrived ISR echo sample... Core dumped !!! >
Actually, leaving the "while" line does not produce a core dump, my mistake. But, just commenting the "TXREG = data" really does produce a core dumped. I also guess since the "while" line is about checking a variable involved in interrupts (PIR1_TXIF), I guess this is why this procedure does not behave in an ISR context. More, the asm seems to show (I'm not asm guru) it's about saving some context. Since PIR1_TXIF is involved in interrupts, maybe the compiler thinks it has to save some context while calling this procedure. Seb -- Sébastien Lelong http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
