pro dumps,log ;Created by C. See 14 Aug. 98 ;This program displays the memory dumps in a log. ;It defaults to the current log ;This procedure calls sstr.pro ;_________________________________________________________________________ ;Setup... cd,'',current=cdir & cd,cdir ;establishes cdir as current directory if n_params() eq 0 then log = cdir ;test for # of input parameters cd,log+'/DB/Dump' files=findfile('*', count = nfiles) n=0 Print,string(10B),'There are ',sstr(nfiles),' files in this Log.' Read,'Which do want to view (enter number, 1 thru nfiles)?: ',n ;_________________________________________________________________________ ;Read Data... d_read,files(n-1),h,p p=long(p) ;correct for rollover (neg values of p) s=size(where(p lt 0)) If s(0) ne 0 then $ p(where(p lt 0))=p(where(p lt 0))+65536 ;adds 0x10000 to neg values of p dump_start=d_value(h,176) dump_length=d_value(h,177) nlines=(fix(dump_length)/16) ;number of full lines of printout s=size(p) ;_________________________________________________________________________ ;Print to Screen... ;print 16 to a line (like the GSE)... print,string(10B),'Here is Dump #',sstr(n) for i=0,nlines-1 do begin print,dump_start+16*i,p(i*16:((i+1)*16)-1),format='("0x",z5," -> "16(1x,z4))' endfor if s(1) lt 16 then i=0 ;if there are no complete lines ;print the last few (for partial lines)... If 16*i le s(1)-1 then $ print,dump_start+16*i,p(i*16:s(1)-1),format='("0x",z5," -> "16(1x,z4))' cd,cdir end