COMPILATION LISTING OF SEGMENT vrmu_display_descriptor Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/21/84 1437.7 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1976 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* HISTORY: 19* 20* Written by Jim Gray - - Dec. 1979, to include new data types in 21* MR7 release of PL1 and replace the old mrds_cmdb_alpha_desc with 22* a more general routine. 23* 24* Modified March 25, 1980 by R. Lackey to remove calls to 25* mdbm_util_ 26* 27* 81-09-23 Davids: changed an if statement with a substr reference 28* to an if statement with an index reference to prevent a 29* stringrange condition from occuring if the requested string is 30* larger than the original string. 31* 32* 82-09-10 Roger Lackey: converted to vrmu_display_descriptor 33* 34* 35**/ 36 37 38 vrmu_display_descriptor: procedure (desc_ptr) returns (char (120) varying); 39 40 /* DESCRIPTION: 41* 42* given a pointer to a multics pl1 standard argument descriptor 43* (see subsystem writers guide for format and data types) this 44* routine returns a character string that includes the pl1 keywords 45* attributes that would have appeared in a declaration that 46* produced the given descriptor, plus some clarifying comments, 47* when no keywords are available to describe the data type. for 48* example: if the input pointer pointed to the descriptor 49* "100000110000000000000000000000010001"b then the output would 50* look like "real fixed binary (17,0) unaligned" for an input of 51* "100100110000000000000000000000010001"b the output would be 52* "real fixed decimal (17,0) unaligned /* leading sign 4-bit byte-aligned * /" 53* structures are only displayed as "structure /* 4 elements * /" 54* an array example would be "character (96) varying aligned dimension(1:20,3:-3)" 55* 56* NOTE: the descriptor/array bounds informations is assumed to be 57* in correct format with legal values, no error checking is done in 58* this routine, since this is to be an efficient run-time 59* routine(cmdb should guarantee correctness). 60* 61**/ 62 63 /* PARAMETERS: 64* 65* desc_ptr - - (input) pointer, points to a standard multics pl1 argument 66* descriptor(bit(36) aligned), as described in the subsystem writers guide(under argument list format) 67* if not scalar, the array bounds/multiplier follow the descriptor in consecutive fixed bin(35) words. 68* 69* declaration - - (output) char(120) varying, the declaration of the data type varying, 70* as it would appear after a declare statement that would produce 71* the given descriptor, plus clarifying comments. 72* 73**/ 74 75 /* break down the descriptor into its individual parts */ 76 77 call decode_descriptor_ (desc_ptr, 0, type, unaligned, ndims, size, scale); 78 79 /* set up the return declaration according to the descriptor fields */ 80 81 if type < 1 | type > 63 then 82 declaration = "Unrecognized data type"; 83 else do; 84 85 /* get the basic data type declaration based on the type */ 86 87 declaration = data_type (type); 88 89 if index (declaration, "Unused") = 1 then ; /* CHANGE 81-09-23 ********** */ 90 else do; 91 92 /* go add data type specific information */ 93 94 call add_specifics (); 95 96 /* now add common attribute information, first alignment */ 97 98 if ^new_format_descriptor then ; /* packing info not available in old descriptor */ 99 else do; 100 101 if unaligned then 102 declaration = declaration || " unaligned"; 103 else declaration = declaration || " aligned"; 104 105 end; 106 107 /* now add dimension info, if any */ 108 109 if ndims = 0 then ; 110 else do; 111 112 if ^new_format_descriptor then /* number of dimension unknown in old format */ 113 declaration = declaration || " /* array, old format descriptor */"; 114 else call add_dimension (); 115 116 end; 117 118 /* add on clarifying comments */ 119 120 declaration = declaration || comment (type); 121 122 end; 123 124 end; 125 126 /* report final declaration attributes to caller */ 127 128 return (declaration); 129 130 add_specifics: procedure (); 131 132 /* add precision/scale for numbers, string size for bit/char, or 133* number of elements for a structure */ 134 135 /* numeric types need a precision, scale field attribute */ 136 137 if vrmu_data_class$number (desc_ptr) then do; /* arithmetic data types */ 138 139 declaration = declaration || " ("; 140 declaration = declaration || ltrim (char (size)); 141 142 if ^vrmu_data_class$fixed (desc_ptr) then ; /* float types don't have scale */ 143 else do; 144 declaration = declaration || ","; 145 declaration = declaration || ltrim (char (scale)); 146 end; 147 148 declaration = declaration || ")"; 149 150 end; 151 152 /* areas, bit, and character types need a size field */ 153 154 else if type >= 18 & type <= 22 then do; /* area or bit or character */ 155 156 declaration = declaration || " ("; 157 declaration = declaration || ltrim (char (size)); 158 declaration = declaration || ")"; 159 160 /* add the varying/nonvarying attribute for bit or character strings */ 161 162 if type = 20 | type = 22 then 163 declaration = declaration || " varying"; 164 else if type = 19 | type = 21 then 165 declaration = declaration || " nonvarying"; 166 167 end; 168 /* report via a comment, the number of structure elements */ 169 170 else if type = 17 then do; /* structure */ 171 172 if ^new_format_descriptor then ; /* no info on elements in old descriptor */ 173 else do; 174 175 declaration = declaration || " /* "; 176 declaration = declaration || ltrim (char (size)); 177 declaration = declaration || " element"; 178 if size = 1 then 179 declaration = declaration || " */"; 180 else declaration = declaration || "s */"; 181 182 end; 183 184 end; 185 186 end; 187 188 add_dimension: procedure (); 189 190 /* add the dimension attribute, with array bounds */ 191 192 declaration = declaration || " dimension ("; 193 194 /* add a bound_pair "upper:lower" for each dimension */ 195 196 do dimension_number = 1 to ndims; 197 198 offset = (3 * dimension_number) - 2; /* number of words from descriptor to bound */ 199 200 /* pick up bounds words following descriptor */ 201 202 declaration = declaration || ltrim (char (addrel (desc_ptr, offset) -> lower_bound)); 203 declaration = declaration || ":"; 204 declaration = declaration || ltrim (char (addrel (desc_ptr, offset + 1) -> upper_bound)); 205 206 /* add separator or terminator */ 207 208 if dimension_number < ndims then 209 declaration = declaration || ","; 210 else declaration = declaration || ")"; 211 212 end; 213 214 end; 215 216 dcl desc_ptr ptr; /* pointer to Multics descriptor (input) */ 217 218 declare declaration char (120) varying;/* This variable used to build return declaration */ 219 declare type fixed bin; /* descriptor type */ 220 declare unaligned bit (1) aligned; /* indicates unaligned ("1"b) or aligned ("0"b) */ 221 declare ndims fixed bin; /* number dimensions ; must be zero for dbm version 1 */ 222 declare size fixed bin; /* char string size or arithmetic precision */ 223 declare scale fixed bin; /* arithmetic scale factor */ 224 225 declare data_type (1:63) char (28) varying internal static options (constant) initial ( 226 "real fixed binary", "real fixed binary", "real float binary", "real float binary", /* 1 - 4 */ 227 "complex fixed binary", "complex fixed binary", "complex float binary", "complex float binary", /* 5 - 8 */ 228 "real fixed decimal", "real float decimal", "complex fixed decimal", "complex float decimal", /* 9 - 12 */ 229 "pointer", "offset", "label", "entry", /* 13 - 16 */ 230 "structure", "area", "bit", "bit", /* 17 - 20 */ 231 "character", "character", "file", /* 21 - 23 */ 232 (5) ("Unused data type"), /* 24 - 28 */ 233 (2) ("real fixed decimal"), /* 29 - 30 */ 234 (2) ("Unused data type"), /* 31 - 32 */ 235 (2) ("real unsigned fixed binary"), /* 33 - 34 */ 236 "real unsigned fixed decimal", /* 35 */ 237 "real fixed decimal", /* 36 */ 238 "Unused data type",/* 37 */ 239 "real unsigned fixed decimal", /* 38 */ 240 "real fixed decimal", /* 39 */ 241 "Unused data type",/* 40 */ 242 (2) ("real fixed decimal", "real float decimal"), /* 41 - 44 */ 243 "complex fixed decimal", "complex float decimal", /* 45 - 46 */ 244 (17) ("Unused data type")); /* 47 - 63 */ 245 246 declare comment (1:63) char (40) varying internal static options (constant) initial ( 247 (8) (""), /* 1 - 8 */ 248 (2) (" /* leading sign 9-bit */", " /* 9-bit */"), /* 9 - 12 */ 249 (16) (""), /* 13 - 28 */ 250 " /* leading overpunched sign 9-bit */", /* 29 */ 251 " /* trailing overpunched sign 9-bit */", /* 30 */ 252 (4) (""), /* 31 - 34 */ 253 " /* 9-bit */", /* 35 */ 254 " /* trailing sign 9-bit */", /* 36 */ 255 "", " /* 4-bit */",/* 37 - 38 */ 256 " /* trailing sign 4-bit */", /* 39 */ 257 "", " /* leading sign 4-bit */", " /* 4-bit */", /* 40 - 42 */ 258 " /* leading sign 4-bit byte-aligned */", /* 43 */ 259 " /* 4-bit byte-aligned */", /* 44 */ 260 " /* leading sign 4-bit byte-aligned */", /* 45 */ 261 " /* 4-bit byte-aligned */", /* 46 */ 262 (17) ("")); /* 47 - 63 */ 263 264 declare (ltrim, index, addrel, char) builtin; 265 declare decode_descriptor_ entry (ptr, fixed bin, fixed bin, bit (1) aligned, fixed bin, fixed bin, fixed bin); 266 declare new_format_descriptor bit (1) unal based (desc_ptr); /* version bit of descriptor is first */ 267 declare dimension_number fixed bin; /* number of current dimension */ 268 declare offset fixed bin; /* number of words past desc_ptr, to get array bound */ 269 declare (lower_bound, upper_bound) fixed bin (35) based; /* overlays for array bound info */ 270 declare (vrmu_data_class$number, 271 vrmu_data_class$fixed) entry (ptr) returns (bit (1) aligned); /* decides if data in entries class */ 272 273 end vrmu_display_descriptor; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/21/84 0934.1 vrmu_display_descriptor.pl1 >special_ldd>online>mrds_install>vrmu_display_descriptor.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. addrel builtin function dcl 264 ref 202 204 char builtin function dcl 264 ref 140 145 157 176 202 204 comment 000000 constant varying char(40) initial array dcl 246 ref 120 data_type 001265 constant varying char(28) initial array dcl 225 ref 87 declaration 000100 automatic varying char(120) dcl 218 set ref 81* 87* 89 101* 101 103* 103 112* 112 120* 120 128 139* 139 140* 140 144* 144 145* 145 148* 148 156* 156 157* 157 158* 158 162* 162 164* 164 175* 175 176* 176 177* 177 178* 178 180* 180 192* 192 202* 202 203* 203 204* 204 208* 208 210* 210 decode_descriptor_ 000010 constant entry external dcl 265 ref 77 desc_ptr parameter pointer dcl 216 set ref 38 77* 98 112 137* 142* 172 202 204 dimension_number 000144 automatic fixed bin(17,0) dcl 267 set ref 196* 198 208* index builtin function dcl 264 ref 89 lower_bound based fixed bin(35,0) dcl 269 ref 202 ltrim builtin function dcl 264 ref 140 145 157 176 202 204 ndims 000141 automatic fixed bin(17,0) dcl 221 set ref 77* 109 196 208 new_format_descriptor based bit(1) unaligned dcl 266 ref 98 112 172 offset 000145 automatic fixed bin(17,0) dcl 268 set ref 198* 202 204 scale 000143 automatic fixed bin(17,0) dcl 223 set ref 77* 145 size 000142 automatic fixed bin(17,0) dcl 222 set ref 77* 140 157 176 178 type 000137 automatic fixed bin(17,0) dcl 219 set ref 77* 81 81 87 120 154 154 162 162 164 164 170 unaligned 000140 automatic bit(1) dcl 220 set ref 77* 101 upper_bound based fixed bin(35,0) dcl 269 ref 204 vrmu_data_class$fixed 000014 constant entry external dcl 270 ref 142 vrmu_data_class$number 000012 constant entry external dcl 270 ref 137 NAMES DECLARED BY EXPLICIT CONTEXT. add_dimension 003147 constant entry internal dcl 188 ref 114 add_specifics 002526 constant entry internal dcl 130 ref 94 vrmu_display_descriptor 002326 constant entry external dcl 38 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3420 3436 3342 3430 Length 3616 3342 16 144 55 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vrmu_display_descriptor 152 external procedure is an external procedure. add_specifics internal procedure shares stack frame of external procedure vrmu_display_descriptor. add_dimension internal procedure shares stack frame of external procedure vrmu_display_descriptor. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vrmu_display_descriptor 000100 declaration vrmu_display_descriptor 000137 type vrmu_display_descriptor 000140 unaligned vrmu_display_descriptor 000141 ndims vrmu_display_descriptor 000142 size vrmu_display_descriptor 000143 scale vrmu_display_descriptor 000144 dimension_number vrmu_display_descriptor 000145 offset vrmu_display_descriptor THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry set_cs_eis index_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. decode_descriptor_ vrmu_data_class$fixed vrmu_data_class$number NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 38 002322 77 002333 81 002357 87 002372 89 002402 94 002413 98 002414 101 002427 103 002445 109 002457 112 002462 114 002477 120 002500 128 002516 130 002526 137 002527 139 002544 140 002556 142 002612 144 002630 145 002637 148 002673 150 002702 154 002703 156 002710 157 002722 158 002756 162 002765 164 003005 167 003023 170 003024 172 003026 175 003036 176 003050 177 003104 178 003116 180 003134 186 003146 188 003147 192 003150 196 003162 198 003171 202 003174 203 003234 204 003243 208 003304 210 003317 212 003326 214 003330 ----------------------------------------------------------- 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