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

Indication to begin a program

I need some indications to begin writing a program.

Write a compare routine to compare 64-bits values , using only two instructions.

Thanks for your indications !

Parents
  • Fortunately, the answer to this question is the same for all Cortex-M microcontrollers.

    The answer can also be applied to the ARM7/ARM9.

    Because it can be solved on a Cortex-M0 just as easily as Cortex-M4 and ARM7, I recommend that you look at Cortex-M0, since the Cortex-M0 have fewer instructions than the others.

    Try taking a look at the ARM Information Center: Cortex-M0 General data processing instructions.

    All these instructions operate on 32-bit values only; there are no 64-bit instructions, as you probably already know.

    However, it is possible using two instructions, to accomplish the goal.

    ...Now the help does not end with my answer, it only begins here.

    How much do you know about the ARM instruction set(s) already - how would you for instance compare two 32-bit values ?

Reply
  • Fortunately, the answer to this question is the same for all Cortex-M microcontrollers.

    The answer can also be applied to the ARM7/ARM9.

    Because it can be solved on a Cortex-M0 just as easily as Cortex-M4 and ARM7, I recommend that you look at Cortex-M0, since the Cortex-M0 have fewer instructions than the others.

    Try taking a look at the ARM Information Center: Cortex-M0 General data processing instructions.

    All these instructions operate on 32-bit values only; there are no 64-bit instructions, as you probably already know.

    However, it is possible using two instructions, to accomplish the goal.

    ...Now the help does not end with my answer, it only begins here.

    How much do you know about the ARM instruction set(s) already - how would you for instance compare two 32-bit values ?

Children