> Given that the hardware was the main constraint, I modeled the problem (in > Excel) and proved that the C compiler offered for the task could not > generate the code required to produce the desired output from the PIC. > > Just out of curiosity, how did you manage to do that? I wouldn't expect > even the best of compilers to well-documented enough to produce an accurate > excel model... You misunderstood. :^) I created an Excel spreadsheet to model the system (different interrupt timings, etc.) by hand (actually created three separate models representing three different ways of doing the same function) and then showed, separately and also by hand, that the compiler's best output could not match the requirements of the model(s). > > The project, which was really very small code footprint, could only in > done in assembly. > > The smaller the program, the easier it is to outperform a compiler using > assembler. The converse is also true: the larger the program, the more > difficult it is to maintain that edge. Treating every line of a 50k line > program with the discipline to maintain "full" optimization is a lot easier > for a compiler than for a human... I've never seen a 50k line PIC C program... Douglas Wood Software Engineer dbwood@kc.rr.com ICQ#: 143841506 Home of the EPICIS Development System for the PIC http://epicis.piclist.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads