Look up tables for 8 digit display
You could use switch or lookup. I'm not familiar with the device but this pseudo-code may give you some clues.

// +--a--+
// f     b
// +--g--+ 
// e     c
// +--d--+

switch (char){
  //                 abcdefg segments
  case "A": segs = 0b1110111;
  case "B": segs = 0b0011111;
  case "C": etc.
}


Alternatively define all the patterns in a lookup table.

int segs[65] = 0b1110111;    // A
int segs[66] = 0b0011111;    // B
int segs[67] = etc.

port0 = segs[char];