| ??? 07/17/03 16:18 Read: times |
#50913 - RE: promo schematic and c code Responding to: ???'s previous message |
What they fail to address in a big way is the hardware abstraction that the OS provides when coding in C for desktop applications - one could have written so many programs in C and still be completely ignorant of the x86 processor registers/ports and the like.
This is true of most high level programming languages. What makes C different I believe is that it doesn't prevent you from getting down to the low level stuff...hence its use in writing the OSs themselves. I rarely if ever use the C library functions which provide this hardware abstraction. As far as setting hardware registers and such goes, C allows access just like assembler. I am in full agreement with Michael that a full understanding of the hardware is required to write embedded C code. It's one of the reasons I have the job I currently have...the previous occupant of my desk was a PC apps programmer that didn't have a clue about the uC hardware. It's also one of the reasons I enjoy this job, where programming and hardware are inseparable. Efficient embedded C programming is more difficult than assembler, in that it requires knowledge not only of the hardware, but also of the compiler and the compiling process. I should have thought of that when I tried to answer Waqar's request. Dennis |



