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

Need help on 8051 assembly code optimization

We are developing a product on 8051 microcontroller. We have done coding using assembly language. Right now our code size is very high and is overshooting the allocated ROM size.

We have started code optimization using “code optimizing tips†and by “optimizing the designâ€. But from “assembler and linker†I am unaware of any directive available for code optimization.

Please let me know for any tools/KEIL options which help in "Assembly code optimization" (Eg: Identifying repeated patterns, identifying duplicate expressions, removal of dead code, Suggesting right instruction etc…)

Parents
  • a novice assembler programmer may, indeed need to 'optimize' his assembly, a seasoned assembler programmer will automatically write optimum code (if he did not need optimum, he would use C).

    conclusion: a novice assembler programmer has the same chance as a tailor in hell, a seasoned assembler programmer does not need to optimize, it is already dome.

    sure, a seasoned assembler programmer can, occasionally, squeeze a few bytes or a few microseconds out by reviewing his code, but that would be a nominal gain.

    anyhow, if the OP would show some code it could be judged if any particular method is suboptimum

    Erik

Reply
  • a novice assembler programmer may, indeed need to 'optimize' his assembly, a seasoned assembler programmer will automatically write optimum code (if he did not need optimum, he would use C).

    conclusion: a novice assembler programmer has the same chance as a tailor in hell, a seasoned assembler programmer does not need to optimize, it is already dome.

    sure, a seasoned assembler programmer can, occasionally, squeeze a few bytes or a few microseconds out by reviewing his code, but that would be a nominal gain.

    anyhow, if the OP would show some code it could be judged if any particular method is suboptimum

    Erik

Children
No data