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
  • "is any way of counting who match instructions I am using in these C code"

    Look at the generated assembler.
    It's one of the Listing Options.

    "In my case,it is important to know the "exact" number of µs that this code will need"

    In that case, you must do it in assembler.

    'C' gives you absolutely no guarantee whatosever that any particualr 'C' source will generate any particular set of machine instructions.

Reply
  • "is any way of counting who match instructions I am using in these C code"

    Look at the generated assembler.
    It's one of the Listing Options.

    "In my case,it is important to know the "exact" number of µs that this code will need"

    In that case, you must do it in assembler.

    'C' gives you absolutely no guarantee whatosever that any particualr 'C' source will generate any particular set of machine instructions.

Children