  We study the computation of error values in the decoding of codes constructed
from order domains. Our approach is based on a sort of analog of the key
equation for decoding Reed-Solomon and BCH codes. We identify a key equation
for all codes from order domains which have finitely-generated value
semigroups; the field of fractions of the order domain may have arbitrary
transcendence degree, however. We provide a natural interpretation of the
construction using the theory of Macaulay's inverse systems and duality.
O'Sullivan's generalized Berlekamp-Massey-Sakata (BMS) decoding algorithm
applies to the duals of suitable evaluation codes from these order domains.
When the BMS algorithm does apply, we will show how it can be understood as a
process for constructing a collection of solutions of our key equation.
