> I finally broke down and wrote a macro > that pushes PCLATH values on my own PCLATH stack, > up to 8 deep. It's some tens of lines long, which > makes me anxious about it being used too much as > a macro. > ... > What's the best way to handle this situation? What I do is not require subroutines to preserve PCLATH. I have a bunch of macros that deal with this and related issues. See STD.INS.ASPIC at http://www.embedinc.com/pic. The GCALL (Global CALL) marcro sets PCLATH before a call, then restores it to the current page after the return. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics