Quentin wrote... >I am learning how to use the linker on MPLAB 6.10. > >So far so good, but something I realy don't like is the way you have >declair addresses and registers with GLOBAL and EXTERN, etc. Isn't there >a better way of doing it? Seems like a lot of extra work and when I am >going to do a large program I think it is realy going to irritate me. These directives allow you to control the visibility of labels outside the .asm module in which they are defined, allowing you to have "public" and "private" labels. Unless a label is declared GLOBAL in a module, it is visible only to the code in that particular module and is invisible to all other modules in a project. This allows you a great deal of freedom in naming variables and code labels, and reduces what I call "namespace clutter." How many times have you wanted to call a variable "temp", or a program location "loop", but you couldn't because those names were already used somewhere else in your program? By building your code with the linker, and keeping those labels private by not declaring them GLOBAL, you can re-use commonsense names as many times as you want, provided you don't try to define them more than once in each module. I don't know whether this is common practice or not (I'm just learning MPLINK myself), but I've been breaking up my projects into numerous files, each containing only a small number of related routines. The more I use the linker, the more I like it. Relocatable code is DEFINITELY the way to fly. >The help file refers to a .MAP file, where you can see your memory >usage, etc. I can't find any. Do I have to be set in on a command line? >If so where? I haven't used 6.10, but in 5.xx it's in the "Window" pulldown menu in MPLAB. There won't be a .map file unless your project has been built, though. Hope this helps... DD -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.