ASSEMBLY LISTING OF SEGMENT >spec>on>pl128d>translate_.alm ASSEMBLED ON: 10/03/83 1348.4 mst Mon OPTIONS USED: list ASSEMBLED BY: ALM Version 6.6 November 1982 ASSEMBLER CREATED: 09/21/83 1227.3 mst Wed  1 " ******************************************************  2 " * *  3 " * *  4 " * Copyright (c) 1972 by Massachusetts Institute of *  5 " * Technology and Honeywell Information Systems, Inc. *  6 " * *  7 " * *  8 " ******************************************************  9  10 " Procedure to implement PL/1 translate builtin function  11 "  12 "  13 " The PL/1 statement  14 " R = translate(S,T);  15 " is compiled as  16 " call trans_2_(R,Rdesc,S,Sdesc,T,Tdesc);  17 " where Rdesc, Sdesc, Tdesc are Version II descriptors, but the call is non-standard.  18 "  19 " The PL/1 statement  20 " R = translate(S,T,C); 21 " is compiled as  22 " call trans_3_(R,Rdesc,S,Sdesc,T,Tdesc,C,Cdesc);  23 " where all args are as above  24 "  000000 25 name translate_  000000 26 entry trans_2_ 000130 27 entry trans_3_ 28  010000 29 bool varying,010000  000002 30 equ r_arg,2  000004 31 equ r_desc,4  000006 32 equ s_arg,6  000010 33 equ s_desc,8  000012 34 equ t_arg,10  000014 35 equ t_desc,12  000016 36 equ c_arg,14  000020 37 equ c_desc,16  38  39 temp s_length,t_length,t_offset,c_length,c_mask,long  40 temp count,temp  41 tempd s_pt,c_pt  42  000000 43 trans_2_:  000000 aa 000100 6270 00 44 push  000001 aa 7 00040 2721 20 000002 aa 6 00055 4501 00 45 stz long this is short form  46  000003 aa 0 00006 3521 20 47 join: epp2 ap|s_arg,* get ptr to s  000004 aa 0 00010 2351 20 48 lda ap|s_desc,* get desc(s)  000005 aa 010000 3150 03 49 cana varying,du is it varying? 000006 aa 000002 6000 04 50 tze 2,ic no  000007 aa 2 77777 2351 00 51 lda bp|-1 yes, get current length 000010 0a 000174 3750 00 52 ana =o77777777 mask to 24 bits 000011 aa 000000 5310 00 53 neg 0 and save - length  000012 0a 000127 6000 00 54 tze done return if zero length input  000013 aa 6 00050 7551 00 55 sta s_length  000014 aa 6 00060 2521 00 56 spri2 s_pt save ptr to s  000015 aa 0 00007 2351 00 57 lda ap|s_arg+1 extract bit offset of s 000016 aa 000011 7310 00 58 ars 9  000017 aa 000077 3750 07 59 ana =o77,dl  000020 aa 000000 6220 05 60 eax2 0,al and save in x2  61  000021 aa 0 00012 3521 20 62 epp2 ap|t_arg,* get ptr to t  000022 aa 0 00014 2351 20 63 lda ap|t_desc,* get desc(t)  000023 aa 010000 3150 03 64 cana varying,du is it varying  000024 aa 000002 6000 04 65 tze 2,ic no  000025 aa 2 77777 2351 00 66 lda bp|-1 yes, get current length 000026 0a 000174 3750 00 67 ana =o77777777 mask to 24 bits 000027 aa 6 00051 7551 00 68 sta t_length  000030 aa 0 00013 2361 00 69 ldq ap|t_arg+1 get bit offset of t 000031 aa 000011 7320 00 70 qrs 9  000032 aa 000077 3760 07 71 anq =o77,dl  000033 aa 000011 5060 07 72 div 9,dl convert to char offset  000034 aa 6 00052 7561 00 73 stq t_offset and save 74  000035 aa 0 00002 3701 20 75 epp4 ap|r_arg,* get ptr to r  000036 aa 0 00003 2361 00 76 ldq ap|r_arg+1 extract bit offset of r 000037 aa 000011 7320 00 77 qrs 9  000040 aa 000077 3760 07 78 anq =o77,dl  000041 aa 000011 5060 07 79 div 9,dl convert to char offset  000042 aa 000000 6230 05 80 eax3 0,al and save in x3  81  000043 aa 6 00060 3501 20 82 epp0 s_pt,* get ptr to s  83  000044 aa 0 00000 2361 00 84 loop: ldq ap|0 get current character of s  000045 aa 000011 7370 12 85 lls 9,2 into al  000046 aa 000177 3750 07 86 ana =o177,dl  87  000047 aa 6 00055 2341 00 88 szn long is this long form?  000050 0a 000077 6000 00 89 tze check no, use current char as index  90  000051 aa 6 00057 7551 00 91 sta temp yes, must do index(c), so form  000052 aa 000011 7350 00 92 als 9 word containing current character  000053 aa 6 00057 2751 00 93 ora temp in each character position  000054 aa 6 00057 7551 00 94 sta temp  000055 aa 000022 7350 00 95 als 18 000056 aa 6 00057 2751 00 96 ora temp now have CCCC in a register  97  000057 aa 6 00053 3361 00 98 lcq c_length init loop  000060 aa 6 00056 7561 00 99 stq count  000061 aa 6 00054 2361 00 100 ldq c_mask get initial mask  000062 aa 000000 6240 00 101 eax4 0 102  000063 aa 6 00062 2111 74 103 index: cmk c_pt,*4 check character 000064 0a 000075 6000 00 104 tze succ zero means we found it  105  000065 aa 6 00056 0541 00 106 aos count update counter  000066 0a 000073 6000 00 107 tze use_same use this character if index failed  108  000067 aa 000033 7760 00 109 qlr 27 shift mask right 9 bits  000070 0a 000063 6040 00 110 tmi index and repeat if not done with word  111  000071 aa 000001 0640 03 112 adx4 1,du update for next word  000072 0a 000063 7100 00 113 tra index and continue search 114  000073 115 use_same:  000073 aa 177000 3750 03 116 ana =o177000,du use input character  000074 0a 000110 7100 00 117 tra use_ch 118  000075 aa 6 00056 2351 00 119 succ: lda count compute position in c  000076 aa 6 00053 0751 00 120 ada c_length  121  000077 aa 6 00051 1151 00 122 check: cmpa t_length should we select char from t  000100 0a 000107 6050 00 123 tpl use_bl no, use blank  000101 aa 6 00052 0751 00 124 ada t_offset add char offset of t 000102 aa 000002 7330 00 125 lrs 2 form word and char offset  000103 aa 000020 7720 00 126 qrl 16 000104 aa 2 00000 2351 05 127 lda bp|0,al get replacement char  000105 0a 000151 7370 22 128 lls shift,qu*  000106 aa 000002 7100 04 129 tra 2,ic and join common section  130  000107 aa 040000 2350 03 131 use_bl: lda =o040000,du 132  000110 133 use_ch: 000110 0a 000151 7710 33 134 arl shift,3* shift character to position for r  000111 0a 000155 7160 13 135 xec stba,3 store new character  136  000112 aa 6 00050 0541 00 137 aos s_length bump length counter  000113 0a 000127 6000 00 138 tze done zero means we're done  139  000114 aa 000011 0620 03 140 adx2 9,du update bit offset of s  000115 aa 000044 1020 03 141 cmpx2 36,du do we need another word  000116 aa 000003 6040 04 142 tmi 3,ic no  000117 aa 0 00001 3501 00 143 epp0 ap|1 yes, update ptr 000120 aa 000000 6220 00 144 eax2 0 and reset count  145  000121 aa 000001 0630 03 146 adx3 1,du update char offset of r 000122 aa 000004 1030 03 147 cmpx3 4,du do we need another word  000123 0a 000044 6040 00 148 tmi loop no, repeat loop  000124 aa 4 00001 3701 00 149 epp4 lp|1 yes, update ptr 000125 aa 000000 6230 00 150 eax3 0 reset shift  000126 0a 000044 7100 00 151 tra loop and then loop  152  000127 aa 7 00042 7101 20 153 done: return  154  155 " this entry is called with another argument specifying a string  156 " to be searched.  157 "  000130 158 trans_3_:  000130 aa 000100 6270 00 159 push  000131 aa 7 00040 2721 20 000132 aa 6 00055 5541 00 160 stc1 long is this is the long case  161  000133 aa 0 00016 3521 20 162 epp2 ap|c_arg,* get ptr to c  000134 aa 6 00062 2521 00 163 spri2 c_pt save  000135 aa 0 00017 2361 00 164 ldq ap|c_arg+1 get char offset of c  000136 aa 000011 7320 00 165 qrs 9  000137 aa 000007 3760 07 166 anq =o7,dl only legal char offsets are 11,22,33,0 bits  000140 0a 000161 2360 06 167 ldq index_mask,ql get initial mask for index operation 000141 aa 6 00054 7561 00 168 stq c_mask and save  000142 aa 0 00020 2351 20 169 lda ap|c_desc,* get desc(c)  000143 aa 010000 3150 03 170 cana varying,du is it varying  000144 aa 000002 6000 04 171 tze 2,ic no  000145 aa 2 77777 2351 00 172 lda bp|-1 yes, get current length 000146 0a 000174 3750 00 173 ana =o77777777 mask to 24 bits 000147 aa 6 00053 7551 00 174 sta c_length save length of c 000150 0a 000003 7100 00 175 tra join join common section  176  000151 aa 000000 000000 177 shift: dec 0b17,9b17,18b17,27b17  000152 aa 000011 000000 000153 aa 000022 000000 000154 aa 000033 000000 178  000155 aa 4 00000 5511 40 179 stba: stba lp|0,40  000156 aa 4 00000 5511 20 180 stba lp|0,20  000157 aa 4 00000 5511 10 181 stba lp|0,10  000160 aa 4 00000 5511 04 182 stba lp|0,04  183  000161 184 index_mask: 000161 aa 000777 777777 185 oct 000777777777  000162 aa 777000 777777 186 oct 777000777777  000163 aa 777777 000777 187 oct 777777000777  000164 aa 777777 777000 188 oct 777777777000  189  190 end  ENTRY SEQUENCES  000165 5a 000017 0000 00 000166 aa 7 00046 2721 20 000167 0a 000000 7100 00 000170 5a 000011 0000 00 000171 aa 7 00046 2721 20 000172 0a 000130 7100 00 LITERALS 000174 aa 000077 777777 NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000175 5a 000003 000000 000176 5a 000034 600000 000177 aa 000000 000000 000200 55 000011 000002 000201 5a 000002 400003 000202 55 000006 000011 000203 aa 012 164 162 141 000204 aa 156 163 154 141 000205 aa 164 145 137 000 000206 55 000017 000003 000207 0a 000171 500000 000210 55 000014 000003 000211 aa 010 164 162 141 trans_3_  000212 aa 156 163 137 063 000213 aa 137 000 000 000 000214 55 000025 000011 000215 0a 000166 500000 000216 55 000022 000003 000217 aa 010 164 162 141 trans_2_  000220 aa 156 163 137 062 000221 aa 137 000 000 000 000222 55 000002 000017 000223 6a 000000 400002 000224 55 000030 000003 000225 aa 014 163 171 155 symbol_table  000226 aa 142 157 154 137 000227 aa 164 141 142 154 000230 aa 145 000 000 000 DEFINITIONS HASH TABLE  000231 aa 000000 000015 000232 aa 000000 000000 000233 aa 000000 000000 000234 aa 000000 000000 000235 aa 000000 000000 000236 5a 000011 000000 000237 5a 000017 000000 000240 5a 000025 000000 000241 aa 000000 000000 000242 aa 000000 000000 000243 aa 000000 000000 000244 aa 000000 000000 000245 aa 000000 000000 000246 aa 000000 000000 NO EXTERNAL NAMES  NO TRAP POINTER WORDS  TYPE PAIR BLOCKS  000247 aa 000001 000000 000250 aa 000000 000000 INTERNAL EXPRESSION WORDS 000251 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000175 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 112143 000005 aa 305203 523135 000006 aa 000000 112162 000007 aa 426227 013173 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 000127 000020 aa 000000 000102 000021 aa 000000 000116 000022 aa 000121 000102 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 040066 056066 000030 aa 040040 116157 000031 aa 166145 155142 000032 aa 145162 040061 000033 aa 071070 062040 000034 aa 107112 157150 000035 aa 156163 157156 000036 aa 056123 171163 000037 aa 115141 151156 000040 aa 164056 155040 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 121622 264624 000070 aa 000000 112162 000071 aa 262700 000000 000072 aa 076163 160145 >spec>on>pl128d>translate_.alm  000073 aa 143076 157156 000074 aa 076160 154061 000075 aa 062070 144076 000076 aa 164162 141156 000077 aa 163154 141164 000100 aa 145137 056141 000101 aa 154155 040040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number  77 check translate_: 89, 122.  56 count translate_: 40, 99, 106, 119.  16 c_arg translate_: 36, 162, 164. 20 c_desc translate_: 37, 169.  53 c_length translate_: 39, 98, 120, 174.  54 c_mask translate_: 39, 100, 168. 62 c_pt translate_: 41, 103, 163. 127 done translate_: 54, 138, 153. 63 index translate_: 103, 110, 113. 161 index_mask translate_: 167, 184.  3 join translate_: 47, 175.  55 long translate_: 39, 45, 88, 160.  44 loop translate_: 84, 148, 151. 2 r_arg translate_: 30, 75, 76. 4 r_desc translate_: 31. 151 shift translate_: 128, 134, 177. 155 stba translate_: 135, 179.  75 succ translate_: 104, 119.  6 s_arg translate_: 32, 47, 57. 10 s_desc translate_: 33, 48.  50 s_length translate_: 39, 55, 137. 60 s_pt translate_: 41, 56, 82. 57 temp translate_: 40, 91, 93, 94, 96. 0 trans_2_ translate_: 26, 43.  130 trans_3_ translate_: 27, 158.  12 t_arg translate_: 34, 62, 69. 14 t_desc translate_: 35, 63.  51 t_length translate_: 39, 68, 122. 52 t_offset translate_: 39, 73, 124. 107 use_bl translate_: 123, 131.  110 use_ch translate_: 117, 133.  73 use_same translate_: 107, 115.  10000 varying translate_: 29, 49, 64, 170.  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