;VIET CT CON DISPLAYLED XUAT GIA TRI TRONG R0 LEEN LED DOAN CO SO THU TU TRONG R1 ; R0 TRONG KHOANG 0-9 VAF R1 TRONG KHOANG 0-3 ; DUNG CT CO NAY VIET CT CHINH XUAT GIA TRI (R0=1) LEN LED DOAN SO (R1=3) ORG 2000H MOV R0,#1 MOV R1,#3 ACALL DISPLAYLED SJMP $ DISPLAYLED: MOV DPTR,#TABLE MOV A,R1 MOVC A,@A+DPTR ADD A,R0 MOV DPTR,#0000H MOVX @DPTR,A RET TABLE: DB 0E0H,0D0H,0B0H,70H ; 0E0H:LED0 0D0H:LED1 END