ORG 0000H
MAIN:MOV DPTR,#0FF20H
MOV A,#03H
MOVX @DPTR,A
MOV 2AH,#1FH
MOV P1,#0CH
MOV R7,#19H
PRG1: LCALL DELAY1
DJNZ R7,PRG1
MOV P1,#0AH
MOV R7,#05H
PRG2: LCALL DELAY1
DJNZ R7, PRG2
MOV P1,#21H
MOV 2AH,#1FH
MOV R7, #19H
PGR3: LCALL DELAY1
DJNZ R7,PGR3
MOV P1,#11H
MOV R7,#05H
PGR4: LCALL DELAY1
DJNZ R7, PGR4
AJMP MAIN
DELAY1:DEC 2AH
MOV A,2AH
MOV B,#0AH
DIV AB
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV R2,A
MOV A, B
MOV DPTR ,#TAB
MOVC A,@A+DPTR
MOV R1,A
MOV R6,#64H
LOOP: MOV A,R2
MOV R4,#02H
LCALL DISPLAY
MOV A,R1
MOV R4,#01H
LCALL DISPLAY
DJNZ R6,LOOP
RET
TAB: DB 0C0H,0F9H,0A4H,0B0H,99H
DB 92H,82H,0F8H,80H,90H
DISPLAY:MOV R0,#0D0H
MOV R5,A
DISPLAY1:MOV A,R5
MOV DPTR,#0FF22H
MOVX @DPTR,A
MOV DPTR,#0FF21H
MOV A,R4
MOVX @DPTR,A
DJNZ R0,DISPLAY1
RET
END
对你的程序有点改动,你看一下行不