On Mon, Nov 12, 2012 at 06:02:32PM +1100, David Meiklejohn wrote: > Jan-Erik Soderholm wrote: > >=20 > > But yes, use relocatable code and all that ORG'ing of different pieces > > of code together goes away. The CODE directives will let the linker > > sort it out. >=20 > If you're not familiar with relocatable code, see my PIC assembly tutoria= ls > (http://www.gooligum.com.au/tutorials.html), in particular "Writing Modul= ar > Code": http://www.gooligum.com.au/tutorials/midrange/PIC_Mid_A_2.pdf. Th= e > approach suggested in that lesson is not to #include the file containing > your subroutine, but to add the source file to your project tree. When y= ou > build your project, only the parts of it which have changed will be > re-assembled (not true if you #include), and the linker pulls it all > together. Overall it's a cleaner approach that will scale as your projec= ts > grow. >=20 > But in any case, use CODE, not ORG! >=20 > Cheers, > David Meiklejohn > www.gooligum.com.au Thanks for the pointer David. I'm trying to give the MPLABX simulator a serious test and quickly came to the realization that absolute assembly with includes simply isn't going to cut it. Your tutorial is as concise a summary I've seen for generating relocatable code. Thanks again. BAJ >=20 >=20 >=20 >=20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 Byron A. Jeff Chair: Department of Computer Science and Information Technology College of Information and Mathematical Sciences Clayton State University http://faculty.clayton.edu/bjeff --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .