> I've fixed it with a small macro which checks the program location (page) > where it inserted and "restores" (set it with the right values) the PCLATH. There is a pseudo-op called PAGESEL that does this. The advantage of PAGESEL is that it works with the linker so that you don't need to know what page you're on at assembly time. Please fix your reply address so that the default is to the list instead of you. I'm getting tired of fixing it manually every time. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu