
SEGMENT: DB 13,17,2,3,45,126,122,135
; all garbage, you need to sort out the mapping
;Yourself

;Let A contain the display value

MOV DPTR,#segment  ;puts the address of the ;1st element of segment in DPTR
MOVC A,@A+DPTR
MOV P1,A

This jumps into the SEGMENT table and takes the value at the nth position as the data for your segments.
 
