peter wrote: > Ok, NOW that the question and the quotation are both available, is > there a workarund ? I'm still not convinced that you understand the issue the manual is trying to explain. You started out saying the problem was with banks, which has nothing at all to do with the code sections the manual was discussing. And you persisted with this even after I explicitly asked if maybe you were referring to sections, not banks. > I would like code parts that belong in a segment What's a segment? That term isn't used with MPLINK. PICs have banks, pages, linker memory regions, and linker segments, all meaning specific and different things. The first step to understanding them is to use the terms correctly. > to be interspersed with, among other things, data they reference, and > parts of code that are closely related (like stubs). So you want to write some code, switch to defining some variables, then go back to writing some more code? This is certainly possible, though probably not a good idea in most cases. Why do the various pieces of code need to be in the same segment? If you're going to break up executable code with a UDATA segment, surely you don't expect to have the execution fall thru automatically from the end of the section above the UDATA to the one below it? Right? > Is this limitation deleted in newer MPLINK ? Not that I'm aware of. You can't have two separate definitions of the same section in the same module. Theoretically I can't see why that needs to be the case, since the linker can obviously handle multiple contributions to the same segment from multiple modules. > I understand that something > like a C compiler would logically emit assembly for each function > with its local data declared in overlayable vars etc, and this > information would appear grouped, with more than one function per > file. That is certainly possible. I haven't looked at when the C compiler creates new sections. It could also lump everything together. Again, I don't know and haven't looked at this. There are also various C compilers, so there may not be a universal answer. > But apparently such an output cannot be assembled by MPASM ? It certainly can. I have on unusual occasions put multiple code sections in a single module. You have to be very careful when doing this since they could end up on different pages and PCLATH handling must be performed accross these sections like you normally would accross modules. ****************************************************************** 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