COMPILATION LISTING OF SEGMENT find_free_cat_entry_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx. Az., Sys-M Compiled on: 08/07/87 1507.4 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1986 * 6* * * 7* *********************************************************** */ 8 9 /****^ HISTORY COMMENTS: 10* 1) change(86-07-01,Smith), approve(87-07-15,MCR7580), 11* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 12* Created. 13* 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), 14* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 15* Approved. 16* END HISTORY COMMENTS */ 17 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ 18 find_free_cat_entry_: 19 proc (p_mowse_info_ptr, p_cat_entry_index, p_code); 20 21 /* : PROGRAM FUNCTION 22* 23*Finds the first free cat index in the local CAT table. 24**/ 25 26 /* : NOTES 27**/ 28 29 30 /* INPUT PARAMETERS */ 31 dcl p_mowse_info_ptr ptr; /* Pointer to mowse info structure */ 32 33 34 /* OUTPUT PARAMETERS */ 35 dcl p_code fixed bin (35); /* Error code */ 36 dcl p_cat_entry_index fixed bin; /* index into cat table which is free */ 37 38 /* MISC VARIABLES */ 39 dcl i fixed bin; /* counter */ 40 41 42 /* STRUCTURES */ 43 44 45 /* SYSTEM CALLS */ 46 47 48 /* SYSTEM CALL SUPPORT */ 49 dcl ws_error_$cant_create_instance 50 fixed bin (35) ext static; 51 52 53 /* EXTERNAL CALLS */ 54 55 56 /* EXTERNAL CALL SUPPORT */ 57 58 59 /* BUILTINS */ 60 dcl null builtin; 61 62 /* CONDITIONS */ 63 64 65 /* CONSTANTS */ 66 67 68 /* */ 69 /* INITIALIZATION */ 70 71 72 /* MAIN */ 73 74 /* : Find the first free one sequentially starting from 75* MINIMUM_CAT_ENTRY to MAXIMUM_CAT_ENTRY */ 76 77 do i = MINIMUM_CAT_ENTRY to MAXIMUM_CAT_ENTRY; 78 if (p_mowse_info_ptr 79 -> mowse_info.local_cat (i).mcb_ptr = null ()) then do; 80 81 p_cat_entry_index = i; 82 p_code = 0; 83 return; 84 end; 85 end; 86 87 /* : Return error p_code if no free entry is found */ 88 89 p_code = ws_error_$cant_create_instance; 90 91 92 /* INCLUDE FILES */ 1 1 /* BEGIN INCLUDE FILE: mowse_info.incl.pl1 * * * * * * * * * * * * */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(86-07-19,Smith), approve(87-07-15,MCR7580), 1 5* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 1 6* Created to define MOWSE information to be 1 7* placed into a temp segment. 1 8* 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), 1 9* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 1 10* Approved. 1 11* 3) change(87-02-25,Flegel), approve(87-02-25,MCR7580), 1 12* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 1 13* Added bit switches to the init_mowse_info structure as well as the force 1 14* flag. 1 15* 4) change(87-03-24,Flegel), approve(87-03-24,MCR7580), 1 16* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 1 17* Added open_struc for passing EOP and escape char info from attach_mowse 1 18* to mowse_io_. 1 19* END HISTORY COMMENTS */ 1 20 1 21 /* CAT index limits */ 1 22 1 23 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ 1 24 dcl MINIMUM_CAT_ENTRY fixed bin int static options (constant) init (33); 1 25 dcl MAXIMUM_CAT_ENTRY fixed bin int static options (constant) init (64); 1 26 1 27 dcl CAPABILITY_NAME_LENGTH fixed bin int static options (constant) init (32); 1 28 1 29 /* Mowse information structure */ 1 30 1 31 dcl 01 mowse_info based aligned, 1 32 02 version char (8), 1 33 02 local_cat dimension (33:64), /* Multics CAT table */ 1 34 03 flags, 1 35 04 reset bit (1) unal, /* Reset in progress */ 1 36 04 suspended bit (1) unal, /* Suspended applciation */ 1 37 04 status bit (1) unal, /* Status pending */ 1 38 04 mbz1 bit (33) unal, 1 39 03 sleep_time fixed bin, /* Time application is sleeping */ 1 40 03 mcb_ptr ptr, /* Capability MCB */ 1 41 02 remote_cat dimension (33:64), /* PC CAT table */ 1 42 03 major_capability 1 43 fixed bin, /* Capability number */ 1 44 03 capability_name char (32), /* Name of capability */ 1 45 03 flags, 1 46 04 reset bit (1) unal, /* Reset in progress */ 1 47 04 suspended bit (1) unal, /* Suspended capability */ 1 48 04 sleep_time bit (1) unal, /* Application sleeping */ 1 49 04 mbz2 bit (33) unal, 1 50 02 message_manager_info, /* Info for processing messages */ 1 51 03 head_list_ptr ptr, /* Head of message list */ 1 52 03 tail_list_ptr ptr, /* Tail of message list */ 1 53 03 pending_messages 1 54 fixed bin, /* Number of pending messages */ 1 55 02 mowse_flags, 1 56 03 trace bit (1) unal, /* Message tracing facility active */ 1 57 03 debug bit (1) unal, /* Debugging packets facility active */ 1 58 03 error_handled bit (1) unal, /* In mowse_error_handler procedure */ 1 59 03 mbz1 bit (33) unal, 1 60 03 trace_file_iocb ptr, /* Trace file iocb */ 1 61 03 debug_file_iocb ptr, /* Debug file iocb */ 1 62 02 init_mowse_info_ptr 1 63 ptr; /* Initialization information */ 1 64 1 65 /* MOWSE initialization information */ 1 66 1 67 dcl init_mowse_info_ptr ptr; 1 68 dcl 01 init_mowse_info based (init_mowse_info_ptr), 1 69 02 version char (8), 1 70 02 flags, /* Bit switches */ 1 71 03 trace_sw bit (1) unal, 1 72 03 debug_sw bit (1) unal, 1 73 03 io_switch_sw bit (1) unal, 1 74 03 force_sw bit (1) unal, 1 75 03 start_up_sw bit (1) unal, 1 76 03 escape_sw bit (1) unal, 1 77 03 network_sw bit (1) unal, 1 78 03 pad bit (29) unal, 1 79 02 escape, 1 80 03 chars (0:255) bit (1) unal, /* Character escapes */ 1 81 03 pad bit (32) unal, 1 82 02 trace char (512) var, /* Trace file name */ 1 83 02 debug char (512) var, /* Debug file name */ 1 84 02 io_switch char (512) var, /* Io switch name of mowse_io_ attachment */ 1 85 02 startup (MAXIMUM_CAT_ENTRY - MINIMUM_CAT_ENTRY + 1) 1 86 char (168) var; /* Capability to be autoloaded */ 1 87 1 88 /* Open description structure (this is padded to character bounds as it 1 89* is a character overlay structure - passed as a character string) */ 1 90 1 91 dcl open_struc_ptr ptr; 1 92 dcl 01 open_struc based (open_struc_ptr), 1 93 02 flags, 1 94 03 network_sw bit (1) unal, 1 95 03 escape_sw bit (1) unal, 1 96 03 pad bit (7) unal, 1 97 02 escape, 1 98 03 switches (0:255) bit (1) unal, 1 99 03 pad bit (32) unal, 1 100 02 mbz bit (16) unal; 1 101 1 102 /* END INCLUDE FILE: mowse_info.incl.pl1 * * * * * * * * * * * * */ 93 94 95 /* : END */ 96 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/07/87 1454.9 find_free_cat_entry_.pl1 >special_ldd>install>MR12.1-1075>find_free_cat_entry_.pl1 93 1 08/07/87 1445.8 mowse_info.incl.pl1 >special_ldd>install>MR12.1-1075>mowse_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. MAXIMUM_CAT_ENTRY constant fixed bin(17,0) initial dcl 1-25 ref 77 MINIMUM_CAT_ENTRY constant fixed bin(17,0) initial dcl 1-24 ref 77 i 000100 automatic fixed bin(17,0) dcl 39 set ref 77* 78 81* local_cat 2 based structure array level 2 dcl 1-31 mcb_ptr 4 based pointer array level 3 dcl 1-31 ref 78 mowse_info based structure level 1 dcl 1-31 null builtin function dcl 60 ref 78 p_cat_entry_index parameter fixed bin(17,0) dcl 36 set ref 18 81* p_code parameter fixed bin(35,0) dcl 35 set ref 18 82* 89* p_mowse_info_ptr parameter pointer dcl 31 ref 18 78 ws_error_$cant_create_instance 000010 external static fixed bin(35,0) dcl 49 ref 89 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CAPABILITY_NAME_LENGTH internal static fixed bin(17,0) initial dcl 1-27 init_mowse_info based structure level 1 unaligned dcl 1-68 init_mowse_info_ptr automatic pointer dcl 1-67 open_struc based structure level 1 packed unaligned dcl 1-92 open_struc_ptr automatic pointer dcl 1-91 NAME DECLARED BY EXPLICIT CONTEXT. find_free_cat_entry_ 000012 constant entry external dcl 18 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 116 130 52 126 Length 322 52 12 155 43 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME find_free_cat_entry_ 66 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME find_free_cat_entry_ 000100 i find_free_cat_entry_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. ws_error_$cant_create_instance LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000006 77 000017 78 000027 81 000037 82 000041 83 000042 85 000043 89 000045 96 000051 ----------------------------------------------------------- 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