【Keil5 C51】调用C51的库函数_crol_做流水灯实验
_crol_ 函数的介绍 Cx51 User’s Guide Summary # include <intrins.h> unsigned char _crol_ ( unsigned char c , /* character to rotate left */ unsigned char b ) ; /* bit positions to rotate */ Description The _crol_ routine rotates the bit pattern for the character c left b bits. This routine is implemented as an intrinsic function (从c变量中的b开始位 一次向左移动, 比如b = 1 时这串数字会这样移动:1111110–>11111101) Return Value The crol routine returns the rotated value of c.(把移动之后的值返回给c) Example # include <intrins.h> void test_crol ( void ) { char a ; char b ; a = 0xA5 ; b = _crol_ ( a , 3 ) ; /* b now is 0x2D */ } 流水灯代码