Francois Robbertze wrote: > Does this mean that the PCLATH <4,3> will still be set according to > Page1 after the return, A RETURN instruction does not alter PCLATH, so it will contain the same thing after the RETURN as it did before. > so that I need to clear the PCLATH register > again after the call returned from page 1 That depends on what you plan on doing with PCLATH. I use the convention that PCLATH is set for the current execution page so that local GOTOs and CALLs within a segment (which I've previously arranged not to cross page boundaries) don't need to mess with PCLATH. The flip side of this is that you need to set PCLATH before an external CALL or GOTO and restore it to the current page after return from an external subroutine. This is automated in my GCALL and GJUMP macros in STD.INS.ASPIC at http://www.embedinc.com. Explicitly clearing PCLATH is a bad idea unless you have taken steps to guarantee that the code is in page 0, in which case there should be a prominent warning. In my code, clearing PCLATH is only done in the interrupt handler since that starts at location 4 by definition. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist