COMPILATION LISTING OF SEGMENT copy_dump_seg_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1726.8 mst Mon 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 copy_dump_seg_: proc (segno, cur_proc_ind, p_array, l_array, outptr, retlen); 12 13 /* Converted to 6180 and v2pl1 by R. Mullen Feb 1973 */ 14 /* modified 11/14/80 by J. A. Bush for the DPS8/70M CPU */ 15 16 dcl (segno, cur_proc_ind) fixed bin, /* Parameters */ 17 retlen fixed bin (19), 18 (p_array ptr, 19 l_array fixed bin (19)) (0:31), 20 outptr ptr; 21 22 dcl (orig, next_orig) fixed bin (35); 23 24 dcl (i, l, n, len, nsegs, idx, off, /* Misc variables */ 25 next_off, seg_no, cpi, segn) fixed bin, 26 (outp, p) ptr; 27 28 dcl hcs_$get_max_length_seg entry (ptr, fixed bin (19), fixed bin (35)); 29 dcl hcs_$truncate_seg entry (ptr, fixed bin, fixed bin (35)); 30 dcl (addrel, divide, fixed, mod) builtin; 31 32 dcl array (n) fixed bin (35) based; 33 dcl wps fixed bin (19); 1 1 /* BEGIN INCLUDE FILE ... bos_dump.incl.pl1 ... */ 1 2 /* Modified 1 September 1976 */ 1 3 /* Modified 11/11/80 by J. A. Bush for the DPS8/70M CPU */ 1 4 /* Modified 6/12/81 by Rich Coppola to extend the dps8 extended fault reg to 1 5* 15 bits */ 1 6 /* Modified 02/23/81, W. Olin Sibert, to describe old and new FDUMP styles */ 1 7 1 8 1 9 dcl dumpptr ptr; /* pointer to following structure */ 1 10 1 11 dcl 1 dump based (dumpptr) aligned, /* header of dump by fdump */ 1 12 2 dump_header aligned like dump_header, 1 13 1 14 2 segs (1008), /* segment array */ 1 15 3 segno bit (18) unal, /* segment number */ 1 16 3 length bit (18) unal, /* length of segment in sector sized blocks */ 1 17 1 18 2 amptwregs (0 : 63) bit (36), /* assoc. mem. page table word regs */ 1 19 2 amptwptrs (0 : 63) bit (36), /* assoc. mem. page table word pointers */ 1 20 2 amsdwregs (0 : 63) bit (72), /* assoc. mem. segment descriptor word registers */ 1 21 2 amsdwptrs (0 : 63) bit (36), /* assoc. mem. segment descriptor word pointers */ 1 22 1 23 2 ouhist (0 : 63) bit (72), /* operations unit history registers */ 1 24 2 cuhist (0 : 63) bit (72), /* control unit history registers */ 1 25 2 duhist (0 : 63) bit (72), /* decimal unit history registers */ 1 26 2 auhist (0 : 63) bit (72), /* appending unit history registers */ 1 27 1 28 2 prs (0 : 7) ptr, /* pointer registers */ 1 29 1 30 2 regs aligned like dump_registers, /* assorted machine registers */ 1 31 1 32 2 low_order_port bit (3), /* from which clock is read */ 1 33 2 pad4 bit (36), 1 34 2 mctime fixed bin (52), /* time conditions were taken */ 1 35 2 pad5 (0 : 3) bit (36), 1 36 1 37 2 misc_registers like dump_misc_registers, /* Assorted registers & processor data */ 1 38 1 39 2 ptrlen (0 : 7) bit (36), /* pointers and lengths for EIS */ 1 40 1 41 2 coreblocks (0 : 7), 1 42 3 num_first bit (18) unal, /* first addr in coreblock */ 1 43 3 num_blocks bit (18) unal, /* number of blocks used */ 1 44 2 pad7 (112) fixed bin; 1 45 1 46 1 47 dcl 1 dump_header aligned based, /* Standard header for FDUMP */ 1 48 2 words_dumped fixed bin (35), /* total words in dump */ 1 49 2 valid bit (1), /* = 1 if there is a 6180 dump to be had */ 1 50 2 time fixed bin (71), /* time of dump */ 1 51 2 erfno fixed bin (18), /* Error Report Form Number */ 1 52 2 num_segs fixed bin, /* number of segments dumped */ 1 53 2 valid_355 bit (1), /* = 1 if there is a dn355 dump to be had */ 1 54 2 dumped_355s bit (4), /* indicates which 355s were dumped */ 1 55 2 time_355 fixed bin (71), /* time of 355 dump */ 1 56 2 version fixed bin, /* currently 2 */ 1 57 2 pad0 (5) fixed bin; /* pad0 to 16 words */ 1 58 1 59 dcl 1 dump_registers aligned based, /* Standard (SREG) arrangement of registers in dump */ 1 60 (2 x (0 : 7) bit (18), /* index registers */ 1 61 2 a bit (36), /* the a register */ 1 62 2 q bit (36), /* the q register */ 1 63 2 e bit (8), /* the e register */ 1 64 2 pad2 bit (28), /* pad */ 1 65 2 t bit (27), /* timer register */ 1 66 2 pad3 bit (6), /* pad */ 1 67 2 ralr bit (3)) unaligned; /* ring alarm register */ 1 68 1 69 dcl 1 dump_misc_registers aligned based, 1 70 2 scu (0 : 7) bit (36), /* from store control unit instr. */ 1 71 2 mcm (0 : 7) bit (72), /* memory controller masks every 64 K */ 1 72 2 dbr bit (72), /* descriptor segment base register */ 1 73 2 intrpts bit (36), /* interrupts */ 1 74 2 bar bit (36), /* base address register */ 1 75 2 modereg bit (36), /* mode register */ 1 76 2 cmodereg bit (36), /* cache mode register */ 1 77 2 faultreg bit (36), /* fault register */ 1 78 2 ext_fault_reg bit (15) unaligned, /* DPS8 extended fault register */ 1 79 2 pad6 bit (21) unaligned; 1 80 1 81 1 82 1 83 dcl 1 v1_dump aligned based (dumpptr), /* Old version of FDUMP (pre March, 1981) */ 1 84 2 dump_header aligned like dump_header, 1 85 1 86 2 segs (688), /* segment array */ 1 87 3 segno bit (18) unal, /* segment number */ 1 88 3 length bit (18) unal, /* length of segment in sector sized blocks */ 1 89 1 90 2 amsdwregs (0 : 15) bit (72), /* assoc. mem. segment descriptor word registers */ 1 91 2 amsdwptrs (0 : 15) bit (36), /* assoc. mem. segment descriptor word pointers */ 1 92 2 amptwregs (0 : 15) bit (36), /* assoc. mem. page table word regs */ 1 93 2 amptwptrs (0 : 15) bit (36), /* assoc. mem. page table word pointers */ 1 94 2 pad1 (0 : 15) bit (36), 1 95 1 96 2 ouhist (0 : 15) bit (72), /* operations unit history registers */ 1 97 2 cuhist (0 : 15) bit (72), /* control unit history registers */ 1 98 2 auhist (0 : 15) bit (72), /* appending unit history registers */ 1 99 2 duhist (0 : 15) bit (72), /* decimal unit history registers */ 1 100 1 101 2 prs (0 : 7) ptr, /* pointer registers */ 1 102 1 103 2 regs aligned like dump_registers, /* assorted machine registers */ 1 104 1 105 2 mctime fixed bin (52), /* time conditions were taken */ 1 106 2 pad4 (0 : 5) bit (36), 1 107 1 108 2 misc_registers aligned like dump_misc_registers, /* Assorted registers */ 1 109 1 110 2 pad5 bit (36), 1 111 2 ptrlen (0 : 7) bit (36), /* pointers and lengths for EIS */ 1 112 2 pad6 (15) bit (36), 1 113 2 low_order_port bit (3), /* from which clock was read */ 1 114 1 115 2 coreblocks (0 : 7), 1 116 3 num_first bit (18) unal, /* first addr in coreblock */ 1 117 3 num_blocks bit (18) unal; /* number of blocks used */ 1 118 1 119 1 120 dcl DUMP_VERSION_1 fixed bin internal static options (constant) init (1); 1 121 dcl DUMP_VERSION_2 fixed bin internal static options (constant) init (2); 1 122 1 123 /* END INCLUDE FILE ... bos_dump.incl.pl1 ... */ 34 35 /* 36* Copy args first, then lookup segment # in image index */ 37 dumpptr = p_array (0); 38 outp = outptr; 39 seg_no = segno; 40 cpi = cur_proc_ind; 41 call hcs_$get_max_length_seg (dumpptr, wps, orig); 42 if orig ^= 0 then go to err; 43 44 nsegs = dumpptr -> dump.num_segs; 45 orig = size (dump); /* account for two page header */ 46 i = 1; 47 48 find_proc: if i = cpi then go to find_seg; 49 orig = orig + fixed (dumpptr -> dump.segs (i).length, 18) * 64; 50 i = i + 1; 51 go to find_proc; 52 53 find_seg: do i = cpi to nsegs; 54 segn = fixed (dumpptr -> dump.segs (i).segno, 18); 55 if segn = 0 /* Segment 0 is flag for new process */ 56 then if i ^= cpi 57 then go to err; /* Insure that we stay within the current process */ 58 if segn = seg_no /* See if we've found desired seg */ 59 then go to copy; 60 orig = orig + fixed (dumpptr -> dump.segs (i).length, 18) * 64; /* increment orig to next seg */ 61 end; /* and look at next seg */ 62 63 err: retlen = 0; /* error, can't find segment */ 64 return; 65 66 copy: 67 if i ^= nsegs /* If last seg of dump, use dump length */ 68 then next_orig = fixed (dumpptr -> dump.segs (i).length, 18) * 64 + orig; 69 else next_orig = fixed (dumpptr -> dump.words_dumped, 35); 70 len = next_orig - orig; 71 if len <= 0 72 then go to err; /* Something messed up, return 0 */ 73 /* Length dumped is difference between current and next seg origins */ 74 idx = divide (orig, wps, 17, 0); /* Get image-index for first word */ 75 off = mod (orig, wps); /* And offset within the image segment */ 76 p = p_array (idx); 77 l = l_array (idx) * 1024; 78 next_off = len + off; /* For checking bounds on seg */ 79 call hcs_$truncate_seg (outp, 0, orig); /* Truncate output segment */ 80 if next_off <= wps /* Does seg cross boundaries of image seg? */ 81 then do; /* No, copy directly */ 82 83 /* Since image is zero-suppressed from the end, can't run into trailing zeroes problem here */ 84 n = len; /* Set arg for move operation */ 85 outp -> array = addrel (p, off) -> array; /* Copy array */ 86 end; 87 88 else do; 89 n = l - off; /* If zeroes near the boundary, may get bounds fault */ 90 if n > 0 /* May be leading zeroes */ 91 then outp -> array = addrel (p, off) -> array; /* Very similar */ 92 outp = addrel (outp, (wps - off)); /* Advance "outp" regardless of "l" */ 93 n = next_off - wps; /* Calculate second part */ 94 outp -> array = p_array (idx + 1) -> array; 95 end; 96 retlen = len; /* Finished */ 97 end copy_dump_seg_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1516.3 copy_dump_seg_.pl1 >dumps>old>recomp>copy_dump_seg_.pl1 34 1 08/12/81 2025.8 bos_dump.incl.pl1 >ldd>include>bos_dump.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. addrel builtin function dcl 30 ref 85 90 92 array based fixed bin(35,0) array dcl 32 set ref 85* 85 90* 90 94* 94 cpi 000113 automatic fixed bin(17,0) dcl 24 set ref 40* 48 53 55 cur_proc_ind parameter fixed bin(17,0) dcl 16 ref 11 40 divide builtin function dcl 30 ref 74 dump based structure level 1 dcl 1-11 ref 45 dump_header based structure level 1 dcl 1-47 in procedure "copy_dump_seg_" dump_header based structure level 2 in structure "dump" dcl 1-11 in procedure "copy_dump_seg_" dump_misc_registers based structure level 1 dcl 1-69 dump_registers based structure level 1 dcl 1-59 dumpptr 000124 automatic pointer dcl 1-9 set ref 37* 41* 44 45 49 54 60 66 69 fixed builtin function dcl 30 ref 49 54 60 66 69 hcs_$get_max_length_seg 000010 constant entry external dcl 28 ref 41 hcs_$truncate_seg 000012 constant entry external dcl 29 ref 79 i 000102 automatic fixed bin(17,0) dcl 24 set ref 46* 48 49 50* 50 53* 54 55 60* 66 66 idx 000107 automatic fixed bin(17,0) dcl 24 set ref 74* 76 77 94 l 000103 automatic fixed bin(17,0) dcl 24 set ref 77* 89 l_array parameter fixed bin(19,0) array dcl 16 ref 11 77 len 000105 automatic fixed bin(17,0) dcl 24 set ref 70* 71 78 84 96 length 20(18) based bit(18) array level 3 packed unaligned dcl 1-11 ref 49 60 66 mod builtin function dcl 30 ref 75 n 000104 automatic fixed bin(17,0) dcl 24 set ref 84* 85 89* 90 90 93* 94 next_off 000111 automatic fixed bin(17,0) dcl 24 set ref 78* 80 93 next_orig 000101 automatic fixed bin(35,0) dcl 22 set ref 66* 69* 70 nsegs 000106 automatic fixed bin(17,0) dcl 24 set ref 44* 53 66 num_segs 5 based fixed bin(17,0) level 3 dcl 1-11 ref 44 off 000110 automatic fixed bin(17,0) dcl 24 set ref 75* 78 85 89 90 92 orig 000100 automatic fixed bin(35,0) dcl 22 set ref 41* 42 45* 49* 49 60* 60 66 70 74 75 79* outp 000116 automatic pointer dcl 24 set ref 38* 79* 85 90 92* 92 94 outptr parameter pointer dcl 16 ref 11 38 p 000120 automatic pointer dcl 24 set ref 76* 85 90 p_array parameter pointer array dcl 16 ref 11 37 76 94 retlen parameter fixed bin(19,0) dcl 16 set ref 11 63* 96* seg_no 000112 automatic fixed bin(17,0) dcl 24 set ref 39* 58 segn 000114 automatic fixed bin(17,0) dcl 24 set ref 54* 55 58 segno 20 based bit(18) array level 3 in structure "dump" packed unaligned dcl 1-11 in procedure "copy_dump_seg_" ref 54 segno parameter fixed bin(17,0) dcl 16 in procedure "copy_dump_seg_" ref 11 39 segs 20 based structure array level 2 dcl 1-11 words_dumped based fixed bin(35,0) level 3 dcl 1-11 ref 69 wps 000122 automatic fixed bin(19,0) dcl 33 set ref 41* 74 75 80 92 93 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DUMP_VERSION_1 internal static fixed bin(17,0) initial dcl 1-120 DUMP_VERSION_2 internal static fixed bin(17,0) initial dcl 1-121 v1_dump based structure level 1 dcl 1-83 NAMES DECLARED BY EXPLICIT CONTEXT. copy 000141 constant label dcl 66 ref 58 copy_dump_seg_ 000021 constant entry external dcl 11 err 000136 constant label dcl 63 ref 42 55 71 find_proc 000064 constant label dcl 48 ref 51 find_seg 000101 constant label dcl 53 ref 48 NAME DECLARED BY CONTEXT OR IMPLICATION. size builtin function ref 45 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 354 370 306 364 Length 552 306 14 145 46 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME copy_dump_seg_ 97 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME copy_dump_seg_ 000100 orig copy_dump_seg_ 000101 next_orig copy_dump_seg_ 000102 i copy_dump_seg_ 000103 l copy_dump_seg_ 000104 n copy_dump_seg_ 000105 len copy_dump_seg_ 000106 nsegs copy_dump_seg_ 000107 idx copy_dump_seg_ 000110 off copy_dump_seg_ 000111 next_off copy_dump_seg_ 000112 seg_no copy_dump_seg_ 000113 cpi copy_dump_seg_ 000114 segn copy_dump_seg_ 000116 outp copy_dump_seg_ 000120 p copy_dump_seg_ 000122 wps copy_dump_seg_ 000124 dumpptr copy_dump_seg_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return mod_fx1 ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$get_max_length_seg hcs_$truncate_seg NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000013 37 000026 38 000032 39 000035 40 000037 41 000041 42 000053 44 000055 45 000060 46 000062 48 000064 49 000067 50 000077 51 000100 53 000101 54 000110 55 000114 58 000121 60 000124 61 000134 63 000136 64 000140 66 000141 69 000154 70 000156 71 000164 74 000165 75 000170 76 000174 77 000202 78 000207 79 000212 80 000226 84 000231 85 000233 86 000244 89 000245 90 000250 92 000262 93 000267 94 000272 96 000302 97 000305 ----------------------------------------------------------- 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