OK. Two things... Either you decide, using the assmebler directives ORG (or CODE) MPASM (or MPLINK) to place your table(s) where they do not cross page boundaries (or rather *256 byte* boundaries with is the issue with lookup tables, not *page* boudaries). *Or*, you write your table lookup code so it takes care if any crossed 256 byte boundaries. That will take a few more cycles for each lookup, and if that isn't acceptable, you can use the first method. If you have multiple tables you can put them each in a separate 256 byte boundary, and then make sure that the rest of the code is using a lot od CODE directives so that MPLINK can make the best of the "puzzle". In either case the LST or MAP files will tell you where the table actualy are. Using relocatable code makes it all easier to put together in any case... Regards, Jan-Erik. Rikard Bosnjakovic wrote: > On 6/15/07, Jan-Erik Soderholm wrote: > >> Why do you have to know ? > > In an earlier project I ran into the problem that a look-up-table did > cross two page boundaries, so PCLATH screwed up big time. I think I > want to know how to make sure a LUT does not overlap two pages. I know > I can put it in the beginning of the code (which I did to solve the > last problem), but if there's a neather way - like telling the linker > to making sure the code snippet gets uninterrupted - I wouldn't mind > knowing about it. > > I'm not sure if I should consult the mplinker- or the mpasm-manual for > this type of question, but probably the former. > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist