COMPILATION LISTING OF SEGMENT get_alm_op_ Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 06/30/83 0842.3 mst Thu Options: map single_symbol_list 1 /* ************************************************************** 2* * * 3* * Copyright, (C) Massachusetts Institute of Technology, 1974 * 4* * * 5* ************************************************************** */ 6 /* Procedure to look up a symbol in alm's symbol table 7* Part of Multics LISP Assembly Program 8* 75.01.23 DAM */ 9 10 get_alm_op_: procedure(a_symbol, value); 11 12 dcl a_symbol char(*), /* symbol to be looked up, no padding */ 13 value fixed bin(35); /* its value, -1 if not found in table */ 14 /* -2 if takes register number */ 15 16 dcl 1 alm$opcode_table aligned external structure, 17 2 number_of_symbols fixed bin(35,1), /* word contains 2*hbound of symbols array */ 18 2 symbols_relp bit(18) unaligned, /* relative pointer to symbols array */ 19 2 values_relp bit(18) unaligned, /* relative pointer to values array */ 20 21 symbols_ptr pointer init(addrel(addr(alm$opcode_table),symbols_relp)), 22 23 alm_nsymbol(0:number_of_symbols) fixed bin(71) aligned based(symbols_ptr), 24 25 values_ptr pointer init(addrel(addr(alm$opcode_table), values_relp)), 26 27 1 alm_values_table (0:number_of_symbols) aligned structure based(values_ptr), 28 2 pseudo bit(18) unaligned, /* pseudo op status */ 29 2 opcode bit(10) unaligned, 30 2 opclass fixed bin(7) unaligned; 31 32 dcl symbol char(8) aligned based(addr(nsymbol)); /* symbol munged into fortran format */ 33 34 dcl nsymbol fixed bin(71); /* for comparison */ 35 36 dcl (A9BD_TYPE init("000000000000110101"b), 37 PTRN_TYPE init("000000000000101100"b), 38 NDXN_TYPE init("000000000000101011"b) ) bit(18) static; /* interesting values of pseudo field */ 39 dcl (i, j, k) fixed bin; 40 41 dcl (addr, addrel, unspec, substr, length, divide) builtin; 42 43 44 45 unspec(symbol) = ""b; /* so as to pad with null characters */ 46 substr(symbol, 1, length(a_symbol)) = a_symbol; 47 48 j = 1; 49 k = number_of_symbols; /* binary search */ 50 do while(j <= k); 51 i = j + divide(k-j, 2, 17, 0); /* probing point */ 52 if alm_nsymbol(i) = nsymbol then do; 53 if opclass(i) = 1 then go to lose; /* old */ 54 if opclass(i) = 4 then go to lose; /* old */ 55 if pseudo(i) = ""b then value = fixed(opcode(i)||"00000000"b, 18); 56 else if pseudo(i) = A9BD_TYPE then value = fixed(opcode(i)||"00000000"b, 18); 57 else if pseudo(i) = PTRN_TYPE then value = -2; /* op ptr,addr */ 58 else if pseudo(i) = NDXN_TYPE then value = -2; /* op xr,addr */ 59 else go to lose; /* not interesting */ 60 return; 61 end; 62 else if alm_nsymbol(i) < nsymbol then j = i+1; 63 else k = i-1; 64 end; 65 lose: value = -1; /* not found */ 66 return; 67 68 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 06/29/83 1541.3 get_alm_op_.pl1 >special_ldd>on>06/27/83>get_alm_op_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) A9BD_TYPE constant bit(18) initial unaligned dcl 36 ref 56 NDXN_TYPE constant bit(18) initial unaligned dcl 36 ref 58 PTRN_TYPE constant bit(18) initial unaligned dcl 36 ref 57 a_symbol parameter char unaligned dcl 12 ref 10 46 46 addr builtin function dcl 41 ref 16 16 45 46 addrel builtin function dcl 41 ref 16 16 alm$opcode_table 000010 external static structure level 1 dcl 16 set ref 16 16 alm_nsymbol based fixed bin(71,0) array dcl 16 ref 52 62 alm_values_table based structure array level 1 dcl 16 divide builtin function dcl 41 ref 51 fixed builtin function ref 55 56 get_alm_op_ 000010 constant entry external dcl 10 i 000106 automatic fixed bin(17,0) dcl 39 set ref 51* 52 53 54 55 55 56 56 57 58 62 62 63 j 000107 automatic fixed bin(17,0) dcl 39 set ref 48* 50 51 51 62* k 000110 automatic fixed bin(17,0) dcl 39 set ref 49* 50 51 63* length builtin function dcl 41 ref 46 lose 000177 constant label dcl 65 ref 53 54 59 nsymbol 000104 automatic fixed bin(71,0) dcl 34 set ref 45 46 52 62 number_of_symbols 000010 external static fixed bin(35,1) level 2 dcl 16 set ref 49 opclass 0(28) based fixed bin(7,0) array level 2 packed unaligned dcl 16 ref 53 54 opcode 0(18) based bit(10) array level 2 packed unaligned dcl 16 ref 55 56 pseudo based bit(18) array level 2 packed unaligned dcl 16 ref 55 56 57 58 substr builtin function dcl 41 set ref 46* symbol based char(8) dcl 32 set ref 45* 46* symbols_ptr 000100 automatic pointer initial dcl 16 set ref 16* 52 62 symbols_relp 1 000010 external static bit(18) level 2 packed unaligned dcl 16 set ref 16 unspec builtin function dcl 41 set ref 45* value parameter fixed bin(35,0) dcl 12 set ref 10 55* 56* 57* 58* 65* values_ptr 000102 automatic pointer initial dcl 16 set ref 16* 53 54 55 55 56 56 57 58 values_relp 1(18) 000010 external static bit(18) level 2 packed unaligned dcl 16 set ref 16 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 240 252 203 250 Length 420 203 12 132 34 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_alm_op_ 75 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_alm_op_ 000100 symbols_ptr get_alm_op_ 000102 values_ptr get_alm_op_ 000104 nsymbol get_alm_op_ 000106 i get_alm_op_ 000107 j get_alm_op_ 000110 k get_alm_op_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry_desc trunc_fx1 NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. alm$opcode_table LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000004 16 000023 45 000036 46 000040 48 000046 49 000050 50 000054 51 000057 52 000064 53 000070 54 000077 55 000105 56 000122 57 000140 58 000150 59 000160 60 000161 62 000162 63 000173 64 000176 65 000177 66 000202 ----------------------------------------------------------- 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