We describe a computational algorithm for the evaluation of error prob
abilities of multilevel modulation codes. This is based on the derivat
ion of a trellis cataloging the words of the component codes and of a
suitable set of branch labels depending on the channel on which the tr
ansmission takes place (additive white Gaussian noise channel, fading
channel with or without channel state information). The error probabil
ity is upper bounded by the transfer function of this trellis, which i
s derived in closed form.