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

about code size

hi, I'm a C51 beginner,I writen a C51 program which generated binary code about 30Kbytes, but in .asm program,it generated binary code only about 16Kbyte. How can I save the C51 program's code size? thanks!

Parents
  • Are the 2 programs doing the same thing?

    Or have you used things like printf?

    Are you an experienced Assembler programmer? If so, you should be able to look at the compiler output and see where the "ineffiency" lies

    What optimisation setting are you using?

    In 'C', it is very easy to write very inefficient code!

    Have you read Appendix C, "Writing Optimum Code" in the C51 manual?

Reply
  • Are the 2 programs doing the same thing?

    Or have you used things like printf?

    Are you an experienced Assembler programmer? If so, you should be able to look at the compiler output and see where the "ineffiency" lies

    What optimisation setting are you using?

    In 'C', it is very easy to write very inefficient code!

    Have you read Appendix C, "Writing Optimum Code" in the C51 manual?

Children