ASSEMBLY LISTING OF SEGMENT >spec>install>1110>hash_index_.alm ASSEMBLED ON: 11/11/89 0949.7 mst Sat OPTIONS USED: -target l68 list symbols ASSEMBLED BY: ALM Version 8.14 March 1989 ASSEMBLER CREATED: 06/09/89 1002.3 mst Fri 1 " *********************************************************** 2 " * * 3 " * Copyright, (C) Honeywell Bull Inc., 1987 * 4 " * * 5 " * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6 " * * 7 " * Copyright (c) 1972 by Massachusetts Institute of * 8 " * Technology and Honeywell Information Systems, Inc. * 9 " * * 10 " *********************************************************** 11 12 " 13 " Coded by who knows who who knows when 14 " Modified March 1981 Benson I. Margulies for no stack. 15 " 16 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 17 " 18 " hash_index_ 19 " 20 " Calling sequence is: 21 " 22 " index = hash_index_ (nameptr,length,bias,tablesize) 23 " 24 " nameptr is a pointer to the name to be hashed 25 " length is the number of (significant) characters in the name, fixed (35) 26 " bias is an integer used in the hash algorithm(may be anything), fixed (35) 27 " tablesize is the size of the hash table of interest, fixed (35) 28 " index is the returned hash index, fixed (35) 29 " 30 " All variables are fixed except the first which is pointer 31 " 32 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 33 000000 34 name hash_index_ 000061 35 segdef hash_index_,hash_id 000002 36 set string,2 000004 37 set length,4 000006 38 set bias,6 000010 39 set tablesize,8 000012 40 set index,10 000000 41 hash_index_: 000000 aa 0 00002 3521 20 42 epp2 ap|string,* get pointer to pointer to string 000001 aa 2 00000 3521 20 43 epp2 pr2|0,* get pointer to string 000002 aa 0 00010 2341 20 44 szn ap|tablesize,* check for zero divide 000003 0a 000046 6000 00 45 tze err trouble 000004 aa 000000 6350 00 46 eaa 0 clear the a register 000005 aa 0 00004 2361 20 47 ldq ap|length,* get length of string 000006 aa 000040 1160 07 48 cmpq =32,dl is it an entry name? 000007 0a 000016 6010 00 49 tnz compare no, go to compare 000010 aa 000002 7320 00 50 qrs 2 yes, ignore trailing blanks 000011 aa 2 77777 2351 06 51 strip: lda pr2|-1,ql get end word 000012 0a 000050 1150 00 52 cmpa blanks all blanks? 000013 0a 000026 6010 00 53 tnz add1 no, go to compare 000014 aa 000001 1760 07 54 sbq =1,dl yes, backup 1 word 000015 0a 000011 7100 00 55 tra strip loop back and try again 000016 aa 000106 7770 00 56 compare: llr 70 divide by 4 and save remainder 000017 aa 000020 7710 00 57 arl 16 shift remainder to upper a 000020 aa 000000 6220 01 58 eax2 0,au divisible by 4? 000021 0a 000026 6000 00 59 tze add1 yes go to compare 000022 aa 2 00000 2351 06 60 lda pr2|0,ql no, make blanks out of last chars 000023 0a 000051 3750 12 61 ana mask,2 000024 0a 000055 2750 12 62 ora bits,2 000025 0a 000027 7100 00 63 tra add2 000026 aa 000000 6350 00 64 add1: eaa 0 zero a reg-init sum 000027 65 add2: 000027 aa 000000 7360 00 66 qls 0 set sign of q 000030 0a 000034 6000 00 67 tze noadd no words to be added in 000031 aa 2 77777 0351 06 68 adla pr2|-1,ql 000032 aa 000001 1360 07 69 sblq 1,dl go to next word 000033 0a 000027 6050 00 70 tpl add2 000034 aa 0 00012 7551 20 71 noadd: sta ap|index,* save temporarily 000035 aa 0 00006 2361 20 72 ldq ap|bias,* get bias 000036 aa 303227 4020 07 73 mpy =99991,dl multipy by large prime number 000037 aa 0 00012 0761 20 74 adq ap|index,* add in sum of the words 000040 aa 0 00010 5061 20 75 div ap|tablesize,* divide by hash table size 000041 aa 000000 7350 00 76 als 0 set zero indicator from remainder (in a-reg) 000042 0a 000044 6050 00 77 tpl *+2 must be positive answer 000043 aa 000000 5310 00 78 neg 000044 aa 0 00012 7551 20 79 sta ap|index,* return the remainder of the division 000045 aa 7 00044 7101 20 80 .rt: short_return 81 000046 aa 0 00012 4501 20 82 err: stz ap|index,* return zero as hash index if error 000047 0a 000045 7100 00 83 tra .rt 84 000050 aa 040 040 040 040 85 blanks: aci " " 000051 aa 000000 000000 86 mask: oct 0,777000000000,777777000000,777777777000 000052 aa 777000 000000 000053 aa 777777 000000 000054 aa 777777 777000 000055 aa 000000 000000 87 bits: oct 0,000040040040,000000040040,000000000040 000056 aa 000040 040040 000057 aa 000000 040040 000060 aa 000000 000040 88 89 90 " 91 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 92 " 93 " hash_id 94 " 95 " Calling sequence is: 96 " 97 " index = hash_index_$hash_id (id, tablesize) 98 " 99 " id is the unique identifier (bit (36)) to be hashed 100 " 101 " This is an awful algorithm. If you are not using it now, 102 " do not start. It is here only for compatability. 103 " 104 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " 105 000002 106 set uid,2 000004 107 set tablesize,4 000006 108 set index,6 000061 109 hash_id: 000061 aa 0 00002 2361 20 110 ldq ap|uid,* pick up id word 000062 aa 0 00002 4021 20 111 mpy ap|uid,* multiply it by itself 000063 aa 377777 3750 07 112 ana =o377777,dl leave 17 bits (force positive) 000064 aa 000022 7730 00 113 lrl 18 000065 aa 0 00004 5061 20 114 div ap|tablesize,* divide by table size 000066 aa 0 00006 7551 20 115 sta ap|index,* return the hash index 000067 aa 7 00044 7101 20 116 short_return 117 118 end NO LITERALS NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000070 5a 000003 000000 000071 5a 000033 600000 000072 aa 000000 000000 000073 55 000011 000002 000074 5a 000002 400003 000075 55 000006 000011 000076 aa 013 150 141 163 000077 aa 150 137 151 156 000100 aa 144 145 170 137 000101 55 000016 000003 000102 0a 000061 400000 000103 55 000014 000003 000104 aa 007 150 141 163 hash_id 000105 aa 150 137 151 144 000106 55 000024 000011 000107 0a 000000 400000 000110 55 000021 000003 000111 aa 013 150 141 163 hash_index_ 000112 aa 150 137 151 156 000113 aa 144 145 170 137 000114 55 000002 000016 000115 6a 000000 400002 000116 55 000027 000003 000117 aa 014 163 171 155 symbol_table 000120 aa 142 157 154 137 000121 aa 164 141 142 154 000122 aa 145 000 000 000 DEFINITIONS HASH TABLE 000123 aa 000000 000015 000124 aa 000000 000000 000125 aa 000000 000000 000126 aa 000000 000000 000127 aa 000000 000000 000130 aa 000000 000000 000131 aa 000000 000000 000132 5a 000011 000000 000133 5a 000024 000000 000134 aa 000000 000000 000135 aa 000000 000000 000136 aa 000000 000000 000137 aa 000000 000000 000140 5a 000016 000000 NO EXTERNAL NAMES NO TRAP POINTER WORDS TYPE PAIR BLOCKS 000141 aa 000001 000000 000142 aa 000000 000000 INTERNAL EXPRESSION WORDS 000143 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000070 000000 000002 aa 000000 000000 000003 aa 000000 000000 000004 aa 000000 000000 000005 aa 000000 000000 000006 22 000010 000010 000007 a2 000000 000000 SYMBOL INFORMATION SYMBOL TABLE HEADER 000000 aa 000000 000001 000001 aa 163171 155142 000002 aa 164162 145145 000003 aa 000000 000010 000004 aa 000000 117244 000005 aa 361023 525721 000006 aa 000000 117547 000007 aa 255443 746355 000010 aa 141154 155040 000011 aa 040040 040040 000012 aa 000024 000040 000013 aa 000034 000040 000014 aa 000044 000100 000015 aa 000002 000002 000016 aa 000064 000000 000017 aa 000000 000133 000020 aa 000000 000103 000021 aa 000115 000112 000022 aa 000125 000103 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 070056 061064 000030 aa 040115 141162 000031 aa 143150 040061 000032 aa 071070 071040 000033 aa 040040 040040 000034 aa 110151 162156 000035 aa 145151 163145 000036 aa 156056 123171 000037 aa 163115 141151 000040 aa 156164 056141 000041 aa 040040 040040 000042 aa 040040 040040 000043 aa 040040 040040 000044 aa 055164 141162 000045 aa 147145 164040 000046 aa 154066 070040 000047 aa 040040 040040 000050 aa 040040 040040 000051 aa 040040 040040 000052 aa 040040 040040 000053 aa 040040 040040 000054 aa 040040 040040 000055 aa 040040 040040 000056 aa 040154 151163 000057 aa 164040 163171 000060 aa 155142 157154 000061 aa 163040 040040 000062 aa 040040 040040 000063 aa 040040 040040 000064 aa 000000 000001 000065 aa 000000 000001 000066 aa 000072 000042 000067 aa 175453 017551 000070 aa 000000 117547 000071 aa 176313 400000 000072 aa 076163 160145 >spec>install>1110>hash_index_.alm 000073 aa 143076 151156 000074 aa 163164 141154 000075 aa 154076 061061 000076 aa 061060 076150 000077 aa 141163 150137 000100 aa 151156 144145 000101 aa 170137 056141 000102 aa 154155 040040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number 45 .rt hash_index_: 80, 83. 26 add1 hash_index_: 53, 59, 64. 27 add2 hash_index_: 63, 65, 70. 6 bias hash_index_: 38, 72. 55 bits hash_index_: 62, 87. 50 blanks hash_index_: 52, 85. 16 compare hash_index_: 49, 56. 46 err hash_index_: 45, 82. 61 hash_id hash_index_: 35, 109. 0 hash_index_ hash_index_: 35, 41. 6 index hash_index_: 40, 71, 74, 79, 82, 108, 115. 4 length hash_index_: 37, 47. 51 mask hash_index_: 61, 86. 34 noadd hash_index_: 67, 71. 2 string hash_index_: 36, 42. 11 strip hash_index_: 51, 55. 4 tablesize hash_index_: 39, 44, 75, 107, 114. 2 uid hash_index_: 106, 110, 111. NO FATAL ERRORS ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved