COMPILATION LISTING OF SEGMENT gm_write_first_seg_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 06/04/84 1255.6 mst Mon Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright (c) 1972 by Massachusetts Institute of * 5* * Technology and Honeywell Information Systems, Inc. * 6* * * 7* * * 8* ****************************************************** */ 9 10 gm_write_first_seg_: proc (sltep, seg_bitcnt, fseg_ptr, iocb_ptr, object_segment_error, code); 11 12 13 /* 14* 15* The first segment is written out as follows: 16* 17* 1) a header control word 18* 19* 2) the slte data 20* 21* 3) padding of minus ones to make up 22 written words 22* 23* 4) a segment control word. the right half of this word contains a value of 24* 32 less than the actual word length of the first segment 25* 26* (the 24 words thus written plus the first 8 words of tape record information 27* make up the first 32 words on the tape) 28* 29* 5) the segment itself, beginning at word 33 30* 31* 32* 33* */ 34 35 /* Modified 31 July 1981, W. Olin Sibert, for gm_write_boot_program_ compatibility */ 36 37 /* argument declarations */ 38 39 dcl fseg_ptr ptr; /* pointer to segment */ 40 41 dcl seg_bitcnt fixed bin (24); /* length of segment */ 42 dcl code fixed bin (35); /* error code */ 43 44 /* program declarations */ 45 46 47 dcl 1 minus_one aligned static options (constant), /* for writing padding */ 48 2 part1 bit (6 * 36) init ((216)"1"b), 49 2 part2 bit (6 * 36) init ((216)"1"b), 50 2 part3 bit (6 * 36) init ((216)"1"b), 51 2 part4 bit (4 * 36) init ((144)"1"b); 52 53 dcl 1 control_word aligned, /* control word structure */ 54 2 ident fixed bin (17) unal, 55 2 length fixed bin (17) unal; 56 57 dcl first_ptr ptr, /* pointer to word 33 of segment */ 58 first_seg_word_length fixed bin (17); /* number of words to be written */ 59 60 dcl object_segment_error bit (1) aligned; 61 62 dcl iocb_ptr ptr; 63 64 dcl size builtin; 65 1 1 /* BEGIN INCLUDE FILE slte.incl.pl1 */ 1 2 /* Declaration for Segment Loading Table Entry structure. 1 3* Used by Initialization, MST Generation, and MST Checker subroutines */ 1 4 /* modified 5/4/76 by Noel I. Morris */ 1 5 /* last modified 12/12/83 by Keith Loepere for breakpointable */ 1 6 /* format: style3 */ 1 7 1 8 dcl sltep ptr; 1 9 1 10 dcl 1 slte_uns based (sltep) aligned, 1 11 ( 2 names_ptr bit (18), /* rel pointer to thread of names */ 1 12 2 path_ptr bit (18), /* rel pointer to pathname (if present) */ 1 13 /**** End of word 1 */ 1 14 2 access bit (4), /* SDW access bit (REWP) */ 1 15 2 cache bit (1), /* Segment to be allowed in cache */ 1 16 2 abs_seg bit (1), /* segment is an abs seg if ON */ 1 17 2 firmware_seg bit (1), /* load in low 256 */ 1 18 2 layout_seg bit (1), /* mailbox & such */ 1 19 2 breakpointable bit (1), /* includes breakpoint_page */ 1 20 2 pad1 bit (3), /* unused */ 1 21 2 wired bit (1), /* segment is wired if ON */ 1 22 2 paged bit (1), /* segment is paged if ON */ 1 23 2 per_process bit (1), /* segment is per-process if ON */ 1 24 2 pad3 bit (2), 1 25 2 acl_provided bit (1), /* ON if acl structure follows path_name on MST */ 1 26 /**** End of 1st half of word 2 */ 1 27 2 pad4 bit (3), 1 28 2 branch_required bit (1), /* path name supplied if ON */ 1 29 2 init_seg bit (1), /* segment is init_seg if ON */ 1 30 2 temp_seg bit (1), /* segment is temp_seg if ON */ 1 31 2 link_provided bit (1), /* linkage segment provided if ON */ 1 32 2 link_sect bit (1), /* segment is linkage segment if ON */ 1 33 2 link_sect_wired bit (1), /* linkage segment is wired if ON */ 1 34 2 combine_link bit (1), /* linkage is combined if ON */ 1 35 2 pre_linked bit (1), /* lot entry has been made if ON */ 1 36 2 defs bit (1), /* segment is definitions segment if ON */ 1 37 /***** End of word 2 */ 1 38 2 pad5 bit (6), 1 39 2 cur_length fixed bin (9) uns, /* current length of segment (in 1024 word blocks) */ 1 40 2 ringbrack (3) fixed bin (3) uns, /* ringbrackets */ 1 41 2 segno fixed bin (18) uns, /* text/link segment number */ 1 42 /***** End of word 3 */ 1 43 2 pad7 bit (3), 1 44 2 max_length fixed bin (9) uns, /* maximum length for segment */ 1 45 2 bit_count fixed bin (24) uns 1 46 ) unaligned; /* bitcount of segment */ 1 47 1 48 dcl 1 slte based (sltep) aligned, 1 49 ( 2 names_ptr bit (18), /* rel pointer to thread of names */ 1 50 2 path_ptr bit (18), /* rel pointer to pathname (if present) */ 1 51 2 access bit (4), /* SDW access bit (REWP) */ 1 52 2 cache bit (1), /* Segment to be allowed in cache */ 1 53 2 abs_seg bit (1), /* segment is an abs seg if ON */ 1 54 2 firmware_seg bit (1), 1 55 2 layout_seg bit (1), 1 56 2 breakpointable bit (1), 1 57 2 pad2 bit (3), 1 58 2 wired bit (1), /* segment is wired if ON */ 1 59 2 paged bit (1), /* segment is paged if ON */ 1 60 2 per_process bit (1), /* segment is per-process if ON */ 1 61 2 pad3 bit (2), 1 62 2 acl_provided bit (1), /* ON if acl structure follows path_name on MST */ 1 63 2 pad4 bit (3), 1 64 2 branch_required bit (1), /* path name supplied if ON */ 1 65 2 init_seg bit (1), /* segment is init_seg if ON */ 1 66 2 temp_seg bit (1), /* segment is temp_seg if ON */ 1 67 2 link_provided bit (1), /* linkage segment provided if ON */ 1 68 2 link_sect bit (1), /* segment is linkage segment if ON */ 1 69 2 link_sect_wired bit (1), /* linkage segment is wired if ON */ 1 70 2 combine_link bit (1), /* linkage is combined if ON */ 1 71 2 pre_linked bit (1), /* lot entry has been made if ON */ 1 72 2 defs bit (1), /* segment is definitions segment if ON */ 1 73 2 pad5 bit (6), 1 74 2 cur_length bit (9), /* current length of segment (in 1024 word blocks) */ 1 75 2 ringbrack (3) bit (3), /* ringbrackets */ 1 76 2 segno bit (18), /* text/link segment number */ 1 77 2 pad6 bit (3), 1 78 2 max_length bit (9), /* maximum length for segment */ 1 79 2 bit_count bit (24) 1 80 ) unaligned; /* bitcount of segment */ 1 81 1 82 /* END INCLUDE FILE slte.incl.pl1 */ 66 2 1 /* BEGIN INCLUDE FILE ... object_info.incl.pl1 2 2*coded February 8, 1972 by Michael J. Spier */ 2 3 /* modified May 26, 1972 by M. Weaver */ 2 4 /* modified 15 April, 1975 by M. Weaver */ 2 5 2 6 declare 1 object_info aligned based, /* structure containing object info based, returned by object_info_ */ 2 7 2 version_number fixed bin, /* version number of current structure format (=2) */ 2 8 2 textp pointer, /* pointer to beginning of text section */ 2 9 2 defp pointer, /* pointer to beginning of definition section */ 2 10 2 linkp pointer, /* pointer to beginning of linkage section */ 2 11 2 statp pointer, /* pointer to beginning of static section */ 2 12 2 symbp pointer, /* pointer to beginning of symbol section */ 2 13 2 bmapp pointer, /* pointer to beginning of break map (may be null) */ 2 14 2 tlng fixed bin, /* length in words of text section */ 2 15 2 dlng fixed bin, /* length in words of definition section */ 2 16 2 llng fixed bin, /* length in words of linkage section */ 2 17 2 ilng fixed bin, /* length in words of static section */ 2 18 2 slng fixed bin, /* length in words of symbol section */ 2 19 2 blng fixed bin, /* length in words of break map */ 2 20 2 format, /* word containing bit flags about object type */ 2 21 3 old_format bit(1) unaligned, /* on if segment isn't in new format, i.e. has old style object map */ 2 22 3 bound bit(1) unaligned, /* on if segment is bound */ 2 23 3 relocatable bit(1) unaligned, /* on if seg has relocation info in its first symbol block */ 2 24 3 procedure bit(1) unaligned, /* on if segment is an executable object program */ 2 25 3 standard bit(1) unaligned, /* on if seg is in standard format (more than just standard map) */ 2 26 3 gate bit(1) unaligned, /* on if segment is a gate */ 2 27 3 separate_static bit(1) unaligned, /* on if static not in linkage */ 2 28 3 links_in_text bit(1) unaligned, /* on if there are threaded links in text */ 2 29 3 perprocess_static bit (1) unaligned, /* on if static is not to be per run unit */ 2 30 3 pad bit(27) unaligned, 2 31 2 entry_bound fixed bin, /* entry bound if segment is a gate */ 2 32 2 textlinkp pointer, /* ptr to first link in text */ 2 33 2 34 /* LIMIT OF BRIEF STRUCTURE */ 2 35 2 36 2 compiler char(8) aligned, /* name of processor which generated segment */ 2 37 2 compile_time fixed bin(71), /* clock reading of date/time object was generated */ 2 38 2 userid char(32) aligned, /* standard Multics id of creator of object segment */ 2 39 2 cvers aligned, /* generator version name in printable char string form */ 2 40 3 offset bit(18) unaligned, /* offset of name in words relative to base of symbol section */ 2 41 3 length bit(18) unaligned, /* length of name in characters */ 2 42 2 comment aligned, /* printable comment concerning generator or generation of segment */ 2 43 3 offset bit(18) unaligned, /* offset of comment in words relative to base of symbol section */ 2 44 3 length bit(18) unaligned, /* length of comment in characters */ 2 45 2 source_map fixed bin, /* offset, relative to base of symbol section, of source map structure */ 2 46 2 47 /* LIMIT OF DISPLAY STRUCTURE */ 2 48 2 49 2 rel_text pointer, /* pointer to text section relocation info */ 2 50 2 rel_def pointer, /* pointer to definition section relocation info */ 2 51 2 rel_link pointer, /* pointer to linkage section relocation info */ 2 52 2 rel_static pointer, /* pointer to static section relocation info */ 2 53 2 rel_symbol pointer, /* pointer to symbol section relocation info */ 2 54 2 text_boundary fixed bin, /* specifies mod of text section base boundary */ 2 55 2 static_boundary fixed bin, /* specifies mod of internal static base boundary */ 2 56 /* currently not used by system */ 2 57 2 default_truncate fixed bin, /* offset rel to symbp for binder to automatically trunc. symb sect. */ 2 58 2 optional_truncate fixed bin; /* offset rel to symbp for binder to optionally trunc. symb sect. */ 2 59 2 60 declare object_info_version_2 fixed bin int static init(2); 2 61 2 62 /* END INCLUDE FILE ... object_info.incl.pl1 */ 67 68 69 dcl 1 oi aligned like object_info; 70 71 dcl iox_$put_chars entry (ptr, ptr, fixed bin (35), fixed bin(35)), 72 object_info_$brief entry (ptr, fixed bin (24), ptr, fixed bin (35)); 73 74 dcl (addr, addrel, bin, bit, divide) builtin; 75 76 /* */ 77 object_segment_error = "0"b; 78 79 oi.version_number = object_info_version_2; 80 81 call object_info_$brief (fseg_ptr, seg_bitcnt, addr (oi), code); 82 /* take text portion only */ 83 if code ^= 0 then do; 84 object_segment_error = "1"b; /* so main routine will know */ 85 return; 86 end; 87 88 first_seg_word_length = oi.tlng + oi.dlng; 89 slte.cur_length = bit (divide (first_seg_word_length+1023, 1024, 9, 0), 9); /* reset current length */ 90 slte.bit_count = bit (bin(first_seg_word_length * 36, 24), 24); /* and bitcount */ 91 first_seg_word_length = first_seg_word_length - 32; 92 control_word.ident = 0; /* create a header control word */ 93 control_word.length = 10110b; /* relative offset of end of header */ 94 95 call iox_$put_chars (iocb_ptr, addr (control_word), 4, code); 96 if code ^= 0 then return; 97 98 call iox_$put_chars (iocb_ptr, sltep, size (slte)*4, code); 99 if code ^= 0 then return; 100 101 call iox_$put_chars (iocb_ptr, addr (minus_one), (22-size (slte))*4, code); 102 if code ^= 0 then return; 103 104 control_word.ident = 1; /* set up a segment control word */ 105 control_word.length = first_seg_word_length; /* subtract header length */ 106 107 first_ptr = addrel (oi.textp, 32); /* prepare for writing from word 33 */ 108 109 call iox_$put_chars (iocb_ptr, addr (control_word), 4, code); 110 if code ^= 0 then return; 111 112 call iox_$put_chars (iocb_ptr, first_ptr, first_seg_word_length*4, code); 113 114 return; 115 116 end gm_write_first_seg_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 06/04/84 1242.3 gm_write_first_seg_.pl1 >spec>temp>bce>on>gm_write_first_seg_.pl1 66 1 06/01/84 1103.2 slte.incl.pl1 >spec>temp>bce>on>slte.incl.pl1 67 2 08/05/77 1022.5 object_info.incl.pl1 >ldd>include>object_info.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 74 ref 81 81 95 95 101 101 109 109 addrel builtin function dcl 74 ref 107 bin builtin function dcl 74 ref 90 bit builtin function dcl 74 ref 89 90 bit_count 3(12) based bit(24) level 2 packed unaligned dcl 1-48 set ref 90* code parameter fixed bin(35,0) dcl 42 set ref 10 81* 83 95* 96 98* 99 101* 102 109* 110 112* control_word 000100 automatic structure level 1 dcl 53 set ref 95 95 109 109 cur_length 2 based bit(9) level 2 packed unaligned dcl 1-48 set ref 89* divide builtin function dcl 74 ref 89 dlng 17 000106 automatic fixed bin(17,0) level 2 dcl 69 set ref 88 first_ptr 000102 automatic pointer dcl 57 set ref 107* 112* first_seg_word_length 000104 automatic fixed bin(17,0) dcl 57 set ref 88* 89 90 91* 91 105 112 fseg_ptr parameter pointer dcl 39 set ref 10 81* ident 000100 automatic fixed bin(17,0) level 2 packed unaligned dcl 53 set ref 92* 104* iocb_ptr parameter pointer dcl 62 set ref 10 95* 98* 101* 109* 112* iox_$put_chars 000010 constant entry external dcl 71 ref 95 98 101 109 112 length 0(18) 000100 automatic fixed bin(17,0) level 2 packed unaligned dcl 53 set ref 93* 105* minus_one 000000 constant structure level 1 dcl 47 set ref 101 101 object_info based structure level 1 dcl 2-6 object_info_$brief 000012 constant entry external dcl 71 ref 81 object_info_version_2 constant fixed bin(17,0) initial dcl 2-60 ref 79 object_segment_error parameter bit(1) dcl 60 set ref 10 77* 84* oi 000106 automatic structure level 1 dcl 69 set ref 81 81 seg_bitcnt parameter fixed bin(24,0) dcl 41 set ref 10 81* size builtin function dcl 64 ref 98 101 slte based structure level 1 dcl 1-48 set ref 98 101 sltep parameter pointer dcl 1-8 set ref 10 89 90 98* 98 101 textp 2 000106 automatic pointer level 2 dcl 69 set ref 107 tlng 16 000106 automatic fixed bin(17,0) level 2 dcl 69 set ref 88 version_number 000106 automatic fixed bin(17,0) level 2 dcl 69 set ref 79* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. slte_uns based structure level 1 dcl 1-10 NAME DECLARED BY EXPLICIT CONTEXT. gm_write_first_seg_ 000040 constant entry external dcl 10 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 344 360 275 354 Length 564 275 14 167 47 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME gm_write_first_seg_ 137 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gm_write_first_seg_ 000100 control_word gm_write_first_seg_ 000102 first_ptr gm_write_first_seg_ 000104 first_seg_word_length gm_write_first_seg_ 000106 oi gm_write_first_seg_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$put_chars object_info_$brief NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000032 77 000045 79 000047 81 000051 83 000067 84 000072 85 000074 88 000075 89 000100 90 000111 91 000121 92 000123 93 000125 95 000127 96 000150 98 000153 99 000172 101 000175 102 000216 104 000221 105 000223 107 000225 109 000230 110 000251 112 000254 114 000274 ----------------------------------------------------------- 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