William Chops Westfield wrote: > My impression is that "relocatable" code is apt to insert bank > switching or page switching code in instances where absolute > code could have been hand-optimized (with the usual chance of > being done wrong, of course) to avoid them because it "knew" > that the register or code destination was in the same page. > > Is that wrong? Yes. Relocatable mode is mostly a superset of absolute mode. You can nail variables to specific addresses if you want, but you also have the option of only nailing them to a bank and let the linker place it within the bank and also tell you if you tried to put too many variables in that bank. In the system I use, I know at assembly time what bank every variable is in, but not its specific address. If you let variables float anywhere, then yes your code would likely contain more bank switching instructions. But that's not a result of relocatable mode but the fact that you didn't specify banks at assembly time. Relocatable mode does not force you to let variables float. ****************************************************************** 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