ORG 0000H MOV P1,A MOV P2,A MOV P3,A MOV 40H,#0CCH MOV 41H,#0CCH NEXT_4: JNB P1.0,NEXT_1 MOV A,40H MOV P2,A LCALL DELAY RR A MOV 40H,A NEXT_1: JNB P1.1,NEXT_2 MOV A,40H MOV P2,A LCALL DELAY RL A MOV 40H,A NEXT_2: JNB P1.2,NEXT_3 MOV A,41H MOV P3,A LCALL DELAY RR A MOV 41H,A NEXT_3: JNB P1.3,NEXT_4 MOV A,41H MOV P3,A LCALL DELAY RL A MOV 41H,A LJMP NEXT_4 DELAY: MOV R4,#50 HERE: MOV R5,#100 BACK: MOV R6,#100 AGAIN: DJNZ R6,AGAIN DJNZ R5,BACK DJNZ R4,HERE RET END
|