;按键处理 KEY1: SETB P3.0 JB P3.0,KEY2 MOV R6,#10 LCALL DELY JB P3.0,KEY2 SETB P3.5 MOV R6,#200 LCALL DELY CLR P3.5 DEC 4AH MOV A,4AH JNZ KEY2 MOV 4AH,09H KEY2: SETB P3.1 JB P3.1,KEY3 MOV R6,#10 LCALL DELY JB P3.1,KEY3 SETB P3.5 MOV R6,#200 LCALL DELY CLR P3.5 MOV A,45H CPL A MOV 45H,A KEY3: SETB P3.4 JB P3.4,LIGHT MOV R6,#10 LCALL DELY JB P3.4,LIGHT SETB P3.5 MOV R6,#200 LCALL DELY CLR P3.5 MOV A,46H CPL A MOV 46H,A |