COMPILATION LISTING OF SEGMENT cm_get_ci_ptr 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.9 mst Thu Options: optimize list 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 8 /* DESCRIPTION: 9* 10* This routine implements the 11* collection_manager_$get_control_interval_ptr entry. It gets a pointer 12* to the addressable portion of a control interval. The pointer is actually 13* to the control interval in the file, not to a copy. The following errors 14* can occur as a result of consistency checks, but do not prevent the return 15* of p_the control_interval_ptr: 16* 17* dm_error_$ci_not_allocated - the entire control interval header is "0"b 18* dm_error_$ci_not_in_collection - the control interval does not belong to 19* the specified collection. 20* error_table_$unimplemented_version - the layout_type is not one supported 21* by the collection_manager_. 22* 23**/ 24 25 /* HISTORY: 26* 27*Written by Matthew Pierret, 03/16/84. 28*Modified: 29*08/23/84 by Matthew Pierret: Changed to verify control interval. Added 30* ERROR_RETURN procedure. 31**/ 32 33 /* format: style2,ind3 */ 34 35 cm_get_ci_ptr: 36 proc (p_file_opening_id, p_collection_id, p_control_interval_id, p_control_interval_ptr, p_code); 37 38 /* START OF DECLARATIONS */ 39 /* Parameter */ 40 41 dcl p_file_opening_id bit (36) aligned; /*A file opening identifier. */ 42 dcl p_collection_id bit (36) aligned; /*A collection identifier.*/ 43 dcl p_control_interval_id fixed bin (24) uns; /*Number of desired control interval.*/ 44 dcl p_control_interval_ptr ptr; /*Pointer to addressable portion of CI.*/ 45 dcl p_code fixed bin (35); /*Standard error code.*/ 46 47 /* Automatic */ 48 49 dcl code fixed bin (35); 50 51 /* Based */ 52 /* Builtin */ 53 54 dcl (null, unspec) builtin; 55 56 /* Constant */ 57 /* Entry */ 58 59 dcl file_manager_$get_ci_ptr 60 entry (bit (36) aligned, fixed bin (27), ptr, fixed bin (35)); 61 62 /* External */ 63 64 dcl dm_error_$ci_not_allocated 65 fixed bin (35) ext; 66 dcl dm_error_$ci_not_in_collection 67 fixed bin (35) ext; 68 dcl error_table_$unimplemented_version 69 fixed bin (35) ext; 70 71 72 /* END OF DECLARATIONS */ 73 74 code = 0; 75 p_control_interval_ptr = null; 76 77 call file_manager_$get_ci_ptr (p_file_opening_id, (p_control_interval_id), p_control_interval_ptr, code); 78 if code ^= 0 79 then call ERROR_RETURN (code); 80 81 if p_control_interval_ptr -> bci_header.layout_type ^= BASIC_CI_LAYOUT_1 82 then if unspec (p_control_interval_ptr -> bci_header) = ""b 83 then call ERROR_RETURN (dm_error_$ci_not_allocated); 84 else call ERROR_RETURN (error_table_$unimplemented_version); 85 else if p_control_interval_ptr -> bci_header.collection_id ^= p_collection_id 86 then call ERROR_RETURN (dm_error_$ci_not_in_collection); 87 else p_code = 0; 88 89 MAIN_RETURN: 90 return; 91 92 ERROR_RETURN: 93 proc (er_p_code); 94 95 dcl er_p_code fixed bin (35); 96 97 p_code = er_p_code; 98 go to MAIN_RETURN; 99 100 end ERROR_RETURN; 101 102 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 */ 103 104 105 end cm_get_ci_ptr; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/03/85 1148.5 cm_get_ci_ptr.pl1 >spec>temp>famis1>cm_get_ci_ptr.pl1 103 1 01/03/85 1003.0 dm_cm_basic_ci.incl.pl1 >spec>temp>famis1>dm_cm_basic_ci.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. BASIC_CI_LAYOUT_1 000000 constant char(4) initial dcl 1-97 ref 81 bci_header based structure level 1 dcl 1-63 ref 81 code 000100 automatic fixed bin(35,0) dcl 49 set ref 74* 77* 78 78* collection_id 1 based bit(36) level 2 dcl 1-63 ref 85 datum_slot based structure level 1 dcl 1-82 dm_error_$ci_not_allocated 000012 external static fixed bin(35,0) dcl 64 set ref 81* dm_error_$ci_not_in_collection 000014 external static fixed bin(35,0) dcl 66 set ref 85* er_p_code parameter fixed bin(35,0) dcl 95 ref 92 97 error_table_$unimplemented_version 000016 external static fixed bin(35,0) dcl 68 set ref 84* file_manager_$get_ci_ptr 000010 constant entry external dcl 59 ref 77 layout_type based char(4) level 2 dcl 1-63 ref 81 null builtin function dcl 54 ref 75 p_code parameter fixed bin(35,0) dcl 45 set ref 35 87* 97* p_collection_id parameter bit(36) dcl 42 ref 35 85 p_control_interval_id parameter fixed bin(24,0) unsigned dcl 43 ref 35 77 p_control_interval_ptr parameter pointer dcl 44 set ref 35 75* 77* 81 81 85 p_file_opening_id parameter bit(36) dcl 41 set ref 35 77* unspec builtin function dcl 54 ref 81 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. basic_control_interval based structure level 1 dcl 1-56 basic_control_interval_ptr automatic pointer dcl 1-92 bci_header_ptr automatic pointer dcl 1-94 datum_slot_ptr automatic pointer dcl 1-95 NAMES DECLARED BY EXPLICIT CONTEXT. ERROR_RETURN 000120 constant entry internal dcl 92 ref 78 81 84 85 MAIN_RETURN 000117 constant label dcl 89 ref 98 cm_get_ci_ptr 000015 constant entry external dcl 35 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 232 252 132 242 Length 444 132 20 155 100 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cm_get_ci_ptr 84 external procedure is an external procedure. ERROR_RETURN internal procedure shares stack frame of external procedure cm_get_ci_ptr. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cm_get_ci_ptr 000100 code cm_get_ci_ptr THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. file_manager_$get_ci_ptr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$ci_not_allocated dm_error_$ci_not_in_collection error_table_$unimplemented_version CONSTANTS 000126 aa 000002000000 000127 aa 000000000000 000130 aa 600000000041 000131 aa 000100000000 000000 aa 142 143 151 061 bci1 000001 aa 404000000043 000002 aa 464000000000 000003 aa 604000000030 000004 aa 514000000044 000006 aa 077777000043 000007 aa 000001000000 BEGIN PROCEDURE cm_get_ci_ptr ENTRY TO cm_get_ci_ptr STATEMENT 1 ON LINE 35 cm_get_ci_ptr: proc (p_file_opening_id, p_collection_id, p_control_interval_id, p_control_interval_ptr, p_code); 000010 at 000005000004 000011 tt 000004000003 000012 tt 000002000001 000013 ta 000010000000 000014 da 000074300000 000015 aa 000140 6270 00 eax7 96 000016 aa 7 00034 3521 20 epp2 pr7|28,* 000017 aa 2 01045 2721 00 tsp2 pr2|549 ext_entry 000020 aa 000012000000 000021 aa 000000000000 STATEMENT 1 ON LINE 74 code = 0; 000022 aa 6 00100 4501 00 stz pr6|64 code STATEMENT 1 ON LINE 75 p_control_interval_ptr = null; 000023 aa 777763 2370 04 ldaq -13,ic 000006 = 077777000043 000001000000 000024 aa 6 00032 3735 20 epp7 pr6|26,* 000025 aa 7 00010 7571 20 staq pr7|8,* p_control_interval_ptr STATEMENT 1 ON LINE 77 call file_manager_$get_ci_ptr (p_file_opening_id, (p_control_interval_id), p_control_interval_ptr, code); 000026 aa 7 00006 2361 20 ldq pr7|6,* p_control_interval_id 000027 aa 6 00110 7561 00 stq pr6|72 000030 aa 7 00002 3521 20 epp2 pr7|2,* p_file_opening_id 000031 aa 6 00114 2521 00 spri2 pr6|76 000032 aa 6 00110 3521 00 epp2 pr6|72 000033 aa 6 00116 2521 00 spri2 pr6|78 000034 aa 7 00010 3521 20 epp2 pr7|8,* p_control_interval_ptr 000035 aa 6 00120 2521 00 spri2 pr6|80 000036 aa 6 00100 3521 00 epp2 pr6|64 code 000037 aa 6 00122 2521 00 spri2 pr6|82 000040 aa 6 00112 6211 00 eax1 pr6|74 000041 aa 020000 4310 07 fld 8192,dl 000042 la 4 00010 3521 20 epp2 pr4|8,* file_manager_$get_ci_ptr 000043 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 78 if code ^= 0 then call ERROR_RETURN (code); 000044 aa 6 00100 2361 00 ldq pr6|64 code 000045 aa 000003 6000 04 tze 3,ic 000050 000046 aa 000060 3520 04 epp2 48,ic 000126 = 000002000000 000047 aa 000051 6700 04 tsp4 41,ic 000120 STATEMENT 1 ON LINE 81 if p_control_interval_ptr -> bci_header.layout_type ^= BASIC_CI_LAYOUT_1 then if unspec (p_control_interval_ptr -> bci_header) = ""b then call ERROR_RETURN (dm_error_$ci_not_allocated); 000050 aa 6 00032 3735 20 epp7 pr6|26,* 000051 aa 7 00010 3715 20 epp5 pr7|8,* p_control_interval_ptr 000052 aa 5 00000 2351 20 lda pr5|0,* bci_header.layout_type 000053 aa 777725 1150 04 cmpa -43,ic 000000 = 142143151061 000054 aa 000026 6000 04 tze 22,ic 000102 000055 aa 5 00000 3535 20 epp3 pr5|0,* p_control_interval_ptr 000056 aa 000 000 066 500 cmpb (pr),(),fill(0) 000057 aa 3 00000 00 0264 descb pr3|0,180 000060 aa 000000 00 0000 descb 0,0 000061 aa 000011 6010 04 tnz 9,ic 000072 000062 aa 6 00044 3701 20 epp4 pr6|36,* 000063 la 4 00012 3521 20 epp2 pr4|10,* dm_error_$ci_not_allocated 000064 aa 6 00114 2521 00 spri2 pr6|76 000065 aa 6 00112 3521 00 epp2 pr6|74 000066 aa 004000 4310 07 fld 2048,dl 000067 aa 2 00000 7571 00 staq pr2|0 000070 aa 000030 6700 04 tsp4 24,ic 000120 000071 aa 000026 7100 04 tra 22,ic 000117 STATEMENT 1 ON LINE 84 else call ERROR_RETURN (error_table_$unimplemented_version); 000072 aa 6 00044 3701 20 epp4 pr6|36,* 000073 la 4 00016 3521 20 epp2 pr4|14,* error_table_$unimplemented_version 000074 aa 6 00114 2521 00 spri2 pr6|76 000075 aa 6 00112 3521 00 epp2 pr6|74 000076 aa 004000 4310 07 fld 2048,dl 000077 aa 2 00000 7571 00 staq pr2|0 000100 aa 000020 6700 04 tsp4 16,ic 000120 000101 aa 000016 7100 04 tra 14,ic 000117 STATEMENT 1 ON LINE 85 else if p_control_interval_ptr -> bci_header.collection_id ^= p_collection_id then call ERROR_RETURN (dm_error_$ci_not_in_collection); 000102 aa 5 00000 3535 20 epp3 pr5|0,* p_control_interval_ptr 000103 aa 3 00001 2351 00 lda pr3|1 bci_header.collection_id 000104 aa 7 00004 1151 20 cmpa pr7|4,* p_collection_id 000105 aa 000011 6000 04 tze 9,ic 000116 000106 aa 6 00044 3701 20 epp4 pr6|36,* 000107 la 4 00014 3521 20 epp2 pr4|12,* dm_error_$ci_not_in_collection 000110 aa 6 00114 2521 00 spri2 pr6|76 000111 aa 6 00112 3521 00 epp2 pr6|74 000112 aa 004000 4310 07 fld 2048,dl 000113 aa 2 00000 7571 00 staq pr2|0 000114 aa 000004 6700 04 tsp4 4,ic 000120 000115 aa 000002 7100 04 tra 2,ic 000117 STATEMENT 1 ON LINE 87 else p_code = 0; 000116 aa 7 00012 4501 20 stz pr7|10,* p_code STATEMENT 1 ON LINE 89 MAIN_RETURN: return; 000117 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 105 end cm_get_ci_ptr; BEGIN PROCEDURE ERROR_RETURN ENTRY TO ERROR_RETURN STATEMENT 1 ON LINE 92 ERROR_RETURN: proc (er_p_code); 000120 aa 6 00102 6501 00 spri4 pr6|66 000121 aa 6 00104 2521 00 spri2 pr6|68 STATEMENT 1 ON LINE 97 p_code = er_p_code; 000122 aa 2 00002 2361 20 ldq pr2|2,* er_p_code 000123 aa 6 00032 3735 20 epp7 pr6|26,* 000124 aa 7 00012 7561 20 stq pr7|10,* p_code STATEMENT 1 ON LINE 98 go to MAIN_RETURN; 000125 aa 777772 7100 04 tra -6,ic 000117 STATEMENT 1 ON LINE 100 end ERROR_RETURN; END PROCEDURE ERROR_RETURN END PROCEDURE cm_get_ci_ptr ----------------------------------------------------------- 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