> The PICLIST archives have a fairly large collection of similar questions in > them. Basically, what you need to do is set PCLATH back to the local value > after the return, but that implies knowing where you are to start with. > Since the hardware stack is 13-bits wide, you don't need to reset PCLATH > before returning. > > I'm a little confused about why Olin is mentioning storing the STATUS > register, since it has no bearing on the PC. That's only relevant for > setting the register pages, not the program pages. The segmented RAM regions are called "banks", and the segmented program memory regions are called "pages". The original question was about *banks*, which are selected in the STATUS register. ***************************************************************** 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