ASSEMBLY LISTING OF SEGMENT >spec>on>pl128d>power_of_two.alm ASSEMBLED ON: 10/03/83 1352.1 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 " * 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 "  11 " function to return N where 2**N=M, returns 0 if M is not power of 2  12 "  13 " usage is N = power_of_two(M)  14 "  000000 15 name power_of_two  000000 16 entry power_of_two 17 "  000000 18 power_of_two:  000000 aa 000000 2350 07 19 lda 0,dl init answer  000001 aa 0 00002 2361 20 20 ldq ap|2,* get M  000002 aa 000001 1760 07 21 sbq 1,dl get M-1  000003 aa 0 00002 3761 20 22 anq ap|2,* form M & (M-1) 000004 0a 000012 6010 00 23 tnz done ^= 0 means not power of 2  000005 aa 0 00002 2361 20 24 ldq ap|2,* restore M  000006 aa 000001 7720 00 25 qrl 1 shift right 000007 0a 000012 6000 00 26 tze done shift until zero 000010 aa 000001 0750 07 27 ada 1,dl update count 000011 aa 777775 7100 04 28 tra -3,ic and try again  000012 aa 0 00004 7551 20 29 done: sta ap|4,* store N where 2**N=M  000013 aa 7 00044 7101 20 30 short_return  31 end  ENTRY SEQUENCES  000014 5a 000012 0000 00 000015 aa 7 00046 2721 20 000016 0a 000000 7100 00 NO LITERALS  NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000020 5a 000003 000000 000021 5a 000030 600000 000022 aa 000000 000000 000023 55 000012 000002 000024 5a 000002 400003 000025 55 000006 000012 000026 aa 014 160 157 167 000027 aa 145 162 137 157 000030 aa 146 137 164 167 000031 aa 157 000 000 000 000032 55 000021 000003 000033 0a 000015 500000 000034 55 000015 000003 000035 aa 014 160 157 167 power_of_two  000036 aa 145 162 137 157 000037 aa 146 137 164 167 000040 aa 157 000 000 000 000041 55 000002 000012 000042 6a 000000 400002 000043 55 000024 000003 000044 aa 014 163 171 155 symbol_table  000045 aa 142 157 154 137 000046 aa 164 141 142 154 000047 aa 145 000 000 000 DEFINITIONS HASH TABLE  000050 aa 000000 000015 000051 aa 000000 000000 000052 aa 000000 000000 000053 aa 000000 000000 000054 aa 000000 000000 000055 aa 000000 000000 000056 aa 000000 000000 000057 5a 000021 000000 000060 aa 000000 000000 000061 5a 000012 000000 000062 aa 000000 000000 000063 aa 000000 000000 000064 aa 000000 000000 000065 aa 000000 000000 NO EXTERNAL NAMES  NO TRAP POINTER WORDS  TYPE PAIR BLOCKS  000066 aa 000001 000000 000067 aa 000000 000000 INTERNAL EXPRESSION WORDS LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000020 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 427755 373740 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 000117 000020 aa 000000 000102 000021 aa 000000 000106 000022 aa 000111 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 000040 000067 aa 121622 265516 000070 aa 000000 112162 000071 aa 264204 000000 000072 aa 076163 160145 >spec>on>pl128d>power_of_two.alm  000073 aa 143076 157156 000074 aa 076160 154061 000075 aa 062070 144076 000076 aa 160157 167145 000077 aa 162137 157146 000100 aa 137164 167157 000101 aa 056141 154155 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number  12 done power_of_two: 23, 26, 29.  0 power_of_two power_of_two: 16, 18. 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