>> Should the contents of W survive a subroutine return? > > (if saved to a temp file and then restored) yes > >> Should they survive a call to a subroutine that only executes "return" > > AFAIK, yes I don't have the full context here, but I generally assume that W gets trashed on call and return to/from global subroutines. This is because W may be used to set PCLATH. After the return, W may again be used to restore PCLATH to the current page. See my GCALL, GCALLWR, and GCALLR macros in STD.INS.ASPIC at http://www.embedinc.com/pic. These differ in how the value in W is treated on the return from the subroutine. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads