On Mon, 2015-01-12 at 19:27 -0500, Anthony Toft wrote: > Hey folks, I am midway through writing my first relocatable code project = for a 16f876a, and have managed to confuse myself thoroughly... I just have the feeling that the wrong tree is being barked up here, although without seeing the map I can't be sure, Given what Anthony has said about the size of the code it doesn't seem like pages should be an issue. However, I rarely rely on the default linker script for PIC16 code so perhaps it is badly broken for the 676. I haven't done much PIC16 lately, but I do recall some of the default linker scripts did really stupid things. If I recall, the 676 has 4 pages, and if the code is less than 6% of the memory, then there is no reason to use anything beyond the first page. On the other hand, if he is developing a library he is going to re-use then he probably should test it with linker scripts that put the segments in different pages. I would suggest looking at the map, and if bad things are happening, fix the linker script. By planning where you put the segments you can usually avoid almost all the pagesels. Of course, if the code is so small perhaps the extra cycles don't matter, but it is nice to completely understand (and control) what is going on. But it is quite possible that looking at the map will indicate that pages aren't the problem, and you shouldn't be spending time barking up that particular tree. --McD --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .