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

Count Instructions.

Hi,

I am using a C code in a 8051, I would like to know if there is any way of counting who match instructions I am using in these C code.In my case,it is important to know the "exact" number of µs that this code will need, because I am also using a timer, and these one has to be precise.

Many thanks

Parents
  • And even if you count the instructions by hand (say in the .lst or .cod output) for one case, there is no guarantee that the C compiler and optimizer will always generate the same sequence of instructions for the same code.

    If you have to time based on instruction count, and you must be sure, use assembler.

Reply
  • And even if you count the instructions by hand (say in the .lst or .cod output) for one case, there is no guarantee that the C compiler and optimizer will always generate the same sequence of instructions for the same code.

    If you have to time based on instruction count, and you must be sure, use assembler.

Children