但是这种方法在51上是最快的方法了,也是KeilC预留的一个经典方法,相关的头文件如下 #define _setc_() CY = 1 #define _clrc_() CY = 0 #define _setb_(RBIT) RBIT = 1 #define _clrb_(RBIT) RBIT = 0 #define _clra_() ACC = 0 #define _movcb_(RBIT) CY = RBIT #define _movbc_(RBIT) RBIT = CY #define _movra_(RX) RX = ACC #define _movar_(RX) ACC = RX #define _movb0_(RBIT, RX) RBIT = RX & 0x01 //用于取RX的最低位 #define _movb7_(RBIT, RX) RBIT = RX & 0x80 //用于取RX的最高位 #define _rrca_() CY = ACC & 0x01 //产生RRC A指令 #define _rlca_() CY = ACC & 0x80 //产生RLC A指令 #define _rrcar_(RX) CY = RX & 0x01 #define _rlcar_(RX) CY = RX & 0x80 #define _xorr_(RX) RX ^= RX //用于取奇偶位P,且RX=0 #define _andr_(RX) RX &= RX //用于取奇偶位P,且RX=不变 #define _orr_(RX) RX |= RX //用于取奇偶位P,且RX=不变 #define _notr_(RX) RX =~RX |