ASSEMBLY LISTING OF SEGMENT >dumps>old>recomp>find_key.alm ASSEMBLED ON: 11/04/82 1849.1 mst Thu OPTIONS USED: list ASSEMBLED BY: ALM Version 6.4 April 1981 ASSEMBLER CREATED: 11/03/82 1423.6 mst Wed  1 " ***********************************************************  2 " * *  3 " * Copyright, (C) Honeywell Information Systems Inc., 1982 *  4 " * *  5 " * Copyright (c) 1972 by Massachusetts Institute of *  6 " * Technology and Honeywell Information Systems, Inc. *  7 " * *  8 " ***********************************************************  9  10 "find_key: proc(indx_cb_ptr,(key_ptr),search_code); 000000 11 name find_key  000000 12 segdef find_key  000000 aa 0 00002 3515 20 13 find_key: epp1 pr0|2,* pr1<-->indx_cb_ptr  000001 aa 1 00000 3515 20 14 epp1 pr1|0,* pr1<-->indx_cb  000002 aa 1 00026 3521 20 15 epp2 pr1|file_position_ptr,* pr2<-->position_frame  000003 aa 2 00004 3715 20 16 epp5 pr2|node_ptr,* pr5<-->node_block  000004 aa 0 00004 3535 20 17 epp3 pr0|4,* pr3<-->key_ptr  000005 aa 3 00000 3535 20 18 epp3 pr3|0,* pr3<-->key  000006 aa 3 00000 7251 00 19 lxl5 pr3|0 x5<-length(key)  20  21 "q=branch(branch_num).if q=0 then return;  000007 aa 000000 6220 00 22 eax2 0 will be set if key found  000010 aa 2 00007 2361 00 23 descent: ldq pr2|branch_num ql<-position_frame.branch_num  000011 aa 000001 7360 00 24 qls 1 ql<-2*branch_num  000012 aa 2 00007 0761 00 25 adq pr2|branch_num ql<-3*branch_num  000013 aa 5 00000 2361 06 26 ldq pr5|0,ql q<-branch(branch_num)  000014 0a 000020 6010 00 27 tnz get_son if branch(branch_num)^=0 ==>get_son  000015 aa 0 00006 4501 20 28 stz pr0|6,* clear garbage in arg3 000016 aa 0 00006 7421 20 29 stx2 pr0|6,* set result in arg3  000017 aa 7 00044 7101 20 30 short_return  31  32 "pos_ptr=son_position_ptr;  000020 aa 2 00002 3521 20 33 get_son: epp2 pr2|son_position_ptr,* pr2<-son_position_ptr 000021 aa 1 00026 2521 00 34 spri2 pr1|file_position_ptr pos_ptr<-son_position_ptr 35  36 "node=q;  000022 aa 2 00006 7561 00 37 stq pr2|node position_frame.node<-q  38  39 "node_ptr=addr(seg_ptr_array(q.comp_num)->seg_array(q.offset)); 000023 aa 000000 6350 02 40 eaa 0,qu au<-q.comp_num,al<-0 000024 aa 000001 7350 00 41 als 1 au<-2*q.comp_num  000025 aa 1 00010 3715 61 42 epp5 pr1|seg_ptr_array_ptr,*au pr5<-->seg_ptr_array(comp_num) 000026 aa 5 00000 3715 66 43 epp5 pr5|0,*ql pr5<-->seg_array(q.offset) 000027 aa 2 00004 6515 00 44 spri5 pr2|node_ptr node_ptr<-->seg_array(q.offset) 45  46 "low=1  000030 aa 000001 6230 00 47 eax3 1 low<-1 48  49 "high=last_branch_num-1;  000031 aa 5 00000 2361 00 50 ldq pr5|last_branch_num ql<-last_branch_num  000032 aa 000001 1760 07 51 sbq 1,dl ql<-last_branch_num-1  000033 aa 000022 7360 00 52 qls 18 qu<-last_branch_num, ql<-0 000034 aa 0 00006 3515 20 53 epp1 pr0|6,* pr1<-->arg3  000035 aa 1 00000 7561 00 54 stq pr1|0 high<-last_branch_num-1 000036 aa 0 00004 3521 20 55 epp2 pr0|4,* pr2<-->arg2  56  57 "search: i=(low+high)/2 ;  000037 aa 000000 6360 13 58 search: eaq 0,3 qu<-low  000040 aa 1 00000 0761 00 59 adq pr1|0 qu<-(low+high)  000041 aa 000001 7720 00 60 qrl 1 i<-(low+high)/2 000042 aa 000000 6240 02 61 eax4 0,qu x4<-(low+high)/2  000043 aa 2 00000 7441 00 62 stx4 pr2|0 arg2<-(low+high)/2 000044 aa 2 00000 0641 00 63 adx4 pr2|0 x4<-2*i  000045 aa 2 00000 0641 00 64 adx4 pr2|0 x4<-3*i  65  66 "if substr(keys,key_pos(i),key_length(i))=key ==>not_low 000054 aa 000001 6230 02 73 eax3 1,qu low=i+1 000055 0a 000062 7100 00 74 tra continue ==>continue  75  76 "else if substr=key then search_code=1; 000056 0a 000060 6010 00 77 not_low: tnz unequal if substr>key ==>unequal  000057 aa 000001 6220 00 78 eax2 1 will be copied into arg  79  80 "high=i-1;  000060 aa 777777 6360 02 81 unequal: eaq -1,qu qu<-i-1 000061 aa 1 00000 7561 00 82 stq pr1|0 high<-i-1  83  84 "if low<=high then go to search;  000062 aa 1 00000 1031 00 85 continue: cmpx3 pr1|0 low::high  000063 0a 000037 6044 00 86 tmoz search if high>=low ==>search  87  88 "branch_num=low. go to descent; 000064 aa 0 00002 3515 20 89 done: epp1 pr0|2,* pr1<-->indx_cb_ptr  000065 aa 1 00000 3515 20 90 epp1 pr1|0,* pr1<-->indx_cb  000066 aa 1 00026 3521 20 91 epp2 pr1|file_position_ptr,* pr2<-->position_frame  000067 aa 2 00007 4431 00 92 sxl3 pr2|branch_num branch_num<-low  000070 0a 000010 7100 00 93 tra descent descend to leaf  94  95  000071 96 entry last 000071 97 last:  000071 aa 0 00002 3515 20 98 epp1 pr0|2,* pr1<-->indx_cb_ptr  000072 aa 1 00000 3515 20 99 epp1 pr1|0,* pr1<-->indx_cb  000073 aa 1 00026 3521 20 100 epp2 pr1|file_position_ptr,* pr2<-->position_frame  000074 aa 2 00004 3715 20 101 epp5 pr2|node_ptr,* pr5<-->node_block  000075 aa 0 00004 3535 20 102 epp3 pr0|4,* pr3<-->key_ptr  000076 aa 3 00000 3535 20 103 epp3 pr3|0,* pr3<-->key  000077 aa 3 00000 7251 00 104 lxl5 pr3|0 x5<-length(key)  105  106 "q=branch(branch_num).if q=0 then return;  000100 aa 000000 6220 00 107 eax2 0 will be set if key found  000101 aa 2 00007 2361 00 108 ldescent: ldq pr2|branch_num ql<-position_frame.branch_num  000102 aa 000001 7360 00 109 qls 1 ql<-2*branch_num  000103 aa 2 00007 0761 00 110 adq pr2|branch_num ql<-3*branch_num  000104 aa 5 00000 2361 06 111 ldq pr5|0,ql q<-branch(branch_num)  000105 0a 000111 6010 00 112 tnz lget_son if branch(branch_num)^=0 ==>lget_son 000106 aa 0 00006 4501 20 113 stz pr0|6,* clear garbage in arg3 000107 aa 0 00006 7421 20 114 stx2 pr0|6,* set result in arg3  000110 aa 7 00044 7101 20 115 short_return  116  117 "pos_ptr=son_position_ptr;  000111 aa 2 00002 3521 20 118 lget_son: epp2 pr2|son_position_ptr,* pr2<-son_position_ptr  000112 aa 1 00026 2521 00 119 spri2 pr1|file_position_ptr pos_ptr<-son_position_ptr 120  121 "node=q;  000113 aa 2 00006 7561 00 122 stq pr2|node position_frame.node<-q  123  124 "node_ptr=addr(seg_ptr_array(q.comp_num)->seg_array(q.offset)); 000114 aa 000000 6350 02 125 eaa 0,qu au<-q.comp_num,al<-0 000115 aa 000001 7350 00 126 als 1 au<-2*q.comp_num  000116 aa 1 00010 3715 61 127 epp5 pr1|seg_ptr_array_ptr,*au pr5<-->seg_ptr_array(comp_num) 000117 aa 5 00000 3715 66 128 epp5 pr5|0,*ql pr5<-->seg_array(q.offset) 000120 aa 2 00004 6515 00 129 spri5 pr2|node_ptr node_ptr<-->seg_array(q.offset) 130  131 "low=1  000121 aa 000001 6230 00 132 eax3 1 low<-1 133  134 "high=last_branch_num-1;  000122 aa 5 00000 2361 00 135 ldq pr5|last_branch_num ql<-last_branch_num  000123 aa 000001 1760 07 136 sbq 1,dl ql<-last_branch_num-1  000124 aa 000022 7360 00 137 qls 18 qu<-last_branch_num, ql<-0 000125 aa 0 00006 3515 20 138 epp1 pr0|6,* pr1<-->arg3  000126 aa 1 00000 7561 00 139 stq pr1|0 high<-last_branch_num-1 000127 aa 0 00004 3521 20 140 epp2 pr0|4,* pr2<-->arg2  141  142 "lsearch: i=(low+high)/2 ; 000130 aa 000000 6360 13 143 lsearch: eaq 0,3 qu<-low  000131 aa 1 00000 0761 00 144 adq pr1|0 qu<-(low+high)  000132 aa 000001 7720 00 145 qrl 1 i<-(low+high)/2 000133 aa 000000 6240 02 146 eax4 0,qu x4<-(low+high)/2  000134 aa 2 00000 7441 00 147 stx4 pr2|0 arg2<-(low+high)/2 000135 aa 2 00000 0641 00 148 adx4 pr2|0 x4<-2*i  000136 aa 2 00000 0641 00 149 adx4 pr2|0 x4<-3*i  150  151 "if substr(keys,key_pos(i),key_length(i))=key ==>lnot_low  000145 aa 000001 6230 02 158 low: eax3 1,qu low=i+1 000146 0a 000154 7100 00 159 tra lcontinue ==>lcontinue  160  161 "else if substr=key then do search_code=1 low=i+1 end;  000147 0a 000152 6010 00 162 lnot_low: tnz lunequal if substr>key ==>unequal  000150 aa 000001 6220 00 163 eax2 1 will be copied into arg  000151 0a 000145 7100 00 164 tra low set low=i+1  165  166 "high=i-1;  000152 aa 777777 6360 02 167 lunequal: eaq -1,qu qu<-i-1  000153 aa 1 00000 7561 00 168 stq pr1|0 high<-i-1  169  170 "if low<=high then go to lsearch;  000154 aa 1 00000 1031 00 171 lcontinue: cmpx3 pr1|0 low::high  000155 0a 000130 6044 00 172 tmoz lsearch if high>=low ==>lsearch  173  174 "branch_num=low. go to ldescent;  000156 aa 0 00002 3515 20 175 ldone: epp1 pr0|2,* pr1<-->indx_cb_ptr 000157 aa 1 00000 3515 20 176 epp1 pr1|0,* pr1<-->indx_cb  000160 aa 1 00026 3521 20 177 epp2 pr1|file_position_ptr,* pr2<-->position_frame  000161 aa 2 00007 4431 00 178 sxl3 pr2|branch_num branch_num<-low  000162 0a 000101 7100 00 179 tra ldescent descend to leaf  180  181  182  183  184  185 "declarations:  000026 186 equ file_position_ptr,22 in indx_cb  000004 187 equ node_ptr,4 in position_frame  000007 188 equ branch_num,7 in position_frame 000002 189 equ son_position_ptr,2 in position_frame  000006 190 equ node,6 in position_frame  000010 191 equ seg_ptr_array_ptr,8 in indx_cb 000000 192 equ last_branch_num,0 in node_block  193  194 "this routine depends upon having branch_and_descrip_size=3 195  196 end  ENTRY SEQUENCES  000163 5a 000011 0000 00 000164 aa 7 00046 2721 20 000165 0a 000071 7100 00 NO LITERALS  NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000166 5a 000003 000000 000167 5a 000033 600000 000170 aa 000000 000000 000171 55 000011 000002 000172 5a 000002 400003 000173 55 000006 000011 000174 aa 010 146 151 156 000175 aa 144 137 153 145 000176 aa 171 000 000 000 000177 55 000016 000003 000200 0a 000164 500000 000201 55 000014 000003 000202 aa 004 154 141 163 last  000203 aa 164 000 000 000 000204 55 000024 000011 000205 0a 000000 400000 000206 55 000021 000003 000207 aa 010 146 151 156 find_key  000210 aa 144 137 153 145 000211 aa 171 000 000 000 000212 55 000002 000016 000213 6a 000000 400002 000214 55 000027 000003 000215 aa 014 163 171 155 symbol_table  000216 aa 142 157 154 137 000217 aa 164 141 142 154 000220 aa 145 000 000 000 DEFINITIONS HASH TABLE  000221 aa 000000 000015 000222 aa 000000 000000 000223 aa 000000 000000 000224 aa 000000 000000 000225 aa 000000 000000 000226 5a 000011 000000 000227 aa 000000 000000 000230 5a 000024 000000 000231 aa 000000 000000 000232 aa 000000 000000 000233 aa 000000 000000 000234 aa 000000 000000 000235 aa 000000 000000 000236 5a 000016 000000 NO EXTERNAL NAMES  NO TRAP POINTER WORDS  TYPE PAIR BLOCKS  000237 aa 000001 000000 000240 aa 000000 000000 INTERNAL EXPRESSION WORDS 000241 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000166 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 000004 000004 aa 000000 111316 000005 aa 510113 575622 000006 aa 000000 111320 000007 aa 102447 026206 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 000126 000020 aa 000000 000102 000021 aa 000000 000115 000022 aa 000120 000102 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 040066 056064 000030 aa 040040 101160 000031 aa 162151 154040 000032 aa 061071 070061 000033 aa 040040 040040 000034 aa 110157 154155 000035 aa 163164 145144 000036 aa 164056 123171 000037 aa 163115 141151 000040 aa 156164 056155 000041 aa 040040 040040 000042 aa 040040 040040 000043 aa 040040 040040 000044 aa 154151 163164 000045 aa 040040 040040 000046 aa 040040 040040 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 040040 040040 000057 aa 040040 040040 000060 aa 040040 040040 000061 aa 040040 040040 000062 aa 040040 040040 000063 aa 040040 040040 000064 aa 000000 000001 000065 aa 000000 000001 000066 aa 000072 000036 000067 aa 113171 051676 000070 aa 000000 111320 000071 aa 005566 400000 000072 aa 076144 165155 >dumps>old>recomp>find_key.alm  000073 aa 160163 076157 000074 aa 154144 076162 000075 aa 145143 157155 000076 aa 160076 146151 000077 aa 156144 137153 000100 aa 145171 056141 000101 aa 154155 040040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number  7 branch_num find_key: 23, 25, 92, 108, 110, 178, 188. 62 continue find_key: 74, 85.  10 descent find_key: 23, 93.  64 done find_key: 89. 26 file_position_ptr find_key: 15, 34, 91, 100, 119, 177, 186. 0 find_key find_key: 12, 13.  20 get_son find_key: 27, 33.  71 last find_key: 96, 97.  0 last_branch_num find_key: 50, 135, 192. 154 lcontinue find_key: 159, 171.  101 ldescent find_key: 108, 179.  156 ldone find_key: 175. 111 lget_son find_key: 112, 118.  147 lnot_low find_key: 157, 162.  145 low find_key: 158, 164.  130 lsearch find_key: 143, 172.  152 lunequal find_key: 162, 167.  6 node find_key: 37, 122, 190. 4 node_ptr find_key: 16, 44, 101, 129, 187. 56 not_low find_key: 72, 77.  37 search find_key: 58, 86.  10 seg_ptr_array_ptr find_key: 42, 127, 191. 2 son_position_ptr find_key: 33, 118, 189. 60 unequal find_key: 77, 81.  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