COMPILATION LISTING OF SEGMENT mdb_display_data_value Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-05-05_1829.83_Fri_mdt Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 mdb_display_data_value: mddv: procedure (); 10 11 /* DESCRIPTION : 12* 13* The purpose of the command is to display on the terminal, the value of a 14* data item, when only a pointer to it's storage location, and a pointer to 15* it's descriptor are known. the input pointers can be any form of virtual 16* pointer that is accepted by the cv_ptr_ subroutine. assign_ is used to 17* convert the data to character format. the descriptor is the system 18* standard pl1 data descriptor for arguments. see the reference manual or 19* subsystem writers guide for storage formats of data, and their descriptors. 20* 21* NOTE: the converted character form of the data value must be <= 50000 22* characters, due the internal buffer size used in the call to iox_. 23* 24* ADDITION: the entry mdb_display_data_value$ptr is a subroutine interface 25* that will accept pointers directly, rather than virtual pointers. 26* 27* 28* PARAMETERS : 29* 30* vir_data_ptr - - (input) virtual pointer (char (*)), that points to the 31* data value in storage 32* 33* vir_desc_ptr - - (input) virtual pointer (char(*)), that points to the 34* multics pl1 data descriptor(bit(36)) for the data value 35* 36* data value - - (output) displayed on the terminal when conversion 37* successful 38* 39* command_error_ - - (output) condition, signaled by com_err_, that is used 40* to reports errors in virtual pointer or data conversion. 41* 42* input_data_ptr, input_desc_ptr - - (input) pointers, same as the 43* virtual_...._ptr parameters, except for the subroutine entry 44* mdb_display_data_value$ptr 45* 46* 47* HISTORY: 48* 49* 79-11-01 Jim Gray : Originally written. 50* 51* 79-11-02 Jim Gray : Modified to add subroutine interface 52* 53**/ 54 55 /* check for correct argument count */ 56 57 call cu_$arg_count (nargs); 58 if nargs ^= 2 then 59 call com_err_ (error_table_$wrong_no_of_args, caller_name, "^/^a^/", 60 "Usage: mdb_display_data_value virtual_data_pointer virtual_descriptor_pointer"); 61 else do; 62 63 /* get the two char(*) arguments */ 64 65 call cu_$arg_ptr (1, vir_data_ptr_ptr, vir_data_ptr_len, error_code); 66 call cu_$arg_ptr (2, vir_desc_ptr_ptr, vir_desc_ptr_len, error_code); 67 68 69 /* get a real pointer to the data value */ 70 71 data_ptr = cv_ptr_ (vir_data_ptr, error_code); 72 if error_code ^= 0 then 73 call com_err_ (error_code, caller_name, "^/^a^a^a^/", 74 "Unable to convert the virtual data pointer """, 75 vir_data_ptr, """ to a real pointer."); 76 else do; 77 78 /* get a real pointer to the multics pli descriptor for the given data value */ 79 80 desc_ptr = cv_ptr_ (vir_desc_ptr, error_code); 81 if error_code ^= 0 then 82 call com_err_ (error_code, caller_name, "^/^a^a^a^/", 83 "Unable to convert the virtual descriptor pointer """, 84 vir_desc_ptr, """ to a real pointer."); 85 else do; 86 87 /* convert and output the data value */ 88 89 call convert_value (); 90 end; 91 end; 92 93 return; 94 95 96 97 98 /* subroutine interface, that accepts pointer input values directly */ 99 100 ptr: entry (input_data_ptr, input_desc_ptr); 101 102 data_ptr = input_data_ptr; 103 desc_ptr = input_desc_ptr; 104 105 call convert_value (); 106 107 return; 108 109 convert_value: procedure (); 110 111 /* this routine makes the call to convert the data from the input 112* type into character format for output to the terminal. */ 113 114 /* set up pointers to the char(50000) output variable, and it's descriptor */ 115 116 char_data_ptr = addr (char_data); 117 char_desc_ptr = addr (char_desc); 118 119 /* now use the encapsuled assign_ to do the conversion */ 120 121 call mu_convert (data_ptr, desc_ptr, char_data_ptr, char_desc_ptr, error_code); 122 if error_code ^= 0 then 123 call com_err_ (error_code, caller_name, "^/^a ^a^p^a^p^a^/", 124 "Unable to convert the data to character form,", 125 "using the data pointer """, data_ptr, 126 """ and the descriptor pointer """, desc_ptr, """."); 127 else do; 128 129 /* output the converted data value */ 130 131 call output_value (); 132 133 end; 134 end; 135 136 end; 137 138 output_value: procedure (); 139 140 /* this routine does the i/o to the user's terminal of the converted 141* data value in it's character format, a header is output first */ 142 143 header = NL || "The data value is:" || NL; 144 header_ptr = addr (header); 145 146 call iox_$put_chars (iox_$user_output, header_ptr, length (rtrim (header)), error_code); 147 if error_code ^= 0 then 148 call com_err_ (error_code, caller_name, "^/^a^/", 149 "Unable to output the header to user_output."); 150 else do; 151 152 /* output the actual data vaule in character form, surrounded by quotes, with trailing new lines */ 153 154 char_data = char_data || """"; 155 char_data = """" || char_data; 156 char_data = char_data || NL; 157 char_data = char_data || NL; 158 159 call iox_$put_chars (iox_$user_output, addrel (char_data_ptr, 1), length (char_data), error_code); 160 if error_code = 0 then ; 161 else call com_err_ (error_code, caller_name, "^/^a^/", 162 "Unable to output data value to user_output."); 163 164 end; 165 166 end; 167 168 declare header char (24); /* header information */ 169 declare NL char (1) init (" 170 "); /* new line character */ 171 declare header_ptr ptr; /* points to header character buffer */ 172 declare com_err_ entry options (variable); /* reports command errors */ 173 declare char_data char (50004) varying; /* general output variable + 4 chars for NL'S/quotes */ 174 declare (data_ptr, /* points to input data value */ 175 desc_ptr, /* points to input value's descriptor */ 176 char_data_ptr, /* points to output variable */ 177 char_desc_ptr) ptr; /* points to descriptor for char output variable */ 178 declare error_code fixed bin (35); /* error status encoding */ 179 declare vir_data_ptr char (vir_data_ptr_len) based (vir_data_ptr_ptr); /* virutal pointer to input data value */ 180 declare vir_desc_ptr char (vir_desc_ptr_len) based (vir_desc_ptr_ptr); /* virutal pointer to input value descriptor */ 181 declare cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr); /* converts virtual pointers to real pointers */ 182 declare char_desc bit (36) init ("101011000000000000001100001101010000"b); /* char (50000) varying descriptor */ 183 declare mu_convert entry (ptr, ptr, ptr, ptr, fixed bin (35)); /* encapsulates assign_ conversion routine */ 184 declare caller_name char (22) init ("mdb_display_data_value"); /* name of calling routine */ 185 declare iox_$user_output external pointer; /* user_i/o iocb pointer */ 186 declare iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); /* outputs characters */ 187 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); /* gets char(*) arguments */ 188 declare cu_$arg_count entry (fixed bin); /* gets argument count */ 189 declare nargs fixed bin; /* number of arguments */ 190 declare error_table_$wrong_no_of_args fixed bin (35) ext; /* wrong arg count, s/b 2 */ 191 declare vir_data_ptr_ptr ptr; /* points to virtual_data_ptr char(*) arg */ 192 declare vir_desc_ptr_ptr ptr; /* pointer to virutal_desc_ptr char (*) arg */ 193 declare vir_data_ptr_len fixed bin (21); /* length of virtual_data_ptr char(*) arg */ 194 declare vir_desc_ptr_len fixed bin (21); /* length of virtual_desc_ptr char(*) arg */ 195 declare input_data_ptr ptr; /* subr input data pointer */ 196 declare input_desc_ptr ptr; /* subr input descriptor pointer */ 197 declare ( 198 addr, 199 addrel, 200 length, 201 rtrim 202 ) builtin; 203 204 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/05/00 1829.8 mdb_display_data_value.pl1 >udd>sm>ds>w>ml>mdb_display_data_value.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. NL 000106 automatic char(1) initial packed unaligned dcl 169 set ref 143 143 156 157 169* addr builtin function dcl 197 ref 116 117 144 addrel builtin function dcl 197 ref 159 159 caller_name 030452 automatic char(22) initial packed unaligned dcl 184 set ref 58* 72* 81* 122* 147* 161* 184* char_data 000112 automatic varying char(50004) dcl 173 set ref 116 154* 154 155* 155 156* 156 157* 157 159 159 char_data_ptr 030444 automatic pointer dcl 174 set ref 116* 121* 159 159 char_desc 030451 automatic bit(36) initial packed unaligned dcl 182 set ref 117 182* char_desc_ptr 030446 automatic pointer dcl 174 set ref 117* 121* com_err_ 000010 constant entry external dcl 172 ref 58 72 81 122 147 161 cu_$arg_count 000024 constant entry external dcl 188 ref 57 cu_$arg_ptr 000022 constant entry external dcl 187 ref 65 66 cv_ptr_ 000012 constant entry external dcl 181 ref 71 80 data_ptr 030440 automatic pointer dcl 174 set ref 71* 102* 121* 122* desc_ptr 030442 automatic pointer dcl 174 set ref 80* 103* 121* 122* error_code 030450 automatic fixed bin(35,0) dcl 178 set ref 65* 66* 71* 72 72* 80* 81 81* 121* 122 122* 146* 147 147* 159* 160 161* error_table_$wrong_no_of_args 000026 external static fixed bin(35,0) dcl 190 set ref 58* header 000100 automatic char(24) packed unaligned dcl 168 set ref 143* 144 146 146 header_ptr 000110 automatic pointer dcl 171 set ref 144* 146* input_data_ptr parameter pointer dcl 195 ref 100 102 input_desc_ptr parameter pointer dcl 196 ref 100 103 iox_$put_chars 000020 constant entry external dcl 186 ref 146 159 iox_$user_output 000016 external static pointer dcl 185 set ref 146* 159* length builtin function dcl 197 ref 146 146 159 159 mu_convert 000014 constant entry external dcl 183 ref 121 nargs 030460 automatic fixed bin(17,0) dcl 189 set ref 57* 58 rtrim builtin function dcl 197 ref 146 146 vir_data_ptr based char packed unaligned dcl 179 set ref 71* 72* vir_data_ptr_len 030466 automatic fixed bin(21,0) dcl 193 set ref 65* 71 71 72 72 vir_data_ptr_ptr 030462 automatic pointer dcl 191 set ref 65* 71 72 vir_desc_ptr based char packed unaligned dcl 180 set ref 80* 81* vir_desc_ptr_len 030467 automatic fixed bin(21,0) dcl 194 set ref 66* 80 80 81 81 vir_desc_ptr_ptr 030464 automatic pointer dcl 192 set ref 66* 80 81 NAMES DECLARED BY EXPLICIT CONTEXT. convert_value 000577 constant entry internal dcl 109 ref 89 105 mdb_display_data_value 000236 constant entry external dcl 9 mddv 000226 constant entry external dcl 9 output_value 000724 constant entry internal dcl 138 ref 131 ptr 000557 constant entry external dcl 100 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1314 1344 1164 1324 Length 1536 1164 30 155 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mddv 12806 external procedure is an external procedure. convert_value internal procedure shares stack frame of external procedure mddv. output_value internal procedure shares stack frame of external procedure mddv. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mddv 000100 header mddv 000106 NL mddv 000110 header_ptr mddv 000112 char_data mddv 030440 data_ptr mddv 030442 desc_ptr mddv 030444 char_data_ptr mddv 030446 char_desc_ptr mddv 030450 error_code mddv 030451 char_desc mddv 030452 caller_name mddv 030460 nargs mddv 030462 vir_data_ptr_ptr mddv 030464 vir_desc_ptr_ptr mddv 030466 vir_data_ptr_len mddv 030467 vir_desc_ptr_len mddv THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_ptr_ iox_$put_chars mu_convert THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$wrong_no_of_args iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 169 000211 182 000213 184 000215 9 000225 57 000244 58 000253 65 000311 66 000330 71 000347 72 000373 80 000450 81 000474 89 000551 93 000552 100 000553 102 000565 103 000571 105 000574 107 000575 204 000576 109 000577 116 000600 117 000602 121 000604 122 000623 131 000722 134 000723 138 000724 143 000725 144 000745 146 000750 147 000777 154 001034 155 001043 156 001064 157 001074 159 001103 160 001125 161 001130 166 001162 ----------------------------------------------------------- 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