本帖最后由 刘前辈 于 2011-4-7 18:23 编辑
执行最快的代码:
#define _rlca_( ) CY= ACC & 0x80 //装载代码 RLC A
#define _rrca_( ) CY=ACC & 0x01 // RRC A
sbit a1=ACC^0;
void main()
{
static uchar aaa=1;
ACC=aaa;
_rlca_() ;
a1=CY;
aaa=ACC;
……
while(1);
}
编译结果:汇编4句:
21: void main()
22: {
23: uchar aaa;
24:
25: aaa=1;
C:0x080C 7F01 MOV R7,#0x01
26: ACC=aaa;
C:0x080E EF MOV A,R7
27: _rlca_( ) ;
C:0x080F 13 RLC A
28: a1=CY;
C:0x0810 92E0 MOV a1(0xE0.0),C
29: aaa=ACC;
30:
、 |