COMPILATION LISTING OF SEGMENT append_inbuff_ 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 1508.3 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-08-27,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 append_inbuff_: 19 proc (p_mcb_ptr, p_data, p_data_length, p_code); 20 21 /* PROGRAM FUNCTION 22* 23*Append p_data to the application program's input buffer and update mcb input 24*buffer fields. 25**/ 26 27 /* : NOTES 28**/ 29 30 31 /* INPUT PARAMETERS */ 32 dcl p_mcb_ptr ptr parameter; /* mcb contains inbuff info */ 33 dcl p_data ptr parameter; /* data to append */ 34 dcl p_data_length fixed bin (17) parameter; /* length of data */ 35 36 /* OUTPUT PARAMETERS */ 37 dcl p_code fixed bin (35); /* Error code */ 38 39 40 /* SYSTEM CALL SUPPORT */ 41 dcl ws_error_$input_buffer_overflow 42 fixed bin (35) ext static; 43 44 45 /* MISC VARIABLES */ 46 dcl input_data char (p_data_length) based (p_data); 47 dcl p ptr; /* pointer to application's buffer */ 48 dcl input_buffer char (p_mcb_ptr -> mcb.inbuff_length) based (p); 49 dcl effective_data_length fixed bin; 50 dcl buffer_space_left fixed bin; 51 52 /* BUILTINS */ 53 dcl substr builtin; 54 55 /* */ 56 57 /* INITIALIZATION */ 58 p_code = 0; 59 effective_data_length = p_data_length; 60 61 /* MAIN */ 62 63 /* : determine amount of space left in the input buffer */ 64 65 buffer_space_left = p_mcb_ptr -> mcb.inbuff_length - 66 p_mcb_ptr -> inbuff_position_index; 67 68 /* : if amount of space left is less than amount of p_data to append set 69* amount to copy to the amount of buffer space left set p_code to indicate 70* input buffer overflow took place */ 71 72 if buffer_space_left < p_data_length then do; 73 effective_data_length = buffer_space_left; 74 p_code = ws_error_$input_buffer_overflow; 75 end; 76 77 /* : - if there is space in buffer to copy p_data then copy p_data into the 78* input buffer update the position index in the mcb for next time */ 79 80 if buffer_space_left > 0 then do; 81 p = p_mcb_ptr -> mcb.inbuff; 82 substr (input_buffer, 83 p_mcb_ptr -> mcb.inbuff_position_index + 1, 84 effective_data_length) = 85 substr (input_data, 1, effective_data_length); 86 87 p_mcb_ptr -> mcb.inbuff_position_index = 88 p_mcb_ptr -> mcb.inbuff_position_index 89 + effective_data_length; 90 end; 91 92 93 94 /* INCLUDE FILES */ 95 1 1 /* BEGIN INCLUDE FILE: mowse.incl.pl1 * * * * * * * * * * * * */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(86-09-17,Flegel), approve(86-12-16,MCR7580), 1 5* audit(86-12-15,Gilcrease), install(87-01-06,MR12.0-1255): 1 6* Created. 1 7* 2) change(86-10-03,Flegel), approve(86-12-16,MCR7580), 1 8* audit(86-12-15,Gilcrease), install(87-01-06,MR12.0-1255): 1 9* Combined mowse_minor_caps.incl.pl1 and 1 10* mowse.incl.pl1 so that programmer only needs include mowse.incl.pl1 1 11* 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), 1 12* audit(86-12-15,Gilcrease), install(87-01-06,MR12.0-1255): 1 13* Approved. 1 14* 4) change(87-07-31,Flegel), approve(87-07-31,MCR7580), 1 15* audit(87-07-31,RBarstad), install(87-08-07,MR12.1-1075): 1 16* Changes to support async call channels. 1 17* END HISTORY COMMENTS */ 1 18 1 19 /* Name of MOWSE temp seg for data */ 1 20 1 21 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ 1 22 dcl temp_seg_name char (6) init ("MOWSE_"); 1 23 1 24 /* Version number */ 1 25 1 26 dcl MOWSE_VERSION_ char (8) int static options (constant) init ("version1"); 1 27 1 28 /* System identification */ 1 29 1 30 dcl LOCAL_SYSTEM fixed bin int static options (constant) init (32); 1 31 dcl REMOTE_SYSTEM fixed bin int static options (constant) init (33); 1 32 1 33 /* Status request return codes */ 1 34 1 35 dcl STATUS_SUCCESS fixed bin (8) int static options (constant) 1 36 init (32); 1 37 dcl STATUS_FAILED fixed bin (8) int static options (constant) 1 38 init (33); 1 39 1 40 /* Input/output capability buffer size limits */ 1 41 1 42 dcl MINIMUM_BUFFER_SIZE fixed bin int static options (constant) init (128); 1 43 dcl MAXIMUM_BUFFER_SIZE fixed bin int static options (constant) init (65536); 1 44 dcl MAXIMUM_BG_SIZE fixed bin int static options (constant) init (512); 1 45 1 46 /* Packet size (communication) constants */ 1 47 1 48 dcl PACKET_SIZE fixed bin int static options (constant) init (124); 1 49 dcl MAXIMUM_PACKET_SIZE fixed bin int static options (constant) init (118); 1 50 1 51 /* Query message constants */ 1 52 1 53 dcl SEND_QUERY fixed bin int static options (constant) init (128); 1 54 dcl ACCEPT fixed bin int static options (constant) init (32); 1 55 dcl REJECT fixed bin int static options (constant) init (33); 1 56 1 57 /* Trace information constants */ 1 58 1 59 dcl RECEIVE fixed bin int static options (constant) init (1); 1 60 dcl SEND fixed bin int static options (constant) init (0); 1 61 1 62 /* Limits on dedicated minor capabilities */ 1 63 1 64 dcl MINIMUM_SYSTEM_MINOR fixed bin int static options (constant) init (32); 1 65 dcl MAXIMUM_SYSTEM_MINOR fixed bin int static options (constant) init (63); 1 66 dcl MINIMUM_USER_MINOR fixed bin int static options (constant) init (64); 1 67 dcl MAXIMUM_USER_MINOR fixed bin int static options (constant) init (127); 1 68 1 69 /* Dedicated Minor Capabilities */ 1 70 1 71 dcl LAST fixed bin int static options (constant) init (0); 1 72 dcl EXECUTE_COMMAND_REPLY fixed bin int static options (constant) init (32); 1 73 dcl EXECUTE_CAPABILITY_REPLY 1 74 fixed bin int static options (constant) init (33); 1 75 dcl FAIL_CAPABILITY fixed bin int static options (constant) init (33); 1 76 dcl INTERNAL fixed bin int static options (constant) init (32); 1 77 dcl EXECUTE_COMMAND fixed bin int static options (constant) init (34); 1 78 dcl ADD_TO_REMOTE_CAT fixed bin int static options (constant) init (35); 1 79 dcl DELETE_FROM_REMOTE_CAT fixed bin int static options (constant) init (36); 1 80 dcl SUSPEND_APPLICATION fixed bin int static options (constant) init (37); 1 81 dcl RESUME_APPLICATION fixed bin int static options (constant) init (38); 1 82 dcl TERMINATE_APPLICATION fixed bin int static options (constant) init (39); 1 83 dcl RESET_APPLICATION fixed bin int static options (constant) init (40); 1 84 dcl RESET_REPLY fixed bin int static options (constant) init (41); 1 85 dcl WAKE_UP fixed bin int static options (constant) init (42); 1 86 dcl STATUS fixed bin int static options (constant) init (43); 1 87 dcl OVERFLOWED_BUFFER fixed bin int static options (constant) init (44); 1 88 dcl SYSTEM_ERROR fixed bin int static options (constant) init (45); 1 89 dcl QUERY_REPLY fixed bin int static options (constant) init (46); 1 90 dcl RESPONSE_CONNECT fixed bin int static options (constant) init (47); 1 91 dcl RESPONSE_DISCONNECT fixed bin int static options (constant) init (48); 1 92 dcl REQUEST_CONNECT fixed bin int static options (constant) init (49); 1 93 dcl REQUEST_DISCONNECT fixed bin int static options (constant) init (50); 1 94 dcl CONTINUE fixed bin int static options (constant) init (51); 1 95 dcl MORE fixed bin int static options (constant) init (52); 1 96 dcl SET_SLEEP_FLAG fixed bin int static options (constant) init (53); 1 97 dcl RESET_SLEEP_FLAG fixed bin int static options (constant) init (54); 1 98 dcl SET_SUSPEND fixed bin int static options (constant) init (55); 1 99 dcl RESET_SUSPEND fixed bin int static options (constant) init (56); 1 100 dcl STATUS_REPLY fixed bin int static options (constant) init (57); 1 101 1 102 /* Foreground */ 1 103 1 104 dcl FG_CONTROL_MESSAGE fixed bin int static options (constant) init (33); 1 105 dcl FG_BREAK fixed bin int static options (constant) init (34); 1 106 dcl FG_TERMINAL_DATA fixed bin int static options (constant) init (35); 1 107 dcl FG_MORE_DATA fixed bin int static options (constant) init (36); 1 108 dcl PUT_TO_BACKGROUND_BUFFER 1 109 fixed bin int static options (constant) init (37); 1 110 dcl PUT_TO_QUERY_MESSAGE_BUFFER 1 111 fixed bin int static options (constant) init (38); 1 112 1 113 /* END INCLUDE FILE: mowse.incl.pl1 * * * * * * * * * * * * */ 96 2 1 /* BEGIN INCLUDE FILE: mowse_mcb.incl.pl1 * * * * * * * * * * * * */ 2 2 2 3 /****^ HISTORY COMMENTS: 2 4* 1) change(86-05-17,Smith), approve(87-07-15,MCR7580), 2 5* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 2 6* Created to define the mcb (Mowse Control Block) 2 7* for information on capabilities. 2 8* 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), 2 9* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 2 10* Approved. 2 11* END HISTORY COMMENTS */ 2 12 /* MOWSE control block */ 2 13 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ 2 14 dcl 01 mcb based, 2 15 02 version char (8), 2 16 02 capability_name char (32), /* Name of capability */ 2 17 02 major_capability fixed bin (17), /* Capability number */ 2 18 02 inbuff_length fixed bin (17), /* Length of buffer */ 2 19 02 inbuff_position_index 2 20 fixed bin (17), /* Current position in inbuffer */ 2 21 02 inbuff_data_length 2 22 fixed bin (17), /* Amoiunt of data in inbuffer */ 2 23 02 outbuff_length fixed bin (17), /* Length of outbuffer */ 2 24 02 mbz1 bit (36) unal, 2 25 02 entry_var entry options (variable), /* Message processor entry point of capability */ 2 26 02 data_block_ptr ptr, /* Capability data */ 2 27 02 inbuff ptr, /* Message input buffer */ 2 28 02 outbuff_list_start 2 29 ptr, /* Pointer to outbuffer data */ 2 30 02 outbuff_list_end ptr, /* Last node in outbuffer data */ 2 31 02 iocb_ptr ptr, /* IOCB to mowse_io_ */ 2 32 02 mowse_info_ptr ptr; /* MOWSE information */ 2 33 /* Output buffer linked list node */ 2 34 dcl 01 output_buffer based, 2 35 02 destination_system 2 36 char, /* Destination of message */ 2 37 02 destination_major char, 2 38 02 destination_minor char, 2 39 02 buffer_position fixed bin, /* Position in buffer of message */ 2 40 02 buffer_length fixed bin, /* Length of buffer */ 2 41 02 next_buffer ptr, /* Next buffer of message */ 2 42 02 data ptr; /* Pointer to message */ 2 43 2 44 /* END INCLUDE FILE: mowse_mcb.incl.pl1 * * * * * * * * * * * * */ 97 98 99 /* : END */ 100 end append_inbuff_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/07/87 1455.0 append_inbuff_.pl1 >special_ldd>install>MR12.1-1075>append_inbuff_.pl1 96 1 08/07/87 1445.8 mowse.incl.pl1 >special_ldd>install>MR12.1-1075>mowse.incl.pl1 97 2 08/07/87 1447.6 mowse_mcb.incl.pl1 >special_ldd>install>MR12.1-1075>mowse_mcb.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. buffer_space_left 000103 automatic fixed bin(17,0) dcl 50 set ref 65* 72 73 80 effective_data_length 000102 automatic fixed bin(17,0) dcl 49 set ref 59* 73* 82 82 87 inbuff 26 based pointer level 2 dcl 2-14 ref 81 inbuff_length 13 based fixed bin(17,0) level 2 dcl 2-14 ref 65 82 inbuff_position_index 14 based fixed bin(17,0) level 2 dcl 2-14 set ref 65 82 87* 87 input_buffer based char unaligned dcl 48 set ref 82* input_data based char unaligned dcl 46 ref 82 mcb based structure level 1 unaligned dcl 2-14 p 000100 automatic pointer dcl 47 set ref 81* 82 p_code parameter fixed bin(35,0) dcl 37 set ref 18 58* 74* p_data parameter pointer dcl 33 ref 18 82 p_data_length parameter fixed bin(17,0) dcl 34 ref 18 59 72 82 p_mcb_ptr parameter pointer dcl 32 ref 18 65 65 81 82 82 87 87 substr builtin function dcl 53 set ref 82* 82 temp_seg_name 000104 automatic char(6) initial unaligned dcl 1-22 set ref 1-22* ws_error_$input_buffer_overflow 000010 external static fixed bin(35,0) dcl 41 ref 74 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACCEPT internal static fixed bin(17,0) initial dcl 1-54 ADD_TO_REMOTE_CAT internal static fixed bin(17,0) initial dcl 1-78 CONTINUE internal static fixed bin(17,0) initial dcl 1-94 DELETE_FROM_REMOTE_CAT internal static fixed bin(17,0) initial dcl 1-79 EXECUTE_CAPABILITY_REPLY internal static fixed bin(17,0) initial dcl 1-73 EXECUTE_COMMAND internal static fixed bin(17,0) initial dcl 1-77 EXECUTE_COMMAND_REPLY internal static fixed bin(17,0) initial dcl 1-72 FAIL_CAPABILITY internal static fixed bin(17,0) initial dcl 1-75 FG_BREAK internal static fixed bin(17,0) initial dcl 1-105 FG_CONTROL_MESSAGE internal static fixed bin(17,0) initial dcl 1-104 FG_MORE_DATA internal static fixed bin(17,0) initial dcl 1-107 FG_TERMINAL_DATA internal static fixed bin(17,0) initial dcl 1-106 INTERNAL internal static fixed bin(17,0) initial dcl 1-76 LAST internal static fixed bin(17,0) initial dcl 1-71 LOCAL_SYSTEM internal static fixed bin(17,0) initial dcl 1-30 MAXIMUM_BG_SIZE internal static fixed bin(17,0) initial dcl 1-44 MAXIMUM_BUFFER_SIZE internal static fixed bin(17,0) initial dcl 1-43 MAXIMUM_PACKET_SIZE internal static fixed bin(17,0) initial dcl 1-49 MAXIMUM_SYSTEM_MINOR internal static fixed bin(17,0) initial dcl 1-65 MAXIMUM_USER_MINOR internal static fixed bin(17,0) initial dcl 1-67 MINIMUM_BUFFER_SIZE internal static fixed bin(17,0) initial dcl 1-42 MINIMUM_SYSTEM_MINOR internal static fixed bin(17,0) initial dcl 1-64 MINIMUM_USER_MINOR internal static fixed bin(17,0) initial dcl 1-66 MORE internal static fixed bin(17,0) initial dcl 1-95 MOWSE_VERSION_ internal static char(8) initial unaligned dcl 1-26 OVERFLOWED_BUFFER internal static fixed bin(17,0) initial dcl 1-87 PACKET_SIZE internal static fixed bin(17,0) initial dcl 1-48 PUT_TO_BACKGROUND_BUFFER internal static fixed bin(17,0) initial dcl 1-108 PUT_TO_QUERY_MESSAGE_BUFFER internal static fixed bin(17,0) initial dcl 1-110 QUERY_REPLY internal static fixed bin(17,0) initial dcl 1-89 RECEIVE internal static fixed bin(17,0) initial dcl 1-59 REJECT internal static fixed bin(17,0) initial dcl 1-55 REMOTE_SYSTEM internal static fixed bin(17,0) initial dcl 1-31 REQUEST_CONNECT internal static fixed bin(17,0) initial dcl 1-92 REQUEST_DISCONNECT internal static fixed bin(17,0) initial dcl 1-93 RESET_APPLICATION internal static fixed bin(17,0) initial dcl 1-83 RESET_REPLY internal static fixed bin(17,0) initial dcl 1-84 RESET_SLEEP_FLAG internal static fixed bin(17,0) initial dcl 1-97 RESET_SUSPEND internal static fixed bin(17,0) initial dcl 1-99 RESPONSE_CONNECT internal static fixed bin(17,0) initial dcl 1-90 RESPONSE_DISCONNECT internal static fixed bin(17,0) initial dcl 1-91 RESUME_APPLICATION internal static fixed bin(17,0) initial dcl 1-81 SEND internal static fixed bin(17,0) initial dcl 1-60 SEND_QUERY internal static fixed bin(17,0) initial dcl 1-53 SET_SLEEP_FLAG internal static fixed bin(17,0) initial dcl 1-96 SET_SUSPEND internal static fixed bin(17,0) initial dcl 1-98 STATUS internal static fixed bin(17,0) initial dcl 1-86 STATUS_FAILED internal static fixed bin(8,0) initial dcl 1-37 STATUS_REPLY internal static fixed bin(17,0) initial dcl 1-100 STATUS_SUCCESS internal static fixed bin(8,0) initial dcl 1-35 SUSPEND_APPLICATION internal static fixed bin(17,0) initial dcl 1-80 SYSTEM_ERROR internal static fixed bin(17,0) initial dcl 1-88 TERMINATE_APPLICATION internal static fixed bin(17,0) initial dcl 1-82 WAKE_UP internal static fixed bin(17,0) initial dcl 1-85 output_buffer based structure level 1 unaligned dcl 2-34 NAME DECLARED BY EXPLICIT CONTEXT. append_inbuff_ 000013 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 120 132 56 130 Length 342 56 12 173 41 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME append_inbuff_ 70 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME append_inbuff_ 000100 p append_inbuff_ 000102 effective_data_length append_inbuff_ 000103 buffer_space_left append_inbuff_ 000104 temp_seg_name append_inbuff_ 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_$input_buffer_overflow LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000006 1 22 000020 58 000022 59 000024 65 000026 72 000033 73 000035 74 000036 80 000040 81 000042 82 000044 87 000053 100 000055 ----------------------------------------------------------- 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