  We present an algorithm to compute the Weierstrass semigroup at a point P
together with functions for each value in the semigroup, provided P is the only
branch at infinity of a singular plane model for the curve. As a byproduct, the
method also provides us with a basis for the spaces L(mP) and the computation
of the Feng-Rao distance for the corresponding array of geometric Goppa codes.
A general computation of the Feng-Rao distance is also obtained. Everything can
be applied to the decoding problem by using the majority scheme of Feng and
Rao.
