  In this paper, we study residues of differential 2-forms on a smooth
algebraic surface over an arbitrary field and give several statements about
sums of residues. Afterwards, using these results we construct
algebraic-geometric codes which are an extension to surfaces of the well-known
differential codes on curves. We also study some properties of these codes and
extend to them some known properties for codes on curves.
