CHNUM EQU 13H
ORG 0000H
AJMP START
; START PROGRAM
START: MOV R0, #CHNUM
DISPLAY: MOV P1, #0FFH
LCALL DLSHORT
MOV DPTR, #TAB
MOV A, #CHNUM
SUBB A, R0
MOVC A, @A+DPTR
MOV P1, A
LCALL DLLONG
DJNZ R0, DISPLAY
LCALL DLLONG
AJMP START
; SHORT DELAY
DLSHORT: MOV R6, #0FFH
DL1: MOV R7, #0FFH
DL2: DJNZ R7, DL2
DJNZ R6, DL1
RET
; LONG DELAY
DLLONG: MOV R5, #0AH
DDL0: MOV R6, #0FFH
DDL1: MOV R7, #0FFH
DDL2: DJNZ R7, DDL2
DJNZ R6, DDL1
DJNZ R5, DDL0
RET
; DISPLAY DATA
TAB: DB 92H, 89H, 0A1H, 0A1H, 91H, 0BDH, 0CBH, 88H, 89H, 0C2H, 91H, 88H, 89H, 80H, 0C2H, 0A1H, 0A0H, 0A0H, 92H
END
FOR SUNNY ! ^_^