??? 01/03/09 07:56 Read: times |
#161267 - this depends on type... Responding to: ???'s previous message |
... but if Po is of an 8-bit type, then for example:
unsigned char Po; #define ROR(a) (((a) >> 1) | ((a) << 7)) Po = ROR(0x45); should do. With a constant as "input parameter" this should evaluate to the "rotated" constant at compile time; however if you would attempt: unsigned char x,y; [some code assigning a value to x] y = ROR(x); the efficiency of rotation would depend on the particular compiler's ability to "decipher" this sort of expressions. JW |
Topic | Author | Date |
Can Rotate Instruction is possible in Embedded | 01/01/70 00:00 | |
this depends on type... | 01/01/70 00:00 | |
Compiler-specific![]() | 01/01/70 00:00 |