Michael Rigby-Jones wrote: ......... >> >> Trying to fine-tune the C to get the "desired" asm output sounds >> like a losing proposition, for several reasons. And obviously, >> using inline asm to get determinism is not coding in C. >> >> C = determinism = I doubt it [polite form of NO!] >> >With the majority of real time applications, only a relatively small part of >the code is critical. The beauty of C is that the rest of the code can be >written quickly and reasonably efficiently, and time critical sections can >be written in ASM. > Bingo. ========== >You *can* write deterministic code in C, but you could be shooting yourself >in the foot as it is quite likely to be more difficult and time consuming >than using ASM (e.g. having to refer to the compilers ASM listing and then >tweaking the C code). > Bingo, bingo. =========== >You seem to be a little "anti-C"? If you work in a market where time to >market is probably the single most important factor, then you'd really see >the benefits. > Anti-C - not at all. It's my favorite language, by far. I just learned years ago that you can compile printf("hello, world"); using different compilers, and get vastly different codesizes & runtimes. You never know what you're gonna get - esp after you change something. Depends upon the compiler, how/whether it optimizes/etc. In fact, on the PC [80x86], I often take the asm output file from a C compiler, fine-tune it to get exactly what I want, and then link the massaged file back in, in place of the original C. The asm file keeps all of the housekeeping garbage that makes it compatible with the rest of the C program. Best of all worlds [in my tiny realm]. beat regards, - danM -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu