> (Just as a note, the page bits (PCLATH) are set when you do your > call and restored on return. PCLATH is **NOT** altered by a CALL or RETURN. > Typically the page bits in PCLATH are manipulated when you modify the > program counter PCL, as in the case of a computed goto. Otherwise, you > really don't have to worry about PCLATH much.) No, no, no! You have to worry about PCLATH whenever you do a CALL or GOTO to a location that could be on a different page. After a subroutine returns, PCLATH is set the way the subroutine left it, which is usually pointing to its page. This can mess up GOTOs that otherwise go to addresses known to be on the same page. ***************************************************************** Olin Lathrop, embedded systems consultant in Devens Massachusetts (978) 772-3129, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.