%Begin %integer i,j,k %string (255) s,t,u %const %byte %integer %array built in(1:259)=2, 82, 48, 2, 82, 49, 2 %c , 82, 50, 2, 82, 51, 2, 82, 52, 2, 82, 53, 2, 83, 80, 2, 80, 67, 3, 67, 76, 82, 3, 68, 69, 67, 3, 73, 78, 67, 3, 78, 69, 71, 3, 84, 83, 84, 3, 67, 79, 77, 3, 65, 83, 82, 3, 65, 83, 76, 3, 65, 68, 67, 3, 83, 66, 67, 3, 82, 79, 76, 3, 82, 79, 82, 3, 83, 87, 65, 3, 77, 79, 86, 3, 65, 68, 68, 3, 83, 85, 66, 3, 67, 77, 80, 3, 66, 73, 83, 3, 66, 73, 84, 3, 66, 73, 67, 2, 66, 82, 3, 66, 69, 81, 3, 66, 78, 69, 3, 66, 77, 73, 3, 66, 80, 76, 3, 66, 67, 83, 3, 66, 67, 67, 3, 66, 86, 83, 3, 66, 86, 67, 3, 66, 76, 84, 3, 66, 71, 69, 3, 66, 76, 69, 3, 66, 71, 84, 3, 66, 72, 73, 4, 66, 76, 79, 83, 3, 66, 76, 79, 4, 66, 72, 73, 83, 3, 82, 84, 83, 3, 74, 83, 82, 3, 69, 77, 84, 4, 84, 82, 65, 80, 3, 66, 80, 84, 3, 73, 79, 84, 4, 72, 65, 76, 84, 4, 87, 65, 73, 84, 5, 82, 69, 83, 69, 84, 3, 82, 84, 73, 3, 74, 77, 80, 3, 67, 76, 78, 3, 67, 76, 90, 3, 67, 76, 86, 3, 67, 76, 67, 3, 83, 69, 78, 3, 83, 69, 90, 3, 83, 69, 86, 3, 83, 69, 67, 3, 65, 83, 72, 128 %const %half %integer %array built hash(1:65)=1120, 1122, 1124, 1126, 1128, 1130, 1696, 134, 2020, 1487, 1258, 1999, 249, 237, 505, 2041, 1228, 710, 749, 1261, 1285, 493, 1996, 2047, 487, 2011, 731, 2012, 1188, 463, 1514, 488, 752, 1993, 1994, 2, 3, 740, 1493, 1508, 725, 472, 1660, 996, 1644, 2044, 1273, 999, 1672, 753, 2029, 596, 597, 1970, 508, 1767, 997, 2021, 998, 741, 975, 2000, 976, 719, 1017 !! %owninteger hashf = 0 %owninteger hashg = 0 %integer %fn hash(%string %name ident, %byte %integer flag) !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! !! NOTE: HASH SETS DES AS A SIDE !! !! EFFECT !! !! !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! %own %integer cname=0 %integer hashc,f8 %short %integer z,a,b,c length(ident) = 6 %if length(ident)>6 f8 = flag&8 hashg = hashg+1 b = 0; c = 0; a = 0 string(addr(z)+1) = ident hashc <- ((a+b+c)*length(ident))&2047 %while names(hashc)#0 %cycle %if ident=string(addr(letters(names(hashc)))) %start des == record(desap+hashc<<2) %if f8!!des_reg<8 %start %result = hashc %finish !! IE IF F=8 AND AN OPER OR F<8 AND A%c LABEL ETC %finish hashc = (hashc+1)&2047 hashf = hashf+1 %repeat %result = -1 %if flag<128; ! SEARCH names(hashc) = letterpt des == record(desap+hashc<<2) des_def = 0; des_reg = 0; des_value = 0 string(addr(letters(letterpt))) = ident letterpt = letterpt+length(ident)+1 cname = cname+1 abandon("TOO MANY NAMES") %if cname>=2047 abandon("NAMES TOO LONG") %if letterpt>=10000-10 %result = hashc %end i = 0 %cycle s = string(addr(built in(i))) printstring(s); newline %repeat %endofprogram