The task is to write code in arm assembler using no more than 4 instructions that swaps the two middle bytes in a given 32-bit word. For example if the word is
0xAABBCCDD the result should be
0xAACCBBDD. You may use at most 4 arm instructions from the set
EOR and shifts and rotates. You have the word in
r0 register. As a hint they gave following identity
A XOR(A XOR B)=B.