" *********************************************************** " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " *********************************************************** " FDUMP " " FDUMP is called to make a fast dump into a special dump partition in " secondary storage. This dump will later be formated and printed on-line. " If FDUMP is called with an argument ( n ) n will become the next " erfnum - error report form number. No dump will be taken. " " Rewritten on 10/27/72 for the 6180 by Bill Silver. " Last modified 5/19/75 by N. I. Morris. name fdump tra start Jump to the start of program. include bosequ include apnd_equ include sstn_equ include bos_common include fdmp equ fdmp_buff,apnd_org-dmpbufl " " This is the start of the FDUMP program itself. start: stx2 X2_fdump Save return address. tsx2 initint Initialize interrupts and faults. arg return FDUMP does not handle execute interrupts. " If one is encountered we will just return. tsx2 init_io Initialize the IOM routines. tsx2 ttyinit Initialize the tty routines. FDUMP does not arg return expect any tty request interrupts. If one " is encountered we will just return. tsx2 cvinit Initialize secondary storage conversion " package. lda 1,dl Set the FDUMP switch in BOS common to sta com|fdump_state indicate that FDUMP has been entered. " Initialize the fdump package and read in the header. tsx2 fdmp_read_header arg =0 tra return " We now know that we can write into the dump partition. However, before we start " to set up the header and dump segments we must check to see if all we have to " do is set up a new Error Report Form Number. If the argument passed to FDUMP " was not null and was numeric, it will be used to set a new ERF #. ldx2 X2_fdump restore X2 lxl7 mem|0,2 Address of command input line in X7 eax6 0 initialize copy index ccline: lda mem|0,7 Copy words of input line. sta line,6 .. eax7 1,7 .. eax6 1,6 .. cmpx6 14,du Copy 14 words. tmi ccline .. tsx2 scan now, rescan the input line for arguments lda arg+1 Is argument = ( -1 ) ? tmi begin_dumping Yes, there is no new erfnum. tze set_new_erfnum If zero, use it to set new erfnum. lda darg+1 Non-zero. Get decimal conversion of number. tze begin_dumping If zero, then argument was not numeric. set_new_erfnum: sba 1,dl Decrement the new erfnum. sta hdr.erfnum Put new erfnum into the header. stz hdr.valid Set flag to indicate no dump to be picked up. " We can new write out the header with the new ERF number and exit. tsx2 fdmp_write_header Write out the header with the new erfnum. tra return lda =0,dl Indicate no fdump has been taken. sta com|fdump_state tra return " " Now we can begin the dump. First we will setup the header. Then we will call " proc so it can dump all the segments with W access in all of the processes. " When proc has finished or when an error causes proc to stop the header " will be written in the beginning of the dump partition and we will return. begin_dumping: lda =h apnd " apnd" in A eaq apnd_org origin of appending package in QU tsx2 ldcom load the appending package tra return .. ldaq com|dbr Set DBR for dumping. staq cmdbr eaa dmpbufl size of apnd buffer in AU tsx2 getinit Initialize the apending package. lda =h sstn Load SST name table filler. eaq sstn_org tsx2 ldcom tra *+2 If not found, don't execute it. tsx2 sstn_org Fill the SST name table. lda 2,dl Set FDUMP switch in BOS common to sta com|fdump_state indicate that FDUMP has begun the dump. lca 1,dl Set valid flag to indicate that dump sta hdr.valid not processed. ldaq com|mctime Set time of machine conditions. staq hdr.time stz hdr.num_segs No segments dumped yet. stz hdr.words_dumped No words dumped yet. eaa seg_array_size*4 Clear the seg array mlr (),(rl),fill(0) .. desc9a *,0 desc9a hdr.seg_array,au lda first_rnum get first record of dump partition adla (hdr_lth+d355_lth+page_size-1)/page_size,dl add # of records in header sta next_rnum set next record for dumping " Now print a message telling operator the erfnum of this dump. tsx2 erpt Print erfnum acc 'error report form number: # ^d' arg hdr.erfnum " Now call proc to dump the segments. The subroutines called by proc that are not " in the utility package must be supplied by FDUMP. Some of these just do an " immediate return. The subroutine segprint, however, does the actual dumping " of a segment. tsx2 proc Dump all of the W access segments of " all the processes. finish_up: tsx2 fdmp_write_header Write out the header now. tra return lda 3,dl Indicate normal completion of FDUMP. sta com|fdump_state return: X2_fdump: eax2 * Restore return address to SETUP. lca 1,dl No next command to chain to. tra mem|1,2 Return to SETUP. " " These subroutines are called by proc. However, they are not used by FDUMP. " Thus they will simply return to proc. printreg: descrseg: tra 0,2 Return to proc. " This subroutine is called by proc to print out a segment. It will " write the segment into the dump partition. The segment number being dumped " and the SDW for this segment are in segno and pcsdw. They were set up " by "proc". segprint: stx2 X2_segprint Save return address in proc. ldaq pcsdw Get SDW for this segment staq sdw and save it. " Check to see if SDW.ADDR = -1. If so we will ignore this segment. " Check high order bit to left of bound field, and ignore segment if ON. ars sdw.add_shift Right justify ADDR in A. If ADDR is neg cmpa =-1 it will fill with 1 bits. Is it -1? tze end_segment Yes, don't dump this segment. szn sdw+1 Is high order bit ON? tmi end_segment If so, ignore this segment. " Make sure we have enough room in the seg_array in the header. " Also get the address of the next entry. lda hdr.num_segs Get the number of the next entry. cmpa seg_array_size-1,dl Have we used all of the entries? tpl error_full_array Tra if YES. eax7 0,al Index to seg array entry in X7 stx7 entry_addr Save it. We need it later. " Increment the number of segments dumped field in the header. Also store the number " of this segment in its seg_array entry. The number of blocks dumped for this " segment will be initialized to zero. aos hdr.num_segs Up count of segments dumped. ldx6 segno Get segment number. stx6 hdr.seg_array,7 Store in seg_array entry. stz num_sectors_dumped No sectors dumped for this segment yet. stz offset Initialize word offset in segment. stz zero_sectors_tot " Get the number of pages in the segment and the number of sectors in the last page of " the segment. Note, both of these values will be one less than the actual value. ldq sdw+1 Get word 2 of SDW. anq sdw.bound,du Isolate BOUND field. qrl 3+18-4 Right justify BOUND field in A (3+18) and multiply by " 16 (-4) to get number of words (-16) in segment. div dmpbufl,dl divide by the block size stq num_blocks_seg quotient is number of blocks adla 16,dl remainder+16 is number of words in last block sta num_words_lblock .. " " Now we will process the segment block by block. We will search down from the end of each " block skipping all zero sectors. We will write the block from the beginning to the " end of the first (from the end) non-zero sector. The number of zero sectors " skipped will be remembered. If there is another non-zero block in the segment then the " zero sectors that were skipped will be written out. block_loop: stz zero_sectors_block Start out with no zero sectors at the end of the block. lda dmpbufl,dl Block size in AL. szn num_blocks_seg Is this the last block in the segment? tnz *+2 Tra if NO. lda num_words_lblock Get number of words in the last block. stca getl,07 Save for call to get. ldq offset Offset in QU. tsx2 get Fetch the block of words. arg sdw getl: zero fdmp_buff,*-* tra end_segment lda getl Get length of this block. ana -1,dl Remove extraneous information. eax6 0,al X6 is word index into block. adla sector_size-1,dl round up size to nearest sector arl sector_power compute number of sectors in the block. eax7 0,al X7 countains count of sectors in this block. " Now start testing one sector at a time. We want to know if the sector is all zeros. " We will start testing at the end of the sector. test_zero_loop: ldaq fdmp_buff-2,6 Test two words at a time. tnz non_zero_block We are done testing this block as soon as we find one " non zero word. eax6 -2,6 Set index for next word pair. canx6 sector_size-1,du Have we finished with sector? tnz test_zero_loop Has whole sector been tested? Tra if NO. " We have found a zero sector. aos zero_sectors_block Up count of zero sectors at the end of this block. eax7 -1,7 Decrement count of sectors in the block. tnz test_zero_loop Tra if there are still zeros we haven't tested. " This whole block is zero. We must add the number of sectors in the block to the total number " of sectors that we have already skipped. lda zero_sectors_block asa zero_sectors_tot tra end_block " We come here when we find a non-zero block. If any zero sectors have been skipped before " this block they must be written out first. Note, zero sectors at the front of the block " will be written out with the rest of the block. Any zero sectors at the end of the block " will not be written out now. non_zero_block: lxl6 zero_sectors_tot Were any sectors skipped before this block? tze write_block Tra if NO. " We must write out the zero sectors. mlr (),(),fill(0) Zero out one sector's worth of buffer. desc9a *,0 desc9a fdmp_buff,sector_size*4 write_zero_loop: eax7 1 Write 1 sector block at a time. tsx2 fdmp_write_data tra cleanup asx7 num_sectors_dumped lca 1,dl Count one sector written. asa zero_sectors_tot Have we written all the zero sectors? tnz write_zero_loop Tra if NO. tra block_loop Now process the non-zero block again. " Now write out the current block. write_block: tsx2 fdmp_write_data tra cleanup asx7 num_sectors_dumped lda zero_sectors_block Set up the total number of zero sectors skipped to be sta zero_sectors_tot the number that were skipped at the end of this block. " We have come to the end of a block. We have " to diddle the block count and the segment word offset. end_block: lca 1,dl Decrement number of blocks left in segment. asa num_blocks_seg .. tmi end_segment No more blocks? Tra if YES. Segment finished. ldx7 offset Increment segment word offset by block size. eax7 dmpbufl,7 stx7 offset tra block_loop Go process next block. " This is the end of the dump of this segment. We will set the number of blocks that were " dumped in the entry for this segment in the segment array table. end_segment: ldx7 entry_addr Get address of this entry. ldx6 num_sectors_dumped Get number of sectors actually dumped for this segment. sxl6 hdr.seg_array,7 Save in table entry. eaa 0,6 Sectors dumped in AU. arl 18-sector_power Words dumped in AL. asa hdr.words_dumped Add to total number of words in dump image. X2_segprint: tra * Return to caller. cleanup: asx7 num_sectors_dumped Update number of sector successfully dumped. eax2 finish_up Fudge the return address from segprint. stx2 X2_segprint .. tra end_segment Fill in the segment array and then quit. " " Error routines called by FDUMP. error_full_array: tsx2 erpt acc 'segment array full' stz com|inputsw tra finish_up " The following are the FDUMP data areas. even sdw: bss ,2 SDW of the segment to be dumped. segno: bss ,1 The number of the segment being dumped. (Left half) offset: bss ,1 Word offset within the segment. (Left half) " The following words are used to temporarily hold data while dumping a segment. num_blocks_seg: bss ,1 Number of blocks in a segment. num_words_lblock: bss ,1 Number of sectors in the last page of a segment. entry_addr: bss ,1 Saves the address of the seg_array entry. (Left half) num_sectors_dumped: bss ,1 Number of sectors of the segment " that have actually been dumped. zero_sectors_block: bss ,1 Number of zero sectors found at the end " of a block. zero_sectors_tot: bss ,1 Number of zero sectors skipped before " the current block. include proc include apte include state_equs include bos_sdw include aste include bos_tv end " " " ----------------------------------------------------------- " " " " 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 " "