ASSEMBLY LISTING OF SEGMENT >spec>install>1170>utils_.alm ASSEMBLED ON: 10/17/88 0940.8 mst Mon OPTIONS USED: -target l68 list symbols ASSEMBLED BY: ALM Version 7.4 April 1987 ASSEMBLER CREATED: 11/02/87 1303.7 mst Mon 1 " *********************************************************** 2 " * * 3 " * Copyright, (C) Honeywell Bull Inc., 1988 * 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 " *********************************************************** 000000 11 name utils_ 12 " utils, utility machine language programs for alm. 13 14 "NOTE: segdefs are used rather than entrys where possible to speed up execution. 15 "the routines defined by segdefs must not use the linkage section, as lp may not be 16 "properly set 17 18 " Last modified on 11/12/72 at 02:01:23 by R F Mabee. Fixed short return for followon. 19 " on 07/25/72 at 08:44:38 by R F Mabee. Added utils_$compare_acc to compare ACC strings. 20 " on 03/04/72 at 20:49:26 by R F Mabee. Made opcode field 10 bits in makins. 21 " by RHG on 22 Sept 1970 to fix bug in upkflg 22 " by RHG on 17 Sept 1970 to delete 23 " unnecessary entries and change "entry" to "segdef" where possible 24 25 26 " basic shift and logical operations. 27 28 29 000000 30 segdef and 000000 31 and: null 000000 aa 0 00002 2361 20 32 ldq ap|2,* 000001 aa 0 00004 3761 20 33 anq ap|4,* 000002 aa 000013 7100 04 34 tra store_6-*,ic 35 36 000003 37 segdef ls left shift operator. 000003 38 ls: null 000003 aa 0 00002 2361 20 39 ldq ap|2,* get word, 000004 aa 0 00004 2351 20 40 lda ap|4,* and shift, 000005 aa 000000 7360 05 41 qls 0,al then shift, 000006 aa 000007 7100 04 42 tra store_6-*,ic 43 44 45 46 000007 47 segdef rs right shift operator. 000007 48 rs: null 000007 aa 0 00002 2361 20 49 ldq ap|2,* get word, 000010 aa 0 00004 2351 20 50 lda ap|4,* and shift, 000011 aa 000000 7720 05 51 qrl 0,al then shift, 000012 aa 000003 7100 04 52 tra store_6-*,ic 53 54 55 56 000013 57 segdef or or operator 000013 58 or: null 000013 aa 0 00002 2361 20 59 ldq ap|2,* get a operand 000014 aa 0 00004 2761 20 60 orq ap|4,* or in b operand 000015 aa 0 00006 7561 20 61 store_6: stq ap|6,* 000016 62 utils_short_return: 000016 aa 7 00044 7101 20 63 short_return 64 65 66 67 68 " make external address subroutine. 69 000017 70 segdef exadrs define entry. 000017 71 exadrs: null 000017 aa 0 00004 2351 20 72 lda ap|4,* get displacement, 000020 aa 000017 7730 00 73 lrl 15 and position. 000021 aa 0 00002 2351 20 74 lda ap|2,* get base register, 000022 aa 000025 7730 00 75 lrl 3+18 and position, 000023 aa 777772 7100 04 76 tra store_6-*,ic 77 78 79 80 81 " get symbol character count from symbol first word. 82 83 000024 84 entry nswrds define entry. 000024 85 nswrds: null 000024 aa 0 00002 2361 20 86 ldq ap|2,* get first word of ASCII string or relative ptr into free_ segment 000025 aa 000001 1160 03 87 cmpq =1,du string has value in left part of Q-reg 000026 aa 000002 6030 04 88 trc have_string-*,ic 000027 4a 4 00010 2361 20 89 have_ptr: ldq |[lavptr],*ql load first word of ASCII string 000030 90 have_string: 000030 91 null 000030 aa 000035 7720 00 92 qrl 3*9+2 position character count, 000031 aa 000001 0760 07 93 adq =1,dl and form word count 000032 aa 0 00004 7561 20 94 stq ap|4,* 000033 aa 777763 7100 04 95 tra utils_short_return-*,ic then return to caller. 96 97 98 99 100 " make instruction from its five fields. 101 102 000034 103 segdef makins define entry. 000034 104 makins: null 000034 aa 0 00006 2351 20 105 lda ap|6,* 000035 aa 777400 3750 07 106 ana =o777400,dl isolate 10-bit opcode field. 000036 aa 0 00012 2751 20 107 ora ap|10,* insert modifier, 000037 aa 000006 7730 00 108 lrl 6 .. 000040 aa 0 00010 2751 20 109 ora ap|8,* insert b29, 000041 aa 000014 7730 00 110 lrl 18-6 .. 000042 aa 0 00004 2351 20 111 lda ap|4,* insert displacement, 000043 aa 000017 7730 00 112 lrl 15 .. 000044 aa 001000 3160 07 113 canq =o1000,dl test b29. 000045 aa 000002 6000 04 114 tze bypass-*,ic skip if zero, 000046 aa 0 00002 2351 20 115 lda ap|2,* insert base, 000047 aa 000003 7730 00 116 bypass: lrl 3 else, take high bits of displacement. 000050 aa 0 00014 7561 20 117 stq ap|12,* store answer. 000051 aa 777745 7100 04 118 tra utils_short_return-*,ic then return to caller. 119 120 121 122 123 " pack and unpack routines for table flags. 124 000052 125 entry pckflg (word) define entry. 000052 126 pckflg: null 000052 aa 777734 6270 00 127 eax7 -36 set x7 000053 4a 4 00012 3521 20 128 eppbp |[flgvec] 000054 aa 2 00044 2351 17 129 pklp: lda bp|36,7 insert flag vector word 000055 aa 000001 7730 00 130 lrl 1 shift into assembled word 000056 aa 2 00044 4501 17 131 stz bp|36,7 clear the flag 000057 aa 000001 0670 03 132 adx7 =1,du decrement index into flag vector 000060 aa 777774 6010 04 133 tnz pklp-*,ic loop if more to do. 000061 aa 0 00002 7561 20 134 stq ap|2,* all done, save flags, 000062 aa 777734 7100 04 135 tra utils_short_return-*,ic and return to caller. 136 137 138 139 000063 140 entry upkflg (word) define entry. 000063 141 upkflg: null 000063 aa 000044 6270 00 142 eax7 36 initialize loop control 000064 4a 4 00012 3521 20 143 eppbp |[flgvec] 000065 aa 0 00002 2361 20 144 ldq ap|2,* get packed word 000066 aa 000000 2350 07 145 loopbk: lda =0,dl clear the A-reg 000067 aa 000001 7370 00 146 lls 1 shift in bit of packed word 000070 aa 2 77777 2551 17 147 orsa bp|-1,7 store bit into word vector 000071 aa 000001 1670 03 148 sbx7 =1,du bump loop control 000072 aa 777774 6010 04 149 tnz loopbk-*,ic go back if more to do 000073 aa 777723 7100 04 150 tra utils_short_return-*,ic else, return to caller 151 152 153 154 155 " put character routine, ascii. 156 157 000074 158 segdef putach (word,charno,char) define entry. 000074 159 putach: null 000074 aa 0 00006 2351 20 160 lda ap|6,* get the character 000075 aa 0 00004 7201 20 161 lxl0 ap|4,* get the character position 000076 0a 000101 7160 10 162 xec als-1,0 position the character 000077 aa 0 00002 3521 20 163 eppbp ap|2,* get a pointer to the word 000100 0a 000105 7160 10 164 xec stba-1,0 store the character 000101 aa 777715 7100 04 165 tra utils_short_return-*,ic 166 000102 aa 000033 7350 00 167 als: als 27 000103 aa 000022 7350 00 168 als 18 000104 aa 000011 7350 00 169 als 9 000105 aa 000000 0110 03 170 nop 0,du 171 000106 aa 2 00000 5511 40 172 stba: stba bp|0,40 000107 aa 2 00000 5511 20 173 stba bp|0,20 000110 aa 2 00000 5511 10 174 stba bp|0,10 000111 aa 2 00000 5511 04 175 stba bp|0,04 176 177 178 179 180 " exit and close-out routines, terminate run. 181 182 000112 183 entry abort utils$abort entry point. 000112 4a 4 00014 7101 20 184 abort: tra |[abort1] have prnter_ give abort message and abort. 185 186 187 " compare_acc compares two ACC format strings in alphabetic collating 188 " sequence. It returns as a result: zero if the two strings are 189 " identical, a negative number if the first is less, or a positive 190 " number if the second is less. 191 " Its arguments are offsets into the scratch segment. 192 000113 193 entry compare_acc 194 temp temp 000113 195 compare_acc: 000113 aa 000060 6270 00 196 save " result = compare_acc (name_rel_1, name_rel_2); 000114 aa 7 00040 2721 20 000115 aa 0 00002 2351 20 197 lda ap|2,* 000116 aa 0 00004 2361 20 198 ldq ap|4,* 000117 4a 4 00016 3521 20 199 eppbp |[lavptr],* 000120 aa 2 00000 3501 05 200 eppap bp|0,al " ap points to base of first ACC string. 000121 aa 2 00000 3521 06 201 eppbp bp|0,ql " and bp points to base of second. 202 000122 aa 2 00000 2351 00 203 lda bp|0 000123 0a 000224 3750 00 204 ana =o000137137137 " Compare first word without case bits. 000124 aa 6 00050 7551 00 205 sta temp 000125 aa 0 00000 2351 00 206 lda ap|0 000126 0a 000224 3750 00 207 ana =o000137137137 000127 aa 6 00050 1751 00 208 sba temp 000130 0a 000201 6010 00 209 tnz comp_done 210 211 " First three letters the same, start full check. 212 000131 aa 2 00000 2351 00 213 lda bp|0 000132 aa 000035 7710 00 214 arl 29 " Length in words minus one. 000133 aa 6 00050 7551 00 215 sta temp 000134 aa 0 00000 2351 00 216 lda ap|0 000135 aa 000035 7710 00 217 arl 29 000136 aa 6 00050 1151 00 218 cmpa temp 000137 aa 000002 6040 04 219 tmi 2,ic 000140 aa 6 00050 2351 00 220 lda temp " The length of the shorter one. 000141 aa 000001 0750 07 221 ada 1,dl " Get full word count. 222 000142 aa 0 00000 3501 05 223 eppap ap|0,al " Add length to pointers, put negative length in xr0. 000143 aa 2 00000 3521 05 224 eppbp bp|0,al " This is so one register can double as index and counter. 000144 aa 000000 5310 07 225 neg 0,dl " bp|0,0 is now the base of the ACC string. 000145 aa 000000 6200 05 226 eax0 0,al 227 228 " Now look at rest of words, ignoring case bits. 229 000146 aa 000000 6210 10 230 eax1 0,0 000147 aa 000001 0610 03 231 comp_l1: adx1 1,du 000150 0a 000161 6050 00 232 tpl comp_d1 233 000151 aa 2 00000 2351 11 234 lda bp|0,1 000152 0a 000225 3750 00 235 ana =o137137137137 000153 aa 6 00050 7551 00 236 sta temp 000154 aa 0 00000 2351 11 237 lda ap|0,1 000155 0a 000225 3750 00 238 ana =o137137137137 000156 aa 6 00050 1751 00 239 sba temp 000157 0a 000201 6010 00 240 tnz comp_done 000160 0a 000147 7100 00 241 tra comp_l1 000161 242 comp_d1: 243 244 " Now there is no difference except possibly case bits, so check them. 245 " First word first. 246 000161 aa 2 00000 2351 10 247 lda bp|0,0 000162 0a 000226 3750 00 248 ana =o000777777777 000163 aa 6 00050 7551 00 249 sta temp 000164 aa 0 00000 2351 10 250 lda ap|0,0 000165 0a 000226 3750 00 251 ana =o000777777777 000166 aa 6 00050 1751 00 252 sba temp 000167 0a 000201 6010 00 253 tnz comp_done 254 255 " Run over rest of words again. 256 000170 aa 000000 6210 10 257 eax1 0,0 000171 aa 000001 0610 03 258 comp_l2: adx1 1,du 000172 0a 000177 6050 00 259 tpl comp_d2 260 000173 aa 0 00000 2351 11 261 lda ap|0,1 000174 aa 2 00000 1751 11 262 sba bp|0,1 000175 0a 000201 6010 00 263 tnz comp_done 000176 0a 000171 7100 00 264 tra comp_l2 000177 265 comp_d2: 266 267 " Now the only possible difference is in the lengths. 268 000177 aa 0 00000 2351 10 269 lda ap|0,0 000200 aa 2 00000 1751 10 270 sba bp|0,0 000201 271 comp_done: 000201 aa 6 00032 3501 20 272 eppap sp|26,* 000202 aa 0 00006 7551 20 273 sta ap|6,* 000203 aa 7 00042 7101 20 274 return 275 276 end ENTRY SEQUENCES 000204 5a 000047 0000 00 000205 aa 7 00046 2721 20 000206 0a 000024 7100 00 000207 5a 000035 0000 00 000210 aa 7 00046 2721 20 000211 0a 000052 7100 00 000212 5a 000030 0000 00 000213 aa 7 00046 2721 20 000214 0a 000063 7100 00 000215 5a 000016 0000 00 000216 aa 7 00046 2721 20 000217 0a 000112 7100 00 000220 5a 000010 0000 00 000221 aa 7 00046 2721 20 000222 0a 000113 7100 00 LITERALS 000224 aa 000137 137137 000225 aa 137137 137137 000226 aa 000777 777777 NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000227 5a 000003 000000 000230 5a 000110 600000 000231 aa 000000 000000 000232 55 000010 000002 000233 5a 000002 400003 000234 55 000006 000010 000235 aa 006 165 164 151 000236 aa 154 163 137 000 000237 55 000016 000003 000240 0a 000221 500000 000241 55 000013 000003 000242 aa 013 143 157 155 compare_acc 000243 aa 160 141 162 145 000244 aa 137 141 143 143 000245 55 000023 000010 000246 0a 000216 500000 000247 55 000021 000003 000250 aa 005 141 142 157 abort 000251 aa 162 164 000 000 000252 55 000030 000016 000253 0a 000074 400000 000254 55 000026 000003 000255 aa 006 160 165 164 putach 000256 aa 141 143 150 000 000257 55 000035 000023 000260 0a 000213 500000 000261 55 000033 000003 000262 aa 006 165 160 153 upkflg 000263 aa 146 154 147 000 000264 55 000042 000030 000265 0a 000210 500000 000266 55 000040 000003 000267 aa 006 160 143 153 pckflg 000270 aa 146 154 147 000 000271 55 000047 000035 000272 0a 000034 400000 000273 55 000045 000003 000274 aa 006 155 141 153 makins 000275 aa 151 156 163 000 000276 55 000054 000042 000277 0a 000205 500000 000300 55 000052 000003 000301 aa 006 156 163 167 nswrds 000302 aa 162 144 163 000 000303 55 000061 000047 000304 0a 000017 400000 000305 55 000057 000003 000306 aa 006 145 170 141 exadrs 000307 aa 144 162 163 000 000310 55 000065 000054 000311 0a 000013 400000 000312 55 000064 000003 000313 aa 002 157 162 000 or 000314 55 000071 000061 000315 0a 000007 400000 000316 55 000070 000003 000317 aa 002 162 163 000 rs 000320 55 000075 000065 000321 0a 000003 400000 000322 55 000074 000003 000323 aa 002 154 163 000 ls 000324 55 000101 000071 000325 0a 000000 400000 000326 55 000100 000003 000327 aa 003 141 156 144 and 000330 55 000002 000075 000331 6a 000000 400002 000332 55 000104 000003 000333 aa 014 163 171 155 symbol_table 000334 aa 142 157 154 137 000335 aa 164 141 142 154 000336 aa 145 000 000 000 DEFINITIONS HASH TABLE 000337 aa 000000 000033 000340 5a 000047 000000 000341 5a 000065 000000 000342 aa 000000 000000 000343 5a 000075 000000 000344 aa 000000 000000 000345 5a 000010 000000 000346 5a 000035 000000 000347 5a 000042 000000 000350 aa 000000 000000 000351 aa 000000 000000 000352 5a 000101 000000 000353 aa 000000 000000 000354 aa 000000 000000 000355 aa 000000 000000 000356 aa 000000 000000 000357 aa 000000 000000 000360 aa 000000 000000 000361 aa 000000 000000 000362 5a 000054 000000 000363 5a 000071 000000 000364 aa 000000 000000 000365 aa 000000 000000 000366 5a 000061 000000 000367 aa 000000 000000 000370 5a 000016 000000 000371 5a 000023 000000 000372 5a 000030 000000 EXTERNAL NAMES 000373 aa 006 141 142 157 abort1 000374 aa 162 164 061 000 000375 aa 007 160 162 156 prnter_ 000376 aa 164 145 162 137 000377 aa 006 146 154 147 flgvec 000400 aa 166 145 143 000 000401 aa 006 154 141 166 lavptr 000402 aa 160 164 162 000 000403 aa 010 145 142 137 eb_data_ 000404 aa 144 141 164 141 000405 aa 137 000 000 000 NO TRAP POINTER WORDS TYPE PAIR BLOCKS 000406 aa 000004 000000 000407 55 000146 000144 000410 aa 000004 000000 000411 55 000154 000150 000412 aa 000004 000000 000413 55 000154 000152 000414 aa 000001 000000 000415 aa 000000 000000 INTERNAL EXPRESSION WORDS 000416 5a 000157 000000 000417 5a 000161 000000 000420 5a 000163 000000 000421 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000227 000000 000002 aa 000000 000000 000003 aa 000000 000000 000004 aa 000000 000000 000005 aa 000000 000000 000006 22 000010 000020 000007 a2 000000 000000 000010 9a 777770 0000 46 eb_data_|lavptr 000011 5a 000171 0000 66 000012 9a 777766 0000 46 eb_data_|flgvec 000013 5a 000170 0000 00 000014 9a 777764 0000 46 prnter_|abort1 000015 5a 000167 0000 00 000016 9a 777762 0000 46 eb_data_|lavptr 000017 5a 000171 0000 20 SYMBOL INFORMATION SYMBOL TABLE HEADER 000000 aa 000000 000001 000001 aa 163171 155142 000002 aa 164162 145145 000003 aa 000000 000007 000004 aa 000000 115705 000005 aa 073761 335527 000006 aa 000000 116574 000007 aa 772656 711124 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 000157 000020 aa 000000 000102 000021 aa 000125 000120 000022 aa 000151 000102 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 067056 064040 000030 aa 101160 162151 000031 aa 154040 061071 000032 aa 070067 040040 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 000035 000067 aa 165715 122753 000070 aa 000000 116574 000071 aa 771462 400000 000072 aa 076163 160145 >spec>install>1170>utils_.alm 000073 aa 143076 151156 000074 aa 163164 141154 000075 aa 154076 061061 000076 aa 067060 076165 000077 aa 164151 154163 000100 aa 137056 141154 000101 aa 155040 040040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number 112 abort utils_: 183, 184. abort1 utils_: 184. 102 als utils_: 162, 167. 0 and utils_: 30, 31. 47 bypass utils_: 114, 116. 113 compare_acc utils_: 193, 195. 161 comp_d1 utils_: 232, 242. 177 comp_d2 utils_: 259, 265. 201 comp_done utils_: 209, 240, 253, 263, 271. 147 comp_l1 utils_: 231, 241. 171 comp_l2 utils_: 258, 264. eb_data_ utils_: 89, 128, 143, 199. 17 exadrs utils_: 70, 71. flgvec utils_: 128, 143. 27 have_ptr utils_: 89. 30 have_string utils_: 88, 90. lavptr utils_: 89, 199. 66 loopbk utils_: 145, 149. 3 ls utils_: 37, 38. 34 makins utils_: 103, 104. 24 nswrds utils_: 84, 85. 13 or utils_: 57, 58. 52 pckflg utils_: 125, 126. 54 pklp utils_: 129, 133. prnter_ utils_: 184. 74 putach utils_: 158, 159. 7 rs utils_: 47, 48. 106 stba utils_: 164, 172. 15 store_6 utils_: 34, 42, 52, 61, 76. 50 temp utils_: 194, 205, 208, 215, 218, 220, 236, 239, 249, 252. 63 upkflg utils_: 140, 141. 16 utils_short_return utils_: 62, 95, 118, 135, 150, 165. 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