Olin, Thank you for your reply. > You don't need to set/restore PCLATH around the > call if it's in the same module (same code page), but you should if > it's in a different module (might not be same code page). I think I do not yet understand enough to ask the proper question. Here's what I am seeing in the simulator: 0 - Before lookup call, PCLATH=0x07 1 - Then I call a lookup table subroutine with index in W. The call is in the same code page. The table spans a code page. 2 - The table spans the 0x0800 page boundary. After the retlw, PCLATH=0x08 3 - Execute instruction following call to lookup table subroutine , PCLATH=0x08 4 - The next call encountered executes code that does not exist in the 0x0800 page I assumed the next call went nuts because the lookup routine returned with a modified PCLATH. Does this make sense? > See my GCALL (global call) macro in STD.INS.ASPIC at I will take a look up at your GCALL macro. Maybe I will see the light then. Thanks again for your help. -Ed -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads