Main: Mov R6,#14D
Main: Mov R6,#14D
Main: Mov R6,#14D
SETB P3.5
MOV TMOD,#01100001B // Sets Timer1 as Mode2 counter & Timer0 as Mode1 timer
DJNZ R6,BACK
MOV B,#100D
SETB P1.0
ACALL DELAY
MOV A,B
MOV B,#10D
CLR P1.0
SETB P1.1
MOV P0,A
ACALL DELAY
ACALL DELAY
CLR P1.1
SETB P1.2
MOV P0,A
ACALL DELAY
ACALL DELAY
CLR P1.2
RET
RET
DISPLAY: MOVC A,@A+DPTR // gets 7 seg digit drive pattern for current value in A
RET
DB 06H
DB 5BH
DB 4FH
DB 66H
DB 6DH
DB 7DH
DB 07H
DB 7FH
DB 6FH
END