??? 03/17/05 14:40 Read: times Msg Score: +1 +1 Informative |
#89870 - Asm vs C Responding to: ???'s previous message |
Donald Catto said:
I suspect that is because you are writing 'C' from an assembler programmer's viewpoint. To reap the benefits of 'C' you need to think like a 'C' programmer... Not really. I was programming in 'C' long before I was writing 8052 assembly language. But since I'm quite a capable 8052 assembly language developer, I am also able to recognize when "reaping the benefits of C" will come at an unacceptable cost in efficiency in terms of what kind of code the 'C' compiler will generate and I am able to balance the relative costs and benefits of each approach. Sometimes bending the "C rules" allows the compiler to generate much more efficient code. This comes back to differentiating a typical 'C' programmer from an embedded 'C' programmer. Pretty much any 'C' programmer can write a 'C' program for the 8052--but not all 'C' programmers will be able to write efficient 'C' programs for the 8052. Regards, Craig Steiner |