> > Richard Mulvey wrote : > > > Hi All: > > > > I'm one of the relative newbies to the PIC ( and > > microcontrollers > > in general ), here, though I come from 15 years in applications > > development in C/C++/Java etc. One thing I've noticed is that the > > vast majority of asm code I find relating to the PIC is all written > > in absolute mode, and not relocatable mode. Is there any particular > > reason for that? > > Simplicity, maybe ? And old habits. > > > It seems more than a little odd to find extensive > > web pages full of projects, in which the same code is simply > > duplicated > > over and over in multiple copies of files, some of which are obviously > > just earlier versions that never got updated. In one of the books > > I'm reading, the author explicitly states that he never uses > > relocatable mode, because the linker is too slow, etc. > > Just silly... Must be a realy old book from the IBM PC-XT timeframe :-) > Actually, it's a new edition of a book by an author who has gotten mentioned here in a positive light several times, which is why I didn't specify the title. ;-) > > Anyhow - is there some inherent advantage of absolute mode that > > I'm missing? > > It *is* easier to learn as a newbie. > I suppose in some senses it could be, though from my perspective as someone who has bought a couple of different PICs to play with, it seems much easier to me to just be able to specify "This is code, this is data", and not have to remember that I can start at 0x20 on one processor, and 0x3c on the next. ;-) > > It seems like just having a library of routines available > > that can be easily source controlled and made availible to multiple > > projects makes far more sense than the endless use of include files. > > Absolutly ! :-) :-) > Especially when I've also noticed that a lot of example code on the web seems to have large number of subroutines that never actually get called, but are still being included in the absoluete code... where a library and linker would remove the extra cruft. > I begun using relocatable code simply by just starting using > the development environment that Olin Lathrop provides (for free !). > See : "www.embedinc.com/pic/". > I'll have to check it out - thanks! - Rich -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu