Hi guys,
First of all, I'm using a LM3S6950 Arm Cortex M3 microcontroller with Keil MDK 3.70. I'm programming in C, Thumb Mode.
For converting low endianess to big endianess I want to use the rev and rev16 instruction.
32 Bit swaps can be done with the build in __rev() inline C function (http://www.keil.com/support/man/docs/armccref/armccref_cjaeegce.htm)
How can I do this with the 16 bit instruction since inline assembler isn't supported in thumb mode?
Thanks for your replies br Robert
...just in case (a) is an expression.
also, I am not sure why you need to to the & operation before shifting, assuming a is 16bit or shorter.
I realize that. What I did was copy&paste from this presentation (page 4): www.newark.com/.../LMTTCM3.pdf