Using the relativistic B-S equation with the kernel containing a confi
nement term and a gluon exchange term in a covariant generalization of
the Coulomb gauge the formula for masses of heavy mesons with arbitra
ry spin and parity are obtained to the order 1/M. The retardation effe
ct is taken into account. Numerical values for low-lying states of D a
nd B systems are obtained.