        ORG 0000H
       AJMP START1
       ORG 0030H
START1:MOV R0,#00H
       MOV R1,#00H
START: JB P3.7,LOOP1
       JB F0,LOOP2
       SETB F0
       INC R0
       AJMP LOOP2
LOOP1: CLR F0
LOOP2: CJNE R0,#06H,LOOP3   ;显示方式的种类数
LOOP3: JC LOOP4
       MOV P1,#00H
       MOV R0,#00H
LOOP4: MOV A,R0
       MOV DPTR,#TABLE
       RL A
       LJMP @A+DPTR
TABLE: AJMP PROGRAM0
       AJMP PROGRAM1
       AJMP PROGRAM2
       AJMP PROGRAM3
       AJMP PROGRAM4
       AJMP PROGRAM5
       AJMP PROGRAM6
       AJMP PROGRAM7
       AJMP PROGRAM8
       AJMP PROGRAM9
       AJMP PROGRAM10
PROGRAM0:AJMP START
PROGRAM1:MOV DPTR,#TABLE1
         AJMP LOOPA
PROGRAM2:MOV DPTR,#TABLE2
         AJMP LOOPA
PROGRAM3:MOV DPTR,#TABLE3
         AJMP LOOPA
PROGRAM4:MOV DPTR,#TABLE4
         AJMP LOOPA
PROGRAM5:MOV DPTR,#TABLE5
         AJMP LOOPA
PROGRAM6:MOV DPTR,#TABLE6
         AJMP LOOPA
PROGRAM7:MOV DPTR,#TABLE7
         AJMP LOOPA
PROGRAM8:MOV DPTR,#TABLE8
         AJMP LOOPA
PROGRAM9:MOV DPTR,#TABLE9
         AJMP LOOPA
PROGRAM10:MOV DPTR,#TABLE10
         AJMP LOOPA
LOOPA:MOV A,R1
      MOVC A,@A+DPTR
      MOV P1,A
      INC R1
      CJNE R1,#20H,LOOP5
LOOP5:JC LOOP6
      MOV R1,#00H
LOOP6:ACALL DALEY
      AJMP START
TABLE1:
DB 0FEH,0FFH,0FDH,0FFH,0FBH,0FFH,0F7H,0FFH,0EFH,0FFH,0DFH,0FFH,
0BFH,0FFH,07FH,0FFH
DB 0FFH,0FEH,0FFH,0FDH,0FFH,0FBH,0FFH,0F7H,0FFH,0EFH,0FFH,0DFH,
0FFH,0BFH,0FFH,07FH
TABLE2:
DB 00H,80H,00H,40H,00H,20H,00H,10H,00H,08H,00H,04H,00H,02H,00H,
01H
DB 80H,00H,40H,00H,20H,00H,10H,00H,08H,00H,04H,00H,02H,00H,01H,
00H
TABLE3:
DB 55H,55H,0AAH,0AAH,55H,55H,0AAH,0AAH,55H,55H,0AAH,0AAH,55H,55H,
0AAH,0AAH
DB 55H,55H,0AAH,0AAH,55H,55H,0AAH,0AAH,55H,55H,0AAH,0AAH,55H,55H,
0AAH,0AAH
TABLE4:
DB 0FFH,7FH,0FEH,0BFH,0FDH,0DFH,0FBH,0EFH,0F7H,0F7H,0EFH,0FBH,
0DFH,0FDH,0BFH,0FEH
DB 7FH,0FFH,0BFH,0FEH,0DFH,0FDH,0EFH,0FBH,0F7H,0F7H,0FBH,0EFH,
0FDH,0DFH,0FEH,0BFH
TABLE5:
DB 0FEH,0FEH,0FDH,0FDH,0FBH,0FBH,0F7H,0F7H,0EFH,0EFH,0DFH,0DFH,
0BFH,0BFH,7FH,7FH
DB 0FEH,0FEH,0FDH,0FDH,0FBH,0FBH,0F7H,0F7H,0EFH,0EFH,0DFH,0DFH,
0BFH,0BFH,7FH,7FH
TABLE6:DB
TABLE7:DB
TABLE8:DB
TABLE9:DB
TABLE10:DB
DALEY: MOV R5,#0AH
LOP3:  MOV R6,#0AH
LOP2:  MOV R7,#0C0H
LOP1:  DJNZ R7,LOP1
       DJNZ R6,LOP2
       DJNZ R5,LOP3
       RET
       END
