翻译延时函数部分:
DELAY:
DL0: MOV R6,#100;
DL1: DJNZ R6,DL1
DL2: DJNZ R7,DL0;
RET
举例:
if(JCBZ==1) //解除状态
{
DHKZ=0; //发动机点火允许
CMBF=0; //关闭车门开启检测
}
翻译为:
JB JCBZ ,L_JIECHU
LJMP NEXT
JIECHU:
CLR DHKZ ;
CLR CMBF;
NEXT: .....