If I am right every C-compiler uses optimizer from gcc (Llinux). PIC 18x has implemented addressable stack but C18 compilek doesn't use it at all. I can't agree to do a really good optimizer is not very hard work but it should be done producing compiler for a group of micros. BTW Keil compiler for 51 uses registers anytime where it's possible but there is a memory part too because ... one never knows.... Regards Igor > Any compiler ought to be smart enough to put all the global variables > into registers (if they fit.) (to be fair, it wasn't clear whether > they meant this mainly for the cases where not all the variables fit > in registers; using local variables makes it possibles (or at least a > lot > easier) to determine when you can reuse a location because it's not > used anymore...) Any good compiler ought to be able to reference > global memory as offsets to a global heap pointer if the improvement in > memory utilization is that significant... (although I don't know how > hard that would be, really.) > > BillW Exactly! And with regard to how difficult it would be, answer: not very hard. Regards Sergio Masci -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.