Original MERCURY 6.2 code from John Chambers.