AnsweredAssumed Answered

How to rotate lower and upper half-word of a 32-bit variable

Question asked by obid.matic on Dec 28, 2015
Latest reply on Dec 30, 2015 by obid.matic
Hi.

I would like to rotate lower and upper half-word of a 32-bit variable as in next example:

var = 0x12345678;  --> I would like to get 0x56781234;

How could I do this as fast as possible (time is critical)? I saw that there are some ASM instructions for that, but I don't know how to implement this in Keil in a .c file somewhere in between of a normal C code. Any suggestions?

Have a nice holidays.

Outcomes