??? 03/22/05 21:17 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#90269 - Certainly not a liability! Responding to: ???'s previous message |
Ian Bell said:
Donald Catto said:
Have you forgotten about the standard 'C' library? No I hadn't. IMHO it is more of a liability than an asset in 8051 embedded systems. I reckon 95% or more of the functions have no relevance to embedded systems and the remainder soon find their way into your own assembly language function library. YMMV. Ian Even if you do not like or do not use most of the C standard library, that does not render it a liability. A good compiler, Keil among them, will only link in the functions that you actually call from your code; you do not pay for what you do not use. So, even if only 5% of the library appeals to you, it is an asset. Secondly, there are alternate implementations of a number of standard library functions for various derivatives; these varied implementations leverage the special features found in the derivatives they target. For example, Keil has a special version of memcmp() that benefits from the way dual data pointers are implemented in the DS89C4x0 for a performance benefit. While your own library of assembly functions might very well include something with the functionality of memcmp(), it probably does not include derivative-specific optimzations for the vast majority of devices on the market. I am quite content to leave the duties of writing things like this to the compiler makers, and enjoy knowing that when I invoke memcmp() from a properly built project, I have a good chance of executing a bug-free, nicely optimized version of it. --Sasha Jevtic |