/**
 * Java version of the assembler hashCode used in the BBL Forth compiler.
 * @return a hash code value for the byte[] val byte array in this object.
 */
public int hashCode()
   {
   //  byte[] val  holds the data.
   int hash = 0;
   int len = val.length();
   for ( int i=0; i<len; i++ )
      {
      // rotate left and xor (very fast in assembler, a bit clumsy in Java)
      hash <<= 1;
      if ( hash < 0 )
         {
         hash |= 1;
         }
      hash ^= val[ i ];
      }
   return hash;
   }