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…)
There's no nice way of putting it, so I'll be blunt: for what you're trying to do now, the original decision to do this code in assembly was spectacularly wrong. maybe, not necessarily
By coding assembly you assumed complete responsibility for all aspects of the code's performance. which, with skill and experience, is the right way to go for critical code.
Erik
maybe, not necessarily
Given what he's asking, there's really nothing "maybe" about it.
which, with skill and experience, is the right way to go for critical code.
True, except that the OP clearly lacks the skill, and doesn't appear eager to acquire any experience. And in that case, it's the wrong way.
I agree with your statement as applied to the impression given by the OP but not as a general statement.
But then again: We have to balance our answers to the requirements and capabilities of the requester.