> I have the global call macro below. It restores the caller's page, but does > not restore the caller's bank (The bank before the call is made). How do I > make it restore the bank also? You would have to save/restore the status register. I don't think that is a good thing to do in the macro, because having it know where to save STATUS is messy. I use the convention that subroutines can trash the bank settings unless explicitly defined to preserve them. My GCALL macro automatically invalidates the assembler bank assumptions, so all the bank bits are explicitly set by the next DBANKIF macro. You could define your subroutines to generally preserve the register bank, but I think you will end up with a lot more unnecessary code than the other way around. ***************************************************************** 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