COMPILATION LISTING OF SEGMENT cm_find_free_slot Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 01/03/85 1635.1 mst Thu Options: optimize list 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 8 /* DESCRIPTION: 9* 10* Given a control interval, find an available slot for allocation 11* according to the basic element storage method. There are four return 12* arguments, defined as follows: 13* 14* p_free_slot_idx - is the index of a slot that can be used for 15* a new datum. This is either a free slot in the datum_position_table 16* or one slot past the current end of the table. 17* p_number_of_slots - the number of slots that will remain in 18* the datum_position_table after allocation of the datum. The possible 19* values are (bci_header.number_of_datums) if a free slot is found in the 20* existing slot table or (bci_header.number_of_datums + 1) if there are no 21* free slots in the existing table. bci_header.number_of_datums is *not* 22* updated to reflect the new slot. 23* p_extra_free_slot_remains - is on if there are free slots in the 24* datum_position_table other than the one at p_free_slot_idx. 25* bci_header.flags.free_slot_is_present is not updated. 26* p_code - a standard error code returned from file_manager_$get. 27**/ 28 29 /* HISTORY: 30* 31*Written by Matthew Pierret, 10/28/82. 32*Modified: 33*02/03/83 by Matthew Pierret: Added p_number_of_slots parameter in which is 34* returned the new number of slots rather than updaing 35* bci_header.number_of_datums directly. 36*08/09/83 by Matthew Pierret: Added p_extra_free_slot_remains parameter in 37* which is the new value of bci_header.flags.free_slot_is_present 38* after allocation of the new datum. bci_header is not updated 39* for any reason by this module. 40*09/27/84 by Matthew Pierret: Changed to use ERROR_RETURN and local code 41* variable instead of p_code parameter. Changed CHECK_VERSION 42* to CHECK_CI_VERSION. Changed to use file_manager_$simple_get, 43* thus removing the ci_parts structure. 44**/ 45 46 /* format: style2,ind3 */ 47 48 cm_find_free_slot: 49 proc (p_file_oid, p_control_interval_id, p_bci_header_ptr, p_free_slot_idx, p_number_of_slots, 50 p_extra_free_slot_remains, p_code); 51 52 /* START OF DECLARATIONS */ 53 /* Parameter */ 54 55 dcl p_file_oid bit (36) aligned parameter; 56 dcl p_control_interval_id fixed bin (24) uns parameter; 57 dcl p_bci_header_ptr ptr parameter; 58 dcl p_free_slot_idx fixed bin (17) parameter; 59 dcl p_number_of_slots fixed bin (17) parameter; 60 dcl p_extra_free_slot_remains 61 bit (1) aligned; 62 dcl p_code fixed bin (35) parameter; 63 64 /* Automatic */ 65 66 dcl code fixed bin (35); 67 dcl 1 datum_slot_table (1024) like datum_slot aligned; 68 dcl extra_free_slot_found bit (1) aligned; 69 dcl free_slot_found bit (1) aligned; 70 dcl slot_idx fixed bin (17); 71 72 /* Based */ 73 /* Builtin */ 74 75 dcl (addr, max, null, size) 76 builtin; 77 78 /* Constant */ 79 80 dcl myname init ("cm_find_free_slot") char (32) varying int static options (constant); 81 dcl BYTES_PER_WORD init (4) fixed bin (17) int static options (constant); 82 83 /* Entry */ 84 85 dcl file_manager_$simple_get 86 entry (bit (36) aligned, fixed bin (27), fixed bin (21), ptr, fixed bin (21), 87 fixed bin (35)); 88 dcl sub_err_ entry () options (variable); 89 90 /* External */ 91 92 dcl dm_error_$unimplemented_ci_version 93 ext fixed bin (35); 94 95 /* END OF DECLARATIONS */ 96 97 p_code, code = 0; 98 p_number_of_slots = 0; 99 extra_free_slot_found = "0"b; 100 free_slot_found = "0"b; 101 bci_header_ptr = p_bci_header_ptr; 102 call CHECK_CI_VERSION (bci_header.layout_type); 103 104 if ^bci_header.flags.free_slot_is_present 105 then 106 NO_FREE_SLOT: 107 p_free_slot_idx = bci_header.number_of_datums + 1; 108 else 109 SEARCH_FOR_FREE_SLOT: 110 do; 111 call file_manager_$simple_get (p_file_oid, (p_control_interval_id), size (bci_header) * BYTES_PER_WORD, 112 addr (datum_slot_table), bci_header.number_of_datums * BYTES_PER_WORD, code); 113 if code ^= 0 114 then call ERROR_RETURN (code); 115 116 /*** Search the slot table for two free slots, the first to return to the 117*caller, the second to determine if any free slots exist other than the one 118*being returned to the caller. */ 119 120 do slot_idx = 1 to bci_header.number_of_datums while (^extra_free_slot_found); 121 122 if datum_slot_table (slot_idx).offset_in_bytes = FREE_SLOT 123 then if free_slot_found 124 then extra_free_slot_found = "1"b; 125 else 126 do; 127 free_slot_found = "1"b; 128 p_free_slot_idx = slot_idx; 129 end; 130 131 end; 132 133 if ^free_slot_found 134 then p_free_slot_idx = bci_header.number_of_datums + 1; 135 136 end SEARCH_FOR_FREE_SLOT; 137 138 139 p_extra_free_slot_remains = extra_free_slot_found; 140 p_number_of_slots = max (bci_header.number_of_datums, p_free_slot_idx); 141 MAIN_RETURN: 142 return; 143 144 145 ERROR_RETURN: 146 proc (er_p_code); 147 148 dcl er_p_code fixed bin (35); 149 150 p_code = er_p_code; 151 go to MAIN_RETURN; 152 153 end ERROR_RETURN; 154 155 CHECK_CI_VERSION: 156 proc (ccv_p_given_version); 157 158 dcl ccv_p_given_version char (4) aligned; 159 160 if ccv_p_given_version ^= BASIC_CI_LAYOUT_1 161 then call sub_err_ (dm_error_$unimplemented_ci_version, myname, ACTION_CANT_RESTART, null, 0, 162 "^/Expected version ^a control interval; received ^a.", BASIC_CI_LAYOUT_1, ccv_p_given_version); 163 else return; 164 165 end CHECK_CI_VERSION; 166 1 1 /* BEGIN INCLUDE FILE dm_cm_basic_ci.incl.pl1 */ 1 2 1 3 /* DESCRIPTION: 1 4* 1 5* The collection_manager_ manages the structure of the addressable 1 6* portion of a control interval. The addressable portion is that portion of 1 7* a control interval which the file_manager_ will allow the 1 8* collection_manager_ to address. In this description control interval will 1 9* be used to mean the addressable portion of a control interval. 1 10* 1 11* A control interval is divided into four parts: the header, the datum 1 12* position table (also known as the slot table or slots), un-used space and 1 13* used space. The beginning of the header is at offset 0, and the end of the 1 14* used space is at the end of the control interval (curently offset 4072). 1 15* Pictoriarly, a control interval is structured as follows: 1 16* 1 17* ---------------------------------------------------------------------- 1 18* | || | | | | | || || | / / | |/| | | 1 19* | Header || | slot | || un-used space || |/ / /| |/| | | 1 20* | || | table | || || | / / | |/| | | 1 21* | || | | | | | || || |/ / /| |/| | | 1 22* ---------------------------------------------------------------------- 1 23* ^ ^ ^ ^ ^ ^ ^ 1 24* | | | | | | | 1 25* | |...........|.......|...| 1 26* start of used space| | | | 1 27* | | each| 1 28* scattered free space| is a used 1 29* datum 1 30* 1 31* The basic_control_interval structure describes the header 1 32* (basic_control_interval.header, bci_header) and the slots 1 33* (basic_control_interval.datum_position_table, datum_slot for one only). 1 34* Each datum_slot contains the offset (in bytes) and the length (in bits) of 1 35* a datum in the used space. If the offset is equal to FREE_SLOT (declared 1 36* in dm_cm_basic_ci_const.incl.pl1), the slot is un-used. The slot also 1 37* contains flags describing the type of datum (see dm_cm_datum.incl.pl1). 1 38**/ 1 39 1 40 /* HISTORY: 1 41*Written by Matthew Pierret, 02/07/82. 1 42*Modified: 1 43*03/25/82 by Matthew Pierret: Fixed alignment differences basic_control_interval 1 44* and its sub-structures. 1 45*06/14/82 by Matthew Pierret: Removed common header and buffers. Changed 1 46* basic_ci_header to bci_header. Added previous_control_interval. 1 47*07/12/82 by Matthew Pierret: Changed collection_id to be bit (36) aligned. 1 48*10/29/82 by Matthew Pierret: Added flags to datum slots. 1 49*11/10/82 by Matthew Pierret: Removed continued_datum_is_present flag, as it 1 50* is not used. 1 51*03/28/84 by Matthew Pierret: Added the constants BCI_HEADER_LENGTH_IN_BYTES 1 52* and DATUM_POSITION_TABLE_OFFSET_IN_BYTES. 1 53**/ 1 54 1 55 /* format: style2 */ 1 56 dcl 1 basic_control_interval 1 57 aligned based (basic_control_interval_ptr), 1 58 2 header like bci_header, 1 59 2 datum_position_table 1 60 (0 refer (basic_control_interval.number_of_datums)) like datum_slot; 1 61 1 62 1 63 dcl 1 bci_header aligned based (bci_header_ptr), 1 64 2 layout_type char (4) aligned, 1 65 2 collection_id bit (36) aligned, 1 66 2 next_control_interval 1 67 fixed bin (24) uns unal, 1 68 2 previous_control_interval 1 69 fixed bin (24) uns unal, 1 70 2 flags unal, 1 71 3 continuation_datum_is_present 1 72 bit (1) unal, 1 73 3 free_slot_is_present 1 74 bit (1) unal, 1 75 3 must_be_zero bit (4) unal, /* reserved */ 1 76 2 scattered_free_space 1 77 fixed bin (17) unal, 1 78 2 start_of_used_space 1 79 fixed bin (17) unal, 1 80 2 number_of_datums fixed bin (17) unal; 1 81 1 82 dcl 1 datum_slot aligned based (datum_slot_ptr), 1 83 2 flags unal, 1 84 3 special_format_datum 1 85 bit (1) unal, /* reserved */ 1 86 3 is_continued bit (1) unal, 1 87 3 is_continuation bit (1) unal, 1 88 3 mbz bit (1) unal, /* reserved */ 1 89 2 offset_in_bytes fixed bin (15) uns unal, 1 90 2 length_in_bits fixed bin (17) uns unal; 1 91 1 92 dcl basic_control_interval_ptr 1 93 ptr; 1 94 dcl bci_header_ptr ptr; 1 95 dcl datum_slot_ptr ptr; 1 96 1 97 dcl BASIC_CI_LAYOUT_1 char (4) aligned init ("bci1") internal static options (constant); 1 98 1 99 /* END INCLUDE FILE dm_cm_basic_ci.incl.pl1 */ 167 168 2 1 /* BEGIN INCLUDE FILE dm_cm_basic_ci_const.incl.pl1 */ 2 2 2 3 /* DESCRIPTION: 2 4* 2 5* Contains constants useful in describing parts of a basic control interval. 2 6**/ 2 7 2 8 /* HISTORY: 2 9*Written by Matthew Pierret, 09/20/84. 2 10*Modified: 2 11**/ 2 12 2 13 dcl FREE_SLOT init (0) fixed bin (15) uns internal static options (constant); 2 14 dcl BCI_HEADER_LENGTH_IN_BYTES 2 15 init (20) fixed bin internal static options (constant); 2 16 dcl DATUM_POSITION_TABLE_OFFSET_IN_BYTES 2 17 init (20) fixed bin internal static options (constant); 2 18 2 19 2 20 /* END INCLUDE FILE dm_cm_basic_ci_const.incl.pl1 */ 169 170 3 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 3 2 /* format: style3 */ 3 3 3 4 /* These constants are to be used for the flags argument of sub_err_ */ 3 5 /* They are just "string (condition_info_header.action_flags)" */ 3 6 3 7 declare ( 3 8 ACTION_CAN_RESTART init (""b), 3 9 ACTION_CANT_RESTART init ("1"b), 3 10 ACTION_DEFAULT_RESTART 3 11 init ("01"b), 3 12 ACTION_QUIET_RESTART 3 13 init ("001"b), 3 14 ACTION_SUPPORT_SIGNAL 3 15 init ("0001"b) 3 16 ) bit (36) aligned internal static options (constant); 3 17 3 18 /* End include file */ 171 172 173 end cm_find_free_slot; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/03/85 1148.4 cm_find_free_slot.pl1 >spec>temp>famis1>cm_find_free_slot.pl1 167 1 01/03/85 1003.0 dm_cm_basic_ci.incl.pl1 >spec>temp>famis1>dm_cm_basic_ci.incl.pl1 169 2 01/03/85 1003.0 dm_cm_basic_ci_const.incl.pl1 >spec>temp>famis1>dm_cm_basic_ci_const.incl.pl1 171 3 04/16/82 0958.1 sub_err_flags.incl.pl1 >ldd>include>sub_err_flags.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. ACTION_CANT_RESTART 000016 constant bit(36) initial dcl 3-7 set ref 160* BASIC_CI_LAYOUT_1 000000 constant char(4) initial dcl 1-97 set ref 160 160* BYTES_PER_WORD constant fixed bin(17,0) initial dcl 81 ref 111 111 FREE_SLOT constant fixed bin(15,0) initial unsigned dcl 2-13 ref 122 addr builtin function dcl 75 ref 111 111 bci_header based structure level 1 dcl 1-63 set ref 111 bci_header_ptr 002104 automatic pointer dcl 1-94 set ref 101* 102 104 104 111 111 120 133 140 ccv_p_given_version parameter char(4) dcl 158 set ref 155 160 160* code 000100 automatic fixed bin(35,0) dcl 66 set ref 97* 111* 113 113* datum_slot based structure level 1 dcl 1-82 datum_slot_table 000101 automatic structure array level 1 dcl 67 set ref 111 111 dm_error_$unimplemented_ci_version 000014 external static fixed bin(35,0) dcl 92 set ref 160* er_p_code parameter fixed bin(35,0) dcl 148 ref 145 150 extra_free_slot_found 002101 automatic bit(1) dcl 68 set ref 99* 120 122* 139 file_manager_$simple_get 000010 constant entry external dcl 85 ref 111 flags 3(12) based structure level 2 packed unaligned dcl 1-63 free_slot_found 002102 automatic bit(1) dcl 69 set ref 100* 122 127* 133 free_slot_is_present 3(13) based bit(1) level 3 packed unaligned dcl 1-63 ref 104 layout_type based char(4) level 2 dcl 1-63 set ref 102* max builtin function dcl 75 ref 140 myname 000001 constant varying char(32) initial dcl 80 set ref 160* null builtin function dcl 75 ref 160 160 number_of_datums 4(18) based fixed bin(17,0) level 2 packed unaligned dcl 1-63 ref 104 111 120 133 140 offset_in_bytes 0(04) 000101 automatic fixed bin(15,0) array level 2 packed unsigned unaligned dcl 67 set ref 122 p_bci_header_ptr parameter pointer dcl 57 ref 48 101 p_code parameter fixed bin(35,0) dcl 62 set ref 48 97* 150* p_control_interval_id parameter fixed bin(24,0) unsigned dcl 56 ref 48 111 p_extra_free_slot_remains parameter bit(1) dcl 60 set ref 48 139* p_file_oid parameter bit(36) dcl 55 set ref 48 111* p_free_slot_idx parameter fixed bin(17,0) dcl 58 set ref 48 104* 128* 133* 140 p_number_of_slots parameter fixed bin(17,0) dcl 59 set ref 48 98* 140* size builtin function dcl 75 ref 111 slot_idx 002103 automatic fixed bin(17,0) dcl 70 set ref 120* 122 128* sub_err_ 000012 constant entry external dcl 88 ref 160 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 3-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 3-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 3-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 3-7 BCI_HEADER_LENGTH_IN_BYTES internal static fixed bin(17,0) initial dcl 2-14 DATUM_POSITION_TABLE_OFFSET_IN_BYTES internal static fixed bin(17,0) initial dcl 2-16 basic_control_interval based structure level 1 dcl 1-56 basic_control_interval_ptr automatic pointer dcl 1-92 datum_slot_ptr automatic pointer dcl 1-95 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_CI_VERSION 000244 constant entry internal dcl 155 ref 102 ERROR_RETURN 000236 constant entry internal dcl 145 ref 113 MAIN_RETURN 000235 constant label dcl 141 ref 151 NO_FREE_SLOT 000103 constant label dcl 104 SEARCH_FOR_FREE_SLOT 000112 constant label dcl 108 cm_find_free_slot 000053 constant entry external dcl 48 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 420 436 334 430 Length 664 334 16 212 63 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cm_find_free_slot 1202 external procedure is an external procedure. ERROR_RETURN internal procedure shares stack frame of external procedure cm_find_free_slot. CHECK_CI_VERSION internal procedure shares stack frame of external procedure cm_find_free_slot. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cm_find_free_slot 000100 code cm_find_free_slot 000101 datum_slot_table cm_find_free_slot 002101 extra_free_slot_found cm_find_free_slot 002102 free_slot_found cm_find_free_slot 002103 slot_idx cm_find_free_slot 002104 bci_header_ptr cm_find_free_slot THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. file_manager_$simple_get sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$unimplemented_ci_version CONSTANTS 000330 aa 000002000000 000331 aa 000000000000 000332 aa 600000000041 000333 aa 000100000000 000000 aa 142 143 151 061 bci1 000001 aa 000000000021 000002 aa 143 155 137 146 cm_f 000003 aa 151 156 144 137 ind_ 000004 aa 146 162 145 145 free 000005 aa 137 163 154 157 _slo 000006 aa 164 040 040 040 t 000007 aa 040 040 040 040 000010 aa 040 040 040 040 000011 aa 040 040 040 040 000012 aa 524000000064 000013 aa 404000000005 000014 aa 530000000040 000015 aa 524000000004 000016 aa 400000000000 000017 aa 404000000043 000020 aa 514000000001 000021 aa 404000000021 000022 aa 464000000000 000023 aa 604000000030 000024 aa 514000000044 000026 aa 077777000043 000027 aa 000001000000 000030 aa 136 057 105 170 ^/Ex 000031 aa 160 145 143 164 pect 000032 aa 145 144 040 166 ed v 000033 aa 145 162 163 151 ersi 000034 aa 157 156 040 136 on ^ 000035 aa 141 040 143 157 a co 000036 aa 156 164 162 157 ntro 000037 aa 154 040 151 156 l in 000040 aa 164 145 162 166 terv 000041 aa 141 154 073 040 al; 000042 aa 162 145 143 145 rece 000043 aa 151 166 145 144 ived 000044 aa 040 136 141 056 ^a. BEGIN PROCEDURE cm_find_free_slot ENTRY TO cm_find_free_slot STATEMENT 1 ON LINE 48 cm_find_free_slot: proc (p_file_oid, p_control_interval_id, p_bci_header_ptr, p_free_slot_idx, p_number_of_slots, p_extra_free_slot_remains, p_code); 000045 at 000007000024 000046 tt 000023000022 000047 tt 000021000021 000050 tt 000020000017 000051 ta 000045000000 000052 da 000057300000 000053 aa 002300 6270 00 eax7 1216 000054 aa 7 00034 3521 20 epp2 pr7|28,* 000055 aa 2 01045 2721 00 tsp2 pr2|549 ext_entry 000056 aa 000016000000 000057 aa 000000000000 STATEMENT 1 ON LINE 97 p_code, code = 0; 000060 aa 6 00032 3735 20 epp7 pr6|26,* 000061 aa 7 00016 4501 20 stz pr7|14,* p_code 000062 aa 6 00100 4501 00 stz pr6|64 code STATEMENT 1 ON LINE 98 p_number_of_slots = 0; 000063 aa 7 00012 4501 20 stz pr7|10,* p_number_of_slots STATEMENT 1 ON LINE 99 extra_free_slot_found = "0"b; 000064 aa 6 02101 4501 00 stz pr6|1089 extra_free_slot_found STATEMENT 1 ON LINE 100 free_slot_found = "0"b; 000065 aa 6 02102 4501 00 stz pr6|1090 free_slot_found STATEMENT 1 ON LINE 101 bci_header_ptr = p_bci_header_ptr; 000066 aa 7 00006 3715 20 epp5 pr7|6,* p_bci_header_ptr 000067 aa 5 00000 3715 20 epp5 pr5|0,* p_bci_header_ptr 000070 aa 6 02104 6515 00 spri5 pr6|1092 bci_header_ptr STATEMENT 1 ON LINE 102 call CHECK_CI_VERSION (bci_header.layout_type); 000071 aa 5 00000 3521 00 epp2 pr5|0 bci_header.layout_type 000072 aa 6 02146 2521 00 spri2 pr6|1126 000073 aa 6 02144 3521 00 epp2 pr6|1124 000074 aa 004000 4310 07 fld 2048,dl 000075 aa 2 00000 7571 00 staq pr2|0 000076 aa 000146 6700 04 tsp4 102,ic 000244 STATEMENT 1 ON LINE 104 if ^bci_header.flags.free_slot_is_present then NO_FREE_SLOT: p_free_slot_idx = bci_header.number_of_datums + 1; 000077 aa 6 02104 3735 20 epp7 pr6|1092,* bci_header_ptr 000100 aa 7 00003 2351 00 lda pr7|3 bci_header.free_slot_is_present 000101 aa 000020 3150 03 cana 16,du 000102 aa 000010 6010 04 tnz 8,ic 000112 000103 aa 7 00004 2351 00 lda pr7|4 bci_header.number_of_datums 000104 aa 000022 7350 00 als 18 000105 aa 000066 7330 00 lrs 54 000106 aa 000001 0760 07 adq 1,dl 000107 aa 6 00032 3715 20 epp5 pr6|26,* 000110 aa 5 00010 7561 20 stq pr5|8,* p_free_slot_idx 000111 aa 000111 7100 04 tra 73,ic 000222 STATEMENT 1 ON LINE 108 else SEARCH_FOR_FREE_SLOT: do; STATEMENT 1 ON LINE 111 call file_manager_$simple_get (p_file_oid, (p_control_interval_id), size (bci_header) * BYTES_PER_WORD, addr (datum_slot_table), bci_header.number_of_datums * BYTES_PER_WORD, code); 000112 aa 6 00032 3715 20 epp5 pr6|26,* 000113 aa 5 00004 2361 20 ldq pr5|4,* p_control_interval_id 000114 aa 6 02152 7561 00 stq pr6|1130 000115 aa 000005 2360 07 ldq 5,dl 000116 aa 000004 4020 07 mpy 4,dl 000117 aa 6 02153 7561 00 stq pr6|1131 000120 aa 6 00101 3535 00 epp3 pr6|65 datum_slot_table 000121 aa 6 02154 2535 00 spri3 pr6|1132 000122 aa 7 00004 2351 00 lda pr7|4 bci_header.number_of_datums 000123 aa 000022 7350 00 als 18 000124 aa 000066 7330 00 lrs 54 000125 aa 000002 7360 00 qls 2 000126 aa 6 02156 7561 00 stq pr6|1134 000127 aa 5 00002 3521 20 epp2 pr5|2,* p_file_oid 000130 aa 6 02162 2521 00 spri2 pr6|1138 000131 aa 6 02152 3521 00 epp2 pr6|1130 000132 aa 6 02164 2521 00 spri2 pr6|1140 000133 aa 6 02153 3521 00 epp2 pr6|1131 000134 aa 6 02166 2521 00 spri2 pr6|1142 000135 aa 6 02154 3521 00 epp2 pr6|1132 000136 aa 6 02170 2521 00 spri2 pr6|1144 000137 aa 6 02156 3521 00 epp2 pr6|1134 000140 aa 6 02172 2521 00 spri2 pr6|1146 000141 aa 6 00100 3521 00 epp2 pr6|64 code 000142 aa 6 02174 2521 00 spri2 pr6|1148 000143 aa 6 02160 6211 00 eax1 pr6|1136 000144 aa 030000 4310 07 fld 12288,dl 000145 aa 6 00044 3701 20 epp4 pr6|36,* 000146 la 4 00010 3521 20 epp2 pr4|8,* file_manager_$simple_get 000147 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 113 if code ^= 0 then call ERROR_RETURN (code); 000150 aa 6 00100 2361 00 ldq pr6|64 code 000151 aa 000003 6000 04 tze 3,ic 000154 000152 aa 000156 3520 04 epp2 110,ic 000330 = 000002000000 000153 aa 000063 6700 04 tsp4 51,ic 000236 STATEMENT 1 ON LINE 120 do slot_idx = 1 to bci_header.number_of_datums while (^extra_free_slot_found); 000154 aa 6 02104 3735 20 epp7 pr6|1092,* bci_header_ptr 000155 aa 7 00004 2351 00 lda pr7|4 bci_header.number_of_datums 000156 aa 000022 7350 00 als 18 000157 aa 000066 7330 00 lrs 54 000160 aa 6 02106 7561 00 stq pr6|1094 000161 aa 000001 2360 07 ldq 1,dl 000162 aa 6 02103 7561 00 stq pr6|1091 slot_idx 000163 aa 000000 0110 03 nop 0,du 000164 aa 6 02103 2361 00 ldq pr6|1091 slot_idx 000165 aa 6 02106 1161 00 cmpq pr6|1094 000166 aa 000023 6054 04 tpnz 19,ic 000211 000167 aa 6 02101 2351 00 lda pr6|1089 extra_free_slot_found 000170 aa 000021 6010 04 tnz 17,ic 000211 STATEMENT 1 ON LINE 122 if datum_slot_table (slot_idx).offset_in_bytes = FREE_SLOT then if free_slot_found then extra_free_slot_found = "1"b; 000171 aa 6 00100 2351 06 lda pr6|64,ql datum_slot_table.offset_in_bytes 000172 aa 000004 7350 00 als 4 000173 aa 000071 7730 00 lrl 57 000174 aa 000013 6010 04 tnz 11,ic 000207 000175 aa 6 02102 2351 00 lda pr6|1090 free_slot_found 000176 aa 000004 6000 04 tze 4,ic 000202 000177 aa 400000 2350 03 lda 131072,du 000200 aa 6 02101 7551 00 sta pr6|1089 extra_free_slot_found 000201 aa 000006 7100 04 tra 6,ic 000207 STATEMENT 1 ON LINE 125 else do; STATEMENT 1 ON LINE 127 free_slot_found = "1"b; 000202 aa 400000 2350 03 lda 131072,du 000203 aa 6 02102 7551 00 sta pr6|1090 free_slot_found STATEMENT 1 ON LINE 128 p_free_slot_idx = slot_idx; 000204 aa 6 02103 2361 00 ldq pr6|1091 slot_idx 000205 aa 6 00032 3735 20 epp7 pr6|26,* 000206 aa 7 00010 7561 20 stq pr7|8,* p_free_slot_idx STATEMENT 1 ON LINE 129 end; STATEMENT 1 ON LINE 131 end; 000207 aa 6 02103 0541 00 aos pr6|1091 slot_idx 000210 aa 777754 7100 04 tra -20,ic 000164 STATEMENT 1 ON LINE 133 if ^free_slot_found then p_free_slot_idx = bci_header.number_of_datums + 1; 000211 aa 6 02102 2351 00 lda pr6|1090 free_slot_found 000212 aa 000010 6010 04 tnz 8,ic 000222 000213 aa 6 02104 3735 20 epp7 pr6|1092,* bci_header_ptr 000214 aa 7 00004 2351 00 lda pr7|4 bci_header.number_of_datums 000215 aa 000022 7350 00 als 18 000216 aa 000066 7330 00 lrs 54 000217 aa 000001 0760 07 adq 1,dl 000220 aa 6 00032 3715 20 epp5 pr6|26,* 000221 aa 5 00010 7561 20 stq pr5|8,* p_free_slot_idx STATEMENT 1 ON LINE 136 end SEARCH_FOR_FREE_SLOT; STATEMENT 1 ON LINE 139 p_extra_free_slot_remains = extra_free_slot_found; 000222 aa 6 02101 2351 00 lda pr6|1089 extra_free_slot_found 000223 aa 6 00032 3735 20 epp7 pr6|26,* 000224 aa 7 00014 7551 20 sta pr7|12,* p_extra_free_slot_remains STATEMENT 1 ON LINE 140 p_number_of_slots = max (bci_header.number_of_datums, p_free_slot_idx); 000225 aa 6 02104 3715 20 epp5 pr6|1092,* bci_header_ptr 000226 aa 5 00004 2351 00 lda pr5|4 bci_header.number_of_datums 000227 aa 000022 7350 00 als 18 000230 aa 000066 7330 00 lrs 54 000231 aa 7 00010 1161 20 cmpq pr7|8,* p_free_slot_idx 000232 aa 000002 6050 04 tpl 2,ic 000234 000233 aa 7 00010 2361 20 ldq pr7|8,* p_free_slot_idx 000234 aa 7 00012 7561 20 stq pr7|10,* p_number_of_slots STATEMENT 1 ON LINE 141 MAIN_RETURN: return; 000235 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 173 end cm_find_free_slot; BEGIN PROCEDURE ERROR_RETURN ENTRY TO ERROR_RETURN STATEMENT 1 ON LINE 145 ERROR_RETURN: proc (er_p_code); 000236 aa 6 02130 6501 00 spri4 pr6|1112 000237 aa 6 02132 2521 00 spri2 pr6|1114 STATEMENT 1 ON LINE 150 p_code = er_p_code; 000240 aa 2 00002 2361 20 ldq pr2|2,* er_p_code 000241 aa 6 00032 3735 20 epp7 pr6|26,* 000242 aa 7 00016 7561 20 stq pr7|14,* p_code STATEMENT 1 ON LINE 151 go to MAIN_RETURN; 000243 aa 777772 7100 04 tra -6,ic 000235 STATEMENT 1 ON LINE 153 end ERROR_RETURN; END PROCEDURE ERROR_RETURN BEGIN PROCEDURE CHECK_CI_VERSION ENTRY TO CHECK_CI_VERSION STATEMENT 1 ON LINE 155 CHECK_CI_VERSION: proc (ccv_p_given_version); 000244 aa 6 02136 6501 00 spri4 pr6|1118 000245 aa 6 02140 2521 00 spri2 pr6|1120 STATEMENT 1 ON LINE 160 if ccv_p_given_version ^= BASIC_CI_LAYOUT_1 then call sub_err_ (dm_error_$unimplemented_ci_version, myname, ACTION_CANT_RESTART, null, 0, "^/Expected version ^a control interval; received ^a.", BASIC_CI_LAYOUT_1, ccv_p_given_version); 000246 aa 2 00002 2351 20 lda pr2|2,* ccv_p_given_version 000247 aa 777531 1150 04 cmpa -167,ic 000000 = 142143151061 000250 aa 000055 6000 04 tze 45,ic 000325 000251 aa 777555 3734 24 epp7 -147,ic* 000252 aa 6 02176 6535 00 spri7 pr6|1150 000253 aa 6 02200 4501 00 stz pr6|1152 000254 aa 000 100 100 404 mlr (ic),(pr),fill(000) 000255 aa 777554 00 0064 desc9a -148,52 000030 = 136057105170 000256 aa 6 02202 00 0064 desc9a pr6|1154,52 000257 aa 6 00044 3701 20 epp4 pr6|36,* 000260 la 4 00014 3521 20 epp2 pr4|12,* dm_error_$unimplemented_ci_version 000261 aa 6 02222 2521 00 spri2 pr6|1170 000262 aa 777520 3520 04 epp2 -176,ic 000002 = 143155137146 000263 aa 6 02224 2521 00 spri2 pr6|1172 000264 aa 777532 3520 04 epp2 -166,ic 000016 = 400000000000 000265 aa 6 02226 2521 00 spri2 pr6|1174 000266 aa 6 02176 3521 00 epp2 pr6|1150 000267 aa 6 02230 2521 00 spri2 pr6|1176 000270 aa 6 02200 3521 00 epp2 pr6|1152 000271 aa 6 02232 2521 00 spri2 pr6|1178 000272 aa 6 02202 3521 00 epp2 pr6|1154 000273 aa 6 02234 2521 00 spri2 pr6|1180 000274 aa 777504 3520 04 epp2 -188,ic 000000 = 142143151061 000275 aa 6 02236 2521 00 spri2 pr6|1182 000276 aa 6 02140 3715 20 epp5 pr6|1120,* 000277 aa 5 00002 3521 20 epp2 pr5|2,* ccv_p_given_version 000300 aa 6 02240 2521 00 spri2 pr6|1184 000301 aa 777516 3520 04 epp2 -178,ic 000017 = 404000000043 000302 aa 6 02242 2521 00 spri2 pr6|1186 000303 aa 777511 3520 04 epp2 -183,ic 000014 = 530000000040 000304 aa 6 02244 2521 00 spri2 pr6|1188 000305 aa 777517 3520 04 epp2 -177,ic 000024 = 514000000044 000306 aa 6 02246 2521 00 spri2 pr6|1190 000307 aa 777513 3520 04 epp2 -181,ic 000022 = 464000000000 000310 aa 6 02250 2521 00 spri2 pr6|1192 000311 aa 777502 3520 04 epp2 -190,ic 000013 = 404000000005 000312 aa 6 02252 2521 00 spri2 pr6|1194 000313 aa 777477 3520 04 epp2 -193,ic 000012 = 524000000064 000314 aa 6 02254 2521 00 spri2 pr6|1196 000315 aa 777500 3520 04 epp2 -192,ic 000015 = 524000000004 000316 aa 6 02256 2521 00 spri2 pr6|1198 000317 aa 6 02260 2521 00 spri2 pr6|1200 000320 aa 6 02220 6211 00 eax1 pr6|1168 000321 aa 040000 4310 07 fld 16384,dl 000322 la 4 00012 3521 20 epp2 pr4|10,* sub_err_ 000323 aa 0 00622 7001 00 tsx0 pr0|402 call_ext_out_desc 000324 aa 000002 7100 04 tra 2,ic 000326 STATEMENT 1 ON LINE 163 else return; 000325 aa 6 02136 6101 00 rtcd pr6|1118 STATEMENT 1 ON LINE 165 end CHECK_CI_VERSION; 000326 aa 6 02136 6101 00 rtcd pr6|1118 END PROCEDURE CHECK_CI_VERSION END PROCEDURE cm_find_free_slot ----------------------------------------------------------- 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