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
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.
"there is no guarantee that the C compiler and optimizer will always generate the same sequence of instructions for the same code." You should write this out 100 times, and pin it to your wall!