This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Understand The 8051's Capabilities and C51 Assembly Output.

One of THE worst things you can do in C51 code is to haphazardly use integers where unsigned chars (bytes) will suffice. Particularly when indexing arrays.

While this may seem obvious to some, in my years of changing diapers (i.e. working on code written by other's who are now off destroying some other company's software department) I have run across this mistake countless times, where the non-obvious result is at least over-bloated code and/or, at worst randomly dysfunctional code.

Does ANYONE in this industry bother taking the time to inspect the assembly code resulting from a compile? Does anyone even care? ...or is 95% of the industry filled with hacks who verify their code by functional "appearance" alone? My experience suggest the latter.

The Moral:
Keil C51 is without question top notch, but its not magic. Thus, do your career and your company a favor an make an effort to understand the 8051 indepth and understand what is and what isn't good C51 programming techniques.

[end rant]

Parents
  • don't *** at these guys or give insulting answers. Help them (give them the answer if you have it - not the manual section

    a comment on this by two examples:

    If someone in the question makes it obvious that (s)he is familiar with the basics I believe an answer is forthcoming every time.

    Answering someone that does not know what IDATA means with a direct answer (it is...) is not a help. Such questions are, and should be, referred to Please read the manual. At that level only a study can bring about enough knowledge to even manage to get by.

    The above just, once more, states the theme of this thread "if you do not want to familiarize yourself with the '51 - do not use it"

    Erik

Reply
  • don't *** at these guys or give insulting answers. Help them (give them the answer if you have it - not the manual section

    a comment on this by two examples:

    If someone in the question makes it obvious that (s)he is familiar with the basics I believe an answer is forthcoming every time.

    Answering someone that does not know what IDATA means with a direct answer (it is...) is not a help. Such questions are, and should be, referred to Please read the manual. At that level only a study can bring about enough knowledge to even manage to get by.

    The above just, once more, states the theme of this thread "if you do not want to familiarize yourself with the '51 - do not use it"

    Erik

Children
No data