I "THINK" that if you are VERY careful, you "could" use libraries for families of processors. EX: Polled mode SPI routines "should" be the same for all mid-range processors that include the SSP module. So assuming the above EXample, then that lib with SPI stuff in it, would be (basically) processor independant across those mid-range processors that include the SSP module. So once the processor is configured to use the SPI then you could just call the various SPI routines. I use SPI as an example because I think I am very close to having a set of rountines that I could make into a library (read: I havn't changed code in a long time.) I think some careful examination of libraries may be in order. I think they don't get used as we change code so much that it is not really that practical. Also, since PICs are VERY memory constrained you don't want to link in things you don't use. Although, libs may not link in unused modules. I don't know at this second. This topic may require a bit more time and thought, which I don't have for this issue. Although it is an interesting one. -Walt... -----Original Message----- From: Martin SchŠfer [mailto:schaefer@ELEKTRONIK21.DE] Sent: Monday, May 15, 2000 7:45 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: relocatable code for different processors Hi Walter, your advice is quite nice. But if you use 'if'-statements, you cant compile a module one time and link it than as object (.o). You have to recompile it for every new processor-project. You cant either put it in a library. I thought of a kind of include file for multiple processors. But I think this is not working because MPASM needs for every compiling session one single 'processor'-statement. This means, that libraries are only useful, if you program mainly one processor. Or you create for every processor one special library. But then you have a lot to do. Am I right? martin ;********************************************** ;** name: Martin Schaefer ** ;** company: elektronik 21 GmbH, Germany ** ;** e-mail: schaefer@elektronik21.de ** ;**********************************************