andrew kelley wrote: > How would automatic intelligent banking for call's and goto's work > multiple code page PIC's (in a linker or assembler)? I mean, if you > were to have a piece of code on the boundary that would be pushed onto > the next page with the addition of banking instructions, how would the > assembler know what to do for max efficiency? The assembler doesn't know where a piece of code will end up and therefore can't adjust for it. However, your problem isn't an issue in reality since the rest of your code likely can't tolerate page boundaries at arbitrary locations anyway. The best way to deal with this is to make each page a separate linker memory region. That way you are guaranteed that any code section will be placed entirely on a single page. Then keep PCLATH set for the current code page, so that means you can do local CALLs and GOTOs within the same code section with single instructions. PCLATH must be set right before an external call and restored right after. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist