ORG 00H MAIN: MOV P1,#11111111B;Trạng thái led sáng hết CALL DELAY MOV P1,#11111110B;Led p1.0 tắt CALL DELAY MOV P1,#11111100B;led p1.0 tắt,p1.1 tắt CALL DELAY MOV P1,#11111000B CALL DELAY MOV P1,#11110000B CALL DELAY MOV P1,#11100000B CALL DELAY MOV P1,#11000000B CALL DELAY MOV P1,#10000000B CALL DELAY MOV P1,#00000000B CALL DELAY JMP MAIN DELAY: MOV R0,#200 LAP: MOV R1,#200 LAP2: NOP NOP NOP DJNZ R1,LAP2 DJNZ R0,LAP RET END