COMPILATION LISTING OF SEGMENT c_a Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1623.7 mst Mon Options: optimize map 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 /* This procedure is called with a constant and a code. It is used 12* to generate various types of referencees using the constant. 13* 14* Initial Version: 30 September 1968 by BLW 15* Modified: 19 March 1971 by BLW for Version II 16* Modified: 24 August 1972 by BLW 17* Modified: 4 June 1975 by RAB for separate_static 18* Modified 791026 by PG for TCT tables in pl1_operators_ 19**/ 20 21 c_a: proc(pc,code) returns(ptr); 22 23 dcl (c,pc) fixed bin(15), /* constant value */ 24 code fixed bin, /* what type of reference */ 25 table_subscript fixed bin, 26 word_delta fixed bin; 27 28 dcl (ref_pt,p) ptr, 29 xr fixed bin(3), 30 n fixed bin(15), 31 mask_array fixed static init(0), /* loc of mask array */ 32 blank_array fixed static init(288), /* loc of blank array */ 33 array_mask fixed static init(144), /* loc of mask2 array */ 34 xr_man$load_any_const entry(fixed bin,fixed bin(3)), 35 get_reference ext entry returns(ptr); 36 dcl base_man$load_linkage entry returns(bit(3) aligned); 37 dcl base_man$load_static entry returns(bit(3) aligned); 38 dcl stack_temp$assign_temp entry(ptr); 39 40 dcl (addr,bit,divide,fixed,substr,mod) builtin; 41 42 dcl 1 word aligned based(p), 43 2 offset unaligned bit(18), 44 2 rhs unaligned bit(18); 45 46 /* internal static */ 47 48 dcl tct_byte_offset (0:3) fixed bin int static init (-627, -499, -371, -243); /* from assembly of pl1_operators_ */ 49 50 /* include files */ 51 1 1 /* BEGIN INCLUDE FILE ... reference.incl.pl1 */ 1 2 1 3 dcl 1 reference based aligned, 1 4 2 node_type bit(9) unaligned, 1 5 2 array_ref bit(1) unaligned, 1 6 2 varying_ref bit(1) unaligned, 1 7 2 shared bit(1) unaligned, 1 8 2 put_data_sw bit(1) unaligned, 1 9 2 processed bit(1) unaligned, 1 10 2 units fixed(3) unaligned, 1 11 2 ref_count fixed(17) unaligned, 1 12 2 c_offset fixed(24), 1 13 2 c_length fixed(24), 1 14 2 symbol ptr unaligned, 1 15 2 qualifier ptr unaligned, 1 16 2 offset ptr unaligned, 1 17 2 length ptr unaligned, 1 18 2 subscript_list ptr unaligned, 1 19 /* these fields are used by the 645 code generator */ 1 20 2 address structure unaligned, 1 21 3 base bit(3), 1 22 3 offset bit(15), 1 23 3 op bit(9), 1 24 3 no_address bit(1), 1 25 3 inhibit bit(1), 1 26 3 ext_base bit(1), 1 27 3 tag bit(6), 1 28 2 info structure unaligned, 1 29 3 address_in structure, 1 30 4 b dimension(0:7) bit(1), 1 31 4 storage bit(1), 1 32 3 value_in structure, 1 33 4 a bit(1), 1 34 4 q bit(1), 1 35 4 aq bit(1), 1 36 4 string_aq bit(1), 1 37 4 complex_aq bit(1), 1 38 4 decimal_aq bit(1), 1 39 4 b dimension(0:7) bit(1), 1 40 4 storage bit(1), 1 41 4 indicators bit(1), 1 42 4 x dimension(0:7) bit(1), 1 43 3 other structure, 1 44 4 big_offset bit(1), 1 45 4 big_length bit(1), 1 46 4 modword_in_offset bit(1), 1 47 2 data_type fixed(5) unaligned, 1 48 2 bits structure unaligned, 1 49 3 padded_ref bit(1), 1 50 3 aligned_ref bit(1), 1 51 3 long_ref bit(1), 1 52 3 forward_ref bit(1), 1 53 3 ic_ref bit(1), 1 54 3 temp_ref bit(1), 1 55 3 defined_ref bit(1), 1 56 3 evaluated bit(1), 1 57 3 allocate bit(1), 1 58 3 allocated bit(1), 1 59 3 aliasable bit(1), 1 60 3 even bit(1), 1 61 3 perm_address bit(1), 1 62 3 aggregate bit(1), 1 63 3 hit_zero bit(1), 1 64 3 dont_save bit(1), 1 65 3 fo_in_qual bit(1), 1 66 3 hard_to_load bit(1), 1 67 2 relocation bit(12) unaligned, 1 68 2 more_bits structure unaligned, 1 69 3 substr bit(1), 1 70 3 padded_for_store_ref bit(1), 1 71 3 aligned_for_store_ref bit(1), 1 72 3 mbz bit(15), 1 73 2 store_ins bit(18) unaligned; 1 74 1 75 /* END INCLUDE FILE ... reference.incl.pl1 */ 52 2 1 /* BEGIN INCLUDE FILE ... temporary.incl.pl1 */ 2 2 2 3 dcl 1 temporary based, 2 4 2 node_type bit(9), /* type is "000001010"b */ 2 5 2 size fixed bin(18), 2 6 2 next ptr, 2 7 2 location fixed bin(18), 2 8 2 ref_count fixed bin, 2 9 2 symbol ptr unal, 2 10 2 last_freed fixed bin(18); 2 11 2 12 /* END INCLUDE FILE ... temporary.incl.pl1 */ 53 3 1 dcl bases(0:7) bit(3) aligned int static init("000"b, "010"b, "100"b, "001"b, "011"b, "101"b, "111"b,"110"b) 3 2 options(constant); 3 3 3 4 dcl ( ap defined(bases(0)), 3 5 bp defined(bases(1)), 3 6 lp defined(bases(2)), 3 7 sp defined(bases(7))) bit(3) aligned; 3 8 3 9 dcl ( ab defined(bases(3)), 3 10 bb defined(bases(4)), 3 11 lb defined(bases(5)), 3 12 sb defined(bases(6))) bit(3) aligned; 3 13 3 14 dcl which_base(0:7) fixed bin int static init(0,3,1,4,2,5,7,6) options(constant); 54 4 1 /* BEGIN INCLUDE FILE relocation_bits.incl.pl1 */ 4 2 4 3 /* This include file defines the relocation bits as bit (6) entities. See 4 4* also relbts.incl.pl1 and reloc_lower.incl.pl1. */ 4 5 4 6 dcl ( rc_a initial("000000"b), /* absolute */ 4 7 rc_t initial("010000"b), /* text */ 4 8 rc_nt initial("010001"b), /* negative text */ 4 9 rc_lp18 initial("010010"b), /* linkage, 18 bit */ 4 10 rc_nlp18 initial("010011"b), /* negative link, 18 bit */ 4 11 rc_lp15 initial("010100"b), /* linkage, 15 bit */ 4 12 rc_dp initial("010101"b), /* def section */ 4 13 rc_s initial("010110"b), /* symbol segment */ 4 14 rc_ns initial("010111"b), /* negative symbol */ 4 15 rc_is18 initial("011000"b), /* internal static 18 */ 4 16 rc_is15 initial("011001"b), /* internal static 15 */ 4 17 rc_lb initial("011000"b), /* link block */ 4 18 rc_nlb initial("011001"b), /* negative link block */ 4 19 rc_sr initial("011010"b), /* self relative */ 4 20 rc_e initial("011111"b)) /* escape */ 4 21 bit(6) int static options(constant); 4 22 4 23 /* END INCLUDE FILE relocation_bits.incl.pl1 */ 55 56 57 /* program */ 58 59 ref_pt = get_reference(); 60 p = addr(ref_pt -> reference.address); 61 c,n = pc; 62 goto sw(code); 63 64 /* reference is c itself */ 65 66 sw(1): if n >= 0 then p -> word.offset = bit(fixed(n,18),18); 67 else p -> word.offset = bit(fixed(262144 + n,18),18); 68 69 done: ref_pt -> reference.no_address = "0"b; 70 ref_pt -> reference.perm_address = "1"b; 71 return(ref_pt); 72 73 /* reference is c,dl */ 74 75 sw(2): ref_pt -> address.tag = "000111"b; /* dl */ 76 goto sw(1); 77 78 /* reference is c,du */ 79 80 sw(3): ref_pt -> address.tag = "000011"b; /* du */ 81 goto sw(1); 82 83 /* reference is sp|c */ 84 85 sw(4): ref_pt -> address.base = sp; 86 87 if mod(n,2) = 0 then ref_pt -> reference.even = "1"b; 88 89 l2: if n >= 16384 90 then do; 91 n = mod(n,16384); 92 call xr_man$load_any_const(c-n,xr); 93 substr(ref_pt -> address.tag,3,4) = "1"b || bit(xr,3); 94 end; 95 96 ref_pt -> address.ext_base = "1"b; 97 ref_pt -> address.offset = bit(fixed(n,15),15);; 98 goto done; 99 100 /* reference is ap|mask_array+2*c, where referenceed location 101* contains a string with c 1's followed by 72-c 0's */ 102 103 sw(5): ref_pt -> address.offset = bit(fixed(mask_array+2*n,15),15); 104 l1: ref_pt -> address.base = ap; 105 ref_pt -> address.ext_base = "1"b; 106 ref_pt -> reference.even = "1"b; 107 goto done; 108 109 /* reference is ap|blank_array+2*c, where referenceed location 110* contains a string with c 0 char's followed by 8-c blanks */ 111 112 sw(6): ref_pt -> address.offset = bit(fixed(blank_array+2*divide(n,9,17,0),15),15); 113 goto l1; 114 115 /* reference is ap|array_mask+2*c, where referenceed location 116* contains a string with c 0's followed by 72-c 1's */ 117 118 sw(7): ref_pt -> address.offset = bit(fixed(array_mask+2*n,15),15); 119 goto l1; 120 121 /* reference is 0,c */ 122 123 sw(8): ref_pt -> address.tag = "001"b || bit(fixed(n,3),3); 124 goto done; 125 126 /* reference is lp|c,* (linkage section) */ 127 128 sw(9): ref_pt -> address.tag = "010000"b; /* * */ 129 ref_pt -> address.base = base_man$load_linkage(); 130 ref_pt -> reference.relocation = rc_lp15; 131 goto l2; 132 133 /* reference is c,ic */ 134 135 sw(10): ref_pt -> reference.ic_ref = "1"b; 136 ref_pt -> address.tag = "000100"b; /* ic */ 137 if mod(n,2) = 0 then ref_pt -> reference.even = "1"b; 138 goto sw(1); 139 140 /* reference is bp|c */ 141 142 sw(11): ref_pt -> address.base = bp; 143 goto l2; 144 145 /* reference is to block of c words in stack */ 146 147 sw(12): ref_pt -> reference.c_length = n; 148 ref_pt -> reference.temp_ref = "1"b; 149 call stack_temp$assign_temp(ref_pt); 150 c,n = ref_pt -> reference.qualifier -> temporary.location; 151 goto sw(4); 152 153 /* reference is to location c in static section */ 154 155 sw(13): ref_pt -> address.base = base_man$load_static(); 156 ref_pt -> reference.relocation = rc_is15; 157 goto l2; 158 159 /* reference is sp|c,* */ 160 161 sw(14): ref_pt -> address.tag = ref_pt -> address.tag | "010000"b; /* * */ 162 go to sw(4); 163 164 /* reference is lp|c,* (static section) */ 165 166 sw(15): ref_pt -> address.tag = ref_pt -> address.tag | "010000"b; /* * */ 167 ref_pt -> reference.relocation = rc_is15; 168 ref_pt -> address.base = base_man$load_static(); 169 go to l2; 170 171 /* reference is ap|-n, where -n is the offset of the TCT table for c */ 172 173 sw (16): 174 word_delta = divide (c, 4, 9, 0); 175 table_subscript = c - word_delta * 4; 176 n = tct_byte_offset (table_subscript) - word_delta + 32768; 177 ref_pt -> reference.address.base = ap; 178 ref_pt -> reference.address.offset = bit (n, 15); 179 ref_pt -> reference.address.ext_base = "1"b; 180 /* dont care about even bit */ 181 go to done; 182 183 end /* c_a */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1007.9 c_a.pl1 >spec>on>pl128d>c_a.pl1 52 1 07/21/80 1546.3 reference.incl.pl1 >ldd>include>reference.incl.pl1 53 2 11/30/78 1227.4 temporary.incl.pl1 >ldd>include>temporary.incl.pl1 54 3 05/03/76 1320.8 bases.incl.pl1 >ldd>include>bases.incl.pl1 55 4 10/30/80 1648.7 relocation_bits.incl.pl1 >ldd>include>relocation_bits.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 40 ref 60 address 10 based structure level 2 packed unaligned dcl 1-3 set ref 60 ap defined bit(3) dcl 3-4 ref 104 177 array_mask constant fixed bin(17,0) initial dcl 28 ref 118 base 10 based bit(3) level 3 packed unaligned dcl 1-3 set ref 85* 104* 129* 142* 155* 168* 177* base_man$load_linkage 000014 constant entry external dcl 36 ref 129 base_man$load_static 000016 constant entry external dcl 37 ref 155 168 bases 000020 constant bit(3) initial array dcl 3-1 ref 85 85 104 104 142 142 177 177 bit builtin function dcl 40 ref 66 67 93 97 103 112 118 123 178 bits 12(06) based structure level 2 packed unaligned dcl 1-3 blank_array constant fixed bin(17,0) initial dcl 28 ref 112 bp defined bit(3) dcl 3-4 ref 142 c 000100 automatic fixed bin(15,0) dcl 23 set ref 61* 92 150* 173 175 c_length 2 based fixed bin(24,0) level 2 dcl 1-3 set ref 147* code parameter fixed bin(17,0) dcl 23 ref 21 62 divide builtin function dcl 40 ref 112 173 even 12(17) based bit(1) level 3 packed unaligned dcl 1-3 set ref 87* 106* 137* ext_base 10(29) based bit(1) level 3 packed unaligned dcl 1-3 set ref 96* 105* 179* fixed builtin function dcl 40 ref 66 67 97 103 112 118 123 get_reference 000012 constant entry external dcl 28 ref 59 ic_ref 12(10) based bit(1) level 3 packed unaligned dcl 1-3 set ref 135* location 4 based fixed bin(18,0) level 2 dcl 2-3 ref 150 mask_array constant fixed bin(17,0) initial dcl 28 ref 103 mod builtin function dcl 40 ref 87 91 137 n 000111 automatic fixed bin(15,0) dcl 28 set ref 61* 66 66 67 87 89 91* 91 92 97 103 112 118 123 137 147 150* 176* 178 no_address 10(27) based bit(1) level 3 packed unaligned dcl 1-3 set ref 69* offset based bit(18) level 2 in structure "word" packed unaligned dcl 42 in procedure "c_a" set ref 66* 67* offset 10(03) based bit(15) level 3 in structure "reference" packed unaligned dcl 1-3 in procedure "c_a" set ref 97* 103* 112* 118* 178* p 000106 automatic pointer dcl 28 set ref 60* 66 67 pc parameter fixed bin(15,0) dcl 23 ref 21 61 perm_address 12(18) based bit(1) level 3 packed unaligned dcl 1-3 set ref 70* qualifier 4 based pointer level 2 packed unaligned dcl 1-3 ref 150 rc_is15 constant bit(6) initial unaligned dcl 4-6 ref 156 167 rc_lp15 constant bit(6) initial unaligned dcl 4-6 ref 130 ref_pt 000104 automatic pointer dcl 28 set ref 59* 60 69 70 71 75 80 85 87 93 96 97 103 104 105 106 112 118 123 128 129 130 135 136 137 142 147 148 149* 150 155 156 161 161 166 166 167 168 177 178 179 reference based structure level 1 dcl 1-3 relocation 12(24) based bit(12) level 2 packed unaligned dcl 1-3 set ref 130* 156* 167* sp defined bit(3) dcl 3-4 ref 85 stack_temp$assign_temp 000020 constant entry external dcl 38 ref 149 substr builtin function dcl 40 set ref 93* table_subscript 000101 automatic fixed bin(17,0) dcl 23 set ref 175* 176 tag 10(30) based bit(6) level 3 packed unaligned dcl 1-3 set ref 75* 80* 93* 123* 128* 136* 161* 161 166* 166 tct_byte_offset 000030 constant fixed bin(17,0) initial array dcl 48 ref 176 temp_ref 12(11) based bit(1) level 3 packed unaligned dcl 1-3 set ref 148* temporary based structure level 1 unaligned dcl 2-3 word based structure level 1 dcl 42 word_delta 000102 automatic fixed bin(17,0) dcl 23 set ref 173* 175 176 xr 000110 automatic fixed bin(3,0) dcl 28 set ref 92* 93 xr_man$load_any_const 000010 constant entry external dcl 28 ref 92 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ab defined bit(3) dcl 3-9 bb defined bit(3) dcl 3-9 lb defined bit(3) dcl 3-9 lp defined bit(3) dcl 3-4 rc_a internal static bit(6) initial unaligned dcl 4-6 rc_dp internal static bit(6) initial unaligned dcl 4-6 rc_e internal static bit(6) initial unaligned dcl 4-6 rc_is18 internal static bit(6) initial unaligned dcl 4-6 rc_lb internal static bit(6) initial unaligned dcl 4-6 rc_lp18 internal static bit(6) initial unaligned dcl 4-6 rc_nlb internal static bit(6) initial unaligned dcl 4-6 rc_nlp18 internal static bit(6) initial unaligned dcl 4-6 rc_ns internal static bit(6) initial unaligned dcl 4-6 rc_nt internal static bit(6) initial unaligned dcl 4-6 rc_s internal static bit(6) initial unaligned dcl 4-6 rc_sr internal static bit(6) initial unaligned dcl 4-6 rc_t internal static bit(6) initial unaligned dcl 4-6 sb defined bit(3) dcl 3-9 which_base internal static fixed bin(17,0) initial array dcl 3-14 NAMES DECLARED BY EXPLICIT CONTEXT. c_a 000044 constant entry external dcl 21 done 000110 constant label dcl 69 set ref 98 107 124 181 l1 000227 constant label dcl 104 set ref 113 119 l2 000143 constant label dcl 89 ref 131 143 157 169 sw 000000 constant label array(16) dcl 66 ref 62 76 81 138 151 162 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 572 614 476 602 Length 1044 476 22 213 73 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME c_a 86 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME c_a 000100 c c_a 000101 table_subscript c_a 000102 word_delta c_a 000104 ref_pt c_a 000106 p c_a 000110 xr c_a 000111 n c_a THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return mod_fx1 ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. base_man$load_linkage base_man$load_static get_reference stack_temp$assign_temp xr_man$load_any_const NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 21 000040 59 000051 60 000057 61 000062 62 000066 66 000070 67 000101 69 000110 70 000113 71 000115 75 000120 76 000123 80 000124 81 000127 85 000130 87 000135 89 000143 91 000146 92 000151 93 000165 96 000200 97 000203 98 000213 103 000214 104 000227 105 000234 106 000236 107 000240 112 000241 113 000255 118 000256 119 000271 123 000272 124 000303 128 000304 129 000307 130 000324 131 000326 135 000327 136 000332 137 000334 138 000341 142 000342 143 000347 147 000350 148 000352 149 000354 150 000363 151 000370 155 000371 156 000406 157 000410 161 000411 162 000414 166 000415 167 000420 168 000422 169 000437 173 000440 175 000442 176 000447 177 000453 178 000460 179 000470 181 000472 ----------------------------------------------------------- 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