I trust you are not being flippant) but you are correct.
I was little sarcastic, but what I said is still true. I could have said that "C compilers have bugs because they are written using assembly", but that is not true. Only the first compilers were programmed in machine language.
I see this topic coming up about twice a year and it is always the same "fight" between ASM and C. I get the feeling that there a more experienced assemblers in this forum than experienced C programmers. And way more PIC users than AVR. But I think we all agree that we need both languages. I won't miss Java, C# or C++ in the world of microcontrollers, but C and ASM are both essential languages in embedded software. You just have to pick one that suits your needs. Here is a short list of pros and cons of both languages (as I see them). Add to the list please
C:
+ Extremely reusable and modular.
+ Portable from platform to platform (standardized language).
+ Large projects relatively easy to manage.
- Genereates considerable overhead.
ASM:
+ Gives full control to the user.
+ Extremely efficient in code size and performance.
- Large projects difficult to manage.
- Not portable between architectures.
Code lasagne, not spaghetti!
Last edited: