ORG 0000H
LJMP MAIN
ORG 000BH
LJMP T0ISR
ORG 0030H
MAIN:
MOV TMOD,#06H
MOV TH0,#0FFH
MOV TL0,#0FFH
SETB TR0
SETB ET0
SETB EA
MOV A,#0
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P1,A
MOV R0,#0
SJMP $
T0ISR:
INC R0
MOV A,R0
ANL A,#0FH
MOV R0,A
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P1,A
RETI
TAB:
DB 3FH,06H,5BH,4FH,66H ;01234
DB 6DH,7DH,07H,7FH,6fh ;56789
DB 77H,7CH,39H,5EH,79H,71H;ABCDEF
END