??? 06/22/09 15:50 Read: times |
#166352 - for a simple task ... Responding to: ???'s previous message |
Using a compiler is fine for folks who know how to program. However, beginners haven't got the discipline to program embedded applications, and, syntax and orthography aside, if they lack the ability to construct a simple procedure, using a compiler will just muddy the water. My personal preference for ASM springs from the fact that I frequently use different MCU's, and the fact that I seldom have to create code the timing of which is unimportant.
I maintain that one who can't create useful programs in ASM can't create useful and effective programs for embedded environments at all. It's a matter of discipline, and not a matter of the choice of language with which to express the logic. This does not mean that one shouldn't use HLL's, but, rather, that one should learn how to program before attempting to do it in HLL. I agree with the notion that one should look at a compiler's output with optimization turned off in order to see what it generates. I also believe one should look at what the compiler generates with optimization turned on, then compare it with what one can generate in ASM. That way one can learn what one should write in ASM vs. what one can go ahead and write in 'C' or other HLL. Unfortunately, going through this process is too much work for most people, so they go ahead and stumble through the process, creating code that's sometimes 2-3 times as large as, and considerably slower than it needs to be, and allowing their victims (employer/client) to suffer the cost/performance consequences seems to be the rule rather than the exception in "best commercial practice" of the day. RE |