ORG 0000H
MAIN:MOV A,34H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#7FH
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
MOV A,31H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#0BFH
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
MOV A,31H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#0DFH
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
MOV A,30H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#0EFH
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
MOV A,32H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#0F7H
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
MOV A,30H
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,#0FBH
MOV P0,A
ACALL DELAY
MOV P2,#0FFH
AJMP MAIN
DELAY:MOV R3,#1
LOOP4:MOV R4,#10
LOOP5:MOV R5,#100
LOOP6:DJNZ R5,LOOP6
DJNZ R4,LOOP5
DJNZ R3,LOOP4
RET
TAB:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH;
END |