COMPILATION LISTING OF SEGMENT gcos_read_line_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/19/82 1014.8 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 gcos_read_line_: proc (a_line_ptr, a_line_len, a_data_type, a_eof, a_code); 12 13 14 15 /* DECLARATIONS */ 16 /* ------------ */ 17 18 19 /* fixed bin */ 20 /* ----- --- */ 21 22 dcl ( 23 a_line_len, /* length of read line in words (argument) */ 24 i, /* loop index */ 25 j, /* word count from ios_$read call */ 26 junk (14) /* buffer for ios_$read call */ 27 ) fixed bin aligned; 28 29 dcl ( 30 a_code /* error code (argument) */ 31 )fixed bin (35) aligned; 32 33 34 /* bit strings */ 35 /* --- ------- */ 36 37 dcl ( 38 a_data_type, /* 1 = bcd, 2 = binary (argument) */ 39 a_eof, /* ON when eof is encountered (argument) */ 40 a_input_is_a_file /* ON when input is a file (argument) */ 41 ) bit (1) aligned; 42 43 dcl ( 44 record_hdr /* record header from imcv format */ 45 ) bit (12) aligned; 46 47 dcl status_bits bit (72) aligned; /* returned status from ios_ */ 48 49 50 /* pointers */ 51 /* -------- */ 52 53 dcl ( 54 a_line_ptr, /* pointer to read line (argument) */ 55 line_ptr, /* pointer to read line (internal) */ 56 rh_ptr, /* pointer to record header data */ 57 sp /* pointer to status returned from ios_ */ 58 ) ptr aligned; 59 60 61 /* built in functions */ 62 /* ----- -- --------- */ 63 64 dcl ( 65 addr, 66 null, 67 substr 68 ) builtin; 69 70 71 /* masks */ 72 /* ----- */ 73 74 dcl 1 record_hdr_mask aligned based (rh_ptr), /* for looking at record header */ 75 2 pad bit (2) unaligned, 76 2 media_code bit (4) unaligned; 77 78 dcl 1 status aligned based (sp), /* ios_ status mask */ 79 2 scode fixed bin (35) aligned; /* error code portion */ 80 81 dcl line bit (a_line_len*36) aligned based (line_ptr); /* for returning read line as bit string */ 82 83 84 /* external entries */ 85 /* -------- ------- */ 86 87 dcl gcos_gsr_read_ ext entry 88 (char (*) aligned, ptr aligned, fixed bin aligned, bit (12) aligned, bit (1) aligned, fixed bin (35) aligned); 89 90 dcl gcos_gsr_read_$gsr_read_init ext entry 91 (char (*) aligned, fixed bin (35) aligned); 92 93 dcl ios_$read ext entry 94 (char (*) aligned, ptr aligned, fixed bin aligned, fixed bin aligned, fixed bin aligned, bit (72) aligned); 95 96 /* */ 97 98 rh_ptr = addr (record_hdr); /* pointer to record header data */ 99 sp = addr (status_bits); /* pointer to status returned from ios_ */ 100 call gcos_gsr_read_ ("input_stream", line_ptr, a_line_len, record_hdr, a_eof, a_code); /* read a line */ 101 if a_code ^= 0 102 then return; 103 104 if a_eof /* an end of file was encountered */ 105 then do; 106 line_ptr = null; /* return appropriate arguments */ 107 a_line_len = 0; 108 return; 109 end; 110 111 a_line_ptr -> line = line; /* return line as bit string */ 112 113 if media_code = "0010"b /* bcd line */ 114 then a_data_type = "1"b; 115 else /* binary line */ 116 a_data_type = "0"b; 117 118 return; 119 120 121 122 read_line_init: entry (a_input_is_a_file, a_code); 123 124 rh_ptr = addr (record_hdr); /* pointer to record header data */ 125 sp = addr (status_bits); /* pointer to status returned from ios_ */ 126 call gcos_gsr_read_$gsr_read_init ("input_stream", a_code); 127 if a_code = 0 /* successful initialization */ 128 then if ^a_input_is_a_file /* input is system standard tape */ 129 then do i = 1 to 2; /* get rid of tape label, tape mark */ 130 call ios_$read ("input_stream", addr (junk (1)), 0, 14, j, status_bits); 131 if substr (status_bits, 1, 3) ^= "100"b /* not an EOF mark */ 132 then if scode ^= 0 /* actual error */ 133 then do; 134 a_code = scode; /* return error code */ 135 return; 136 end; 137 end; 138 139 return; 140 141 142 143 end gcos_read_line_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/19/82 0934.5 gcos_read_line_.pl1 >spec>on>11/19/82>gcos_read_line_.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. a_code parameter fixed bin(35,0) dcl 29 set ref 11 100* 101 122 126* 127 134* a_data_type parameter bit(1) dcl 37 set ref 11 113* 115* a_eof parameter bit(1) dcl 37 set ref 11 100* 104 a_input_is_a_file parameter bit(1) dcl 37 ref 122 127 a_line_len parameter fixed bin(17,0) dcl 22 set ref 11 100* 107* 111 111 a_line_ptr parameter pointer dcl 53 ref 11 111 addr builtin function dcl 64 ref 98 99 124 125 130 130 gcos_gsr_read_ 000010 constant entry external dcl 87 ref 100 gcos_gsr_read_$gsr_read_init 000012 constant entry external dcl 90 ref 126 i 000100 automatic fixed bin(17,0) dcl 22 set ref 127* ios_$read 000014 constant entry external dcl 93 ref 130 j 000101 automatic fixed bin(17,0) dcl 22 set ref 130* junk 000102 automatic fixed bin(17,0) array dcl 22 set ref 130 130 line based bit dcl 81 set ref 111* 111 line_ptr 000124 automatic pointer dcl 53 set ref 100* 106* 111 media_code 0(02) based bit(4) level 2 packed unaligned dcl 74 ref 113 null builtin function dcl 64 ref 106 record_hdr 000120 automatic bit(12) dcl 43 set ref 98 100* 124 record_hdr_mask based structure level 1 dcl 74 rh_ptr 000126 automatic pointer dcl 53 set ref 98* 113 124* scode based fixed bin(35,0) level 2 dcl 78 ref 131 134 sp 000130 automatic pointer dcl 53 set ref 99* 125* 131 134 status based structure level 1 dcl 78 status_bits 000122 automatic bit(72) dcl 47 set ref 99 125 130* 131 substr builtin function dcl 64 ref 131 NAMES DECLARED BY EXPLICIT CONTEXT. gcos_read_line_ 000022 constant entry external dcl 11 read_line_init 000136 constant entry external dcl 122 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 346 364 265 356 Length 536 265 16 135 61 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME gcos_read_line_ 125 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gcos_read_line_ 000100 i gcos_read_line_ 000101 j gcos_read_line_ 000102 junk gcos_read_line_ 000120 record_hdr gcos_read_line_ 000122 status_bits gcos_read_line_ 000124 line_ptr gcos_read_line_ 000126 rh_ptr gcos_read_line_ 000130 sp gcos_read_line_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. gcos_gsr_read_ gcos_gsr_read_$gsr_read_init ios_$read NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000015 98 000032 99 000034 100 000036 101 000076 104 000100 106 000104 107 000106 108 000107 111 000110 113 000120 115 000130 118 000131 122 000132 124 000146 125 000150 126 000152 127 000173 130 000206 131 000252 134 000260 135 000261 137 000262 139 000264 ----------------------------------------------------------- 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