On Fri, Aug 02, 2002 at 08:48:53AM -0400, Olin Lathrop wrote: > > Maybe it may be worth thinking about writing a piece of Perl that will > > automate those conversions. Let's start generating another list: > > > > * Change the CBLOCK (I hope the code uses a CBLOCK!) from 0x1c to 0x20 > > I hope it doesn't. CBLOCK implies absolute mode, which should be scorned by > all beings more intelligent than the average trilobyte. > > RAM should be allocated with the RES directive. This would require no code > changes in moving from the 16F84 to the 16F628, just a switch to the linker > file for the new processor. Olin, I promise that I will agree to disagree. I know that you are right. I agree that you are right. But there are so many impediments to doing it right that it's almost not worth bothering to discuss. * The vast majority of all assembler code, and I think I can safely say all tutorial PIC assembler code is in absolute format. * And through no fault of yours ;-) some of us are not Windows users. And so linkers are not necessarily available. Check that: gputils does have a linker. I will have to test it out once I figure out how it works. Might you have a quick linker tutorial somewhere? > > > * Turn off the comparitors > > Note that this step would also not require code changes if using my > templates at http://www.embedinc.com/pic. The PORT module automatically > disables comparitors and A/Ds when present. These are enabled later only by > code that knows about and uses them. A few IFDEFs solve this problem for > good. See the QQQ_PORT.ASPIC module for the code details. > > > * Change the include file > > There should be no need to change your project include file. I think you > meant to say you need to change which processor-specific Microchip include > file is referenced. Correct. > > > * Change the processor in the LIST/device line > > This and the previous one are one line each once for the whole project. > > > * Update the config line. > > Yup, this should be inspected carefully everytime the processor is changed. > > All in all these changes are trivial if proper programming practice was used > in the first place. The problem is though that we're talking about rank novices that don't really understand what each of these mean. I plan to put together a conversion page. And after hearing you out, and agreeing with you, I think that it may need two phases: * 16F84 to 16F628 and... * Absolute to relative. BAJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.