How Can I Rotate a Variable?

The C language does not have a rotate operator, but rotations can be performed using the shift and bitwise OR operators. Since the PIC devices have a rotate instruction, the compiler will look for code expressions that implement rotations (using shifts and ORs) and use the rotate instruction in the generated output wherever possible (see Rotation).