>2) what code does the psuedo-mnemonic "BANKSEL var" generate? Surely a look at the resulting code will tell you that. If, as you mentioned in a later email you are not getting the list file, then you have the wrong option somewhere, as someone else pointed out. >i'll let the rest go for now. You may have to swallow your pride on that, see below. > i was hoping to find a good way to control memory allocation >when building multiple modules... without having to remember >how the data for each module that i wrote in the past was >allocated and then having to tweak the linker script. Well you are always going to have to remember which bank you allocate something to, as the banking arrangement is not conducive to having things automatically switched between banks. AFAIK even the C compilers require some sort of determination along this line by the PIC programmer writing the code. >if i let the linker decide where to put the stuff, as i said, i >have to mess with BANKSEL. how will i know what bank to select >if i'm letting the linker decide where to put it? if i tell the >linker what bank to to put it in with the linker script, it >might as well be absolute code. No. Now is the time to swallow your pride and have a look at how Olin does his macro suite. As he mentioned MPLAB is a basis on which 3rd party tools can hang, and he has an excellent suite of macros which will handle all the banking issues of dealing with RAM, and paging issues for code, in a nice package that allows you to put his DBANKIF macros everywhere for each RAM access, and they will do a conditional assemble of suitable banking code only if it is needed. The BANKSEL macro in MPLAB will always generate code, even if it is not needed, thereby bloating and slowing your code down. The DBANK series of macros minimise the code bloat due to banking selection, and hide it all from you. Now go to http://www.embedinc.com/pic/ and get the development suite, and the example projects, and be a happy chappie, with a heap of macros that will solve the specific problem you were asking about, and a host of others as well. Olin has done a lot of development work on this, and has taken the time out of his busy work schedule to make it available. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body