_cror_
Summary #include <intrins.h>
unsigned char _cror_ (unsigned char c, unsigned char b);
/* character to rotate right */ //循环右移b位
/* bit positions to rotate *///循环右移的数位
Description The _cror_ routine函数 rotates the bit pattern for the character c right b bits. This routine is implemented 应用as an intrinsic内部函数 function.
Return Value The _cror_ routine returns the rotated value of c.
See Also _crol_, _irol_, _iror_, _lrol_, _lror_
Example #include <intrins.h>
void test_cror (void) {
char a;
char b;
a = 0xA5;
b = _crol_(a,1); /* b now is 0xD2 */
unsigned char _crol_ (unsigned char c, unsigned char b);// 使无符号字符循环向左移动b位
unsigned char _cror_ (unsigned char c, unsigned char b);// 使无符号字符循环向右移动b位
#include <intrins.h>
unsigned int _irol_ (unsigned int i, unsigned char b); /* integer to rotate left */ /* bit positions to rotate */
#include <intrins.h>
void test_irol (void) {
int a;
int b;
a = 0xA5A5;
b = _irol_(a,3); /* b now is 0x2D2D */
}
#include <intrins.h>
unsigned long _lrol_ (unsigned long l, unsigned char b); /* 32-bit integer to rotate left */ /*
bit positions to rotate */
#include <intrins.h>
void test_lrol (void) {
long a;
long b;
a = 0xA5A5A5A5;
b = _lrol_(a,3); /* b now is 0x2D2D2D2D */
}