hi: i've been up and down the PIClist site and MPLAB helps trying to answer a few questions. i found out that if i don't assign my data sections to a bank in the .lkr script, some of it is likely to end up in bank 2. in this case, this is with the PIC16F628A. i had data getting hosed before i put the offender in the same bank. here's a snip?: test macro label UDATA local d1 res 1 ... endm in the map file it turns into _ld1 before i assigned the thing to a linker SECTION, i did this BANKSEL d1 decf d1 BANKSEL 0 ; since in and include file or other module, i might not know what variable/bank the code will be executing when it leaves the macro function code 1. is BANKSEL 0 ok. all examples use the next variable accessed in a new bank instead of 0. 2. now that i'm using the linker, i get no .lst file so i can't see what the first asm pass does. does BANKSEL generate a bsf STATUS, RPx or FSR/INDF instruction? 3. it's probably going to be better to put my macros and functions in a .asm file rather than an .inc file, right? use the librarian once i figure it out? no inclusion guards neccesary for one thing. 4. if i have a file of code that i want to link in to a project, i might not remember much about how it worked/linked with a prior project. i can't have link directives in the file that specify addresses because another module might try the same thing. i could build the project, look at the map file and tweak the .lkr script. then, but if something just *has* to go in another bank, i'd have to go back and stick BANKSELs in to library code, or maybe not if it's already a relocatable object file. what's the best way to handle this? 5. will the linker toss out unused functions in an object file? any good ways to control this? thanks in advance, mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics