The HASH system call calculates value of a hash function for the entity (object, type, group, transaction) pointed to by topmost access on the top of stack. This value if guaranteed to be between 0 and nslots-1, and be always the same for all accesses to the same object. I.e. if EQ indicates that accesses are "equivalent", HASH will return the same value for them.
The argument access remains on top of stack and is not affected in any way.
In case of successful execution HASH returns the value of the hash function.
If nslots is less than 2 or is too large HASH returns error code ERR_HASH_ARG.
If stack is empty HASH returns error code ERR_EMPTY_STACK.