> Until now, I've been coding for PICs in assembly by > using the 'Absolute Code' style assembly.I've been > simply cutting and pasting code from one file to another. > And this method is not so good especially since there might > be namespace conflicts. Now that i've got quite some routines > which I use regularly in most of my projects. I'm thinking of > going for Object code, so that I can maintain my library as a bunch > of OBJ files. I think this can make things a lot easier for me. > > Any suggestions or Gotchas ? Or is Absoulte mode assembly in any way > superior to Object code based assembly ? I exclusively use object mode and the linker. It eliminates the need for "manual" control over some things, and of course each module gets its own local namespace. This is clearly the way to go for anything but a toy project. However, the binary library idea won't work as you think. The problem is that each project has a little (sometimes a lot) different configuration. This includes different processors, different banks reserved for things, different size and location of the software stack, etc. The linker isn't flexible enough to allow one precompiled object module to be configured for the different setups at link time. To get around this, my libraries of standard routines are source code include files instead of object files. Each project that uses a library routine has to create a 3 line module that references the project configuration include file, the library routine include file, followed by the END statement. For example, here is the 24 bit floating point multiply module for the HED project: include "hedlib.inc" include "..\pic\fp24mul.inc" end For a wider discussion of how I use the linker, include files, how I break up projects into modules, and template standard modules see http://www.embedinc.com/pic. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads