|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 4608 (0x1200) Types: TextFile Names: »tctrace «
└─⟦cde9d517b⟧ Bits:30007477 RC8000 Backup tape fra HT's bus-radio system └─⟦6a563b143⟧ └─ ⟦this⟧ »tctrace « └─⟦110021343⟧ Bits:30007476 RC8000 Backup tape fra HT's bus-radio system └─⟦a957ba283⟧ └─ ⟦this⟧ »tctrace «
; *** tctrace *** ; ; ; program for analyzing testoutput begin zone z(128,1,eof); integer i,file,b,wanted,filesize,oldtime,olduser,rest,kind,size; integer field h,u,f; real array arr(1:2); integer array tail(1:10); real time,r; boolean startup; procedure eof(z,s,b); zone z; integer s,b; begin setposition(z,0,1); s:=0; b:=0; startup:=false; end eof; procedure callerror(errorno); integer errorno; begin write(out,<:<10>***trace :>, case errorno of (<:sizeparam illegal:>, <:call:>),<:<10>:>); goto abend; end callerror; procedure writechar(char); integer char; begin outchar(out,char); if char=10 then write(out,false add 32,26); end writechar; procedure printrecord; begin outchar(out,if rest=510 then 62 else 32); if kind > 0 and kind <= 30 then write(out,case kind of ( <:sign.:>, <:wait.:>, <:signc:>, <:waitc:>, <:insp.:>, <:inspc:>, <:delay:>, <:pass.:>, <:csndm:>, <:cwans:>, <:cwmes:>, <:ssndm:>, <:swmes:>, <:cregr:>, <:sregr:>, <:00016:>, <:messc:>, <:00018:>, <:answc:>, <:exit.:>, <:impas:>, <:stop.:>, <: op:>, <:coru :>, <:sem :>, <:semch:>, <:00027:>, <:00028:>, <:00029:>, <:00030:>), <: :>) else write(out,<<zdddd>,kind,<: :>); write(out,<<ddddd.ddd>,z.h/1000,<<-dddddd>,z.u); if kind=0 then begin write(out,false add 32,3); for f:=6 step 2 until size-2 do begin writechar(z.f shift (-16)); writechar(z.f shift (-8) extract 8); writechar(z.f extract 8); end; end else begin for f:=6 step 2 until size-2 do begin write(out,<<-ddddddd>,z.f); if (f-4) mod 24 = 0 then write(out,false add 10,1,false add 32,20); end; end; outchar(out,10); end printrecord; if system(4,2,arr) <> 8 shift 12 + 4 then callerror(1); wanted:=arr(1); if system(4,1,arr) <> 4 shift 12 + 10 then callerror(2); i:=1; open(z,4,string arr(increase(i)),1 shift 18); monitor(42,z,0,tail); filesize:=tail(1); systime(1,0,time); write(out,<:<10>testoutput from :>); for i:=0 step 1 until 10 do outchar(out,arr(i//6+1) shift (-40+(i mod 6)*8) extract 8); write(out,<: :>,<< dd dd dd>,systime(4,time,r),r,<:<10><10>:>); u:=4; h:=2; oldtime:=0; olduser:=-1; for rest:=inrec6(z,2) while rest > 0 and z.h > 0 do begin size:=z.h shift (-12) extract 12; kind:=z.h extract 12; inrec6(z,size-2); oldtime:=z.h; printrecord; end; write(out,<:<10><10>end of fixed part<12><10>:>); setposition(z,0,1); inrec6(z,4); if z.u-oldtime < 2000 then startup:=true else startup:=false; setposition(z,0,1); for i:=0 while true do begin rest:=inrec6(z,2); if z.h = -2 then begin inrec6(z,rest); inrec6(z,2); goto startfound; end else if z.h = -1 then begin inrec6(z,rest); end else begin size:=z.h shift (-12) extract 12; if size-2 > rest or size-2 < 4 then begin inrec6(z,rest); goto nextsegm; end; inrec6(z,size-2); if z.h < oldtime then goto startfound; oldtime:=z.h; end; nextsegm: end; startfound: getposition(z,file,b); if wanted >= filesize then wanted:=filesize-1; b:=b-wanted; if b < 1 then begin if startup then begin wanted:=wanted+b-1; b:=1; end else b:=b+filesize-1; end; setposition(z,file,b); write(out,<:startsegment: :>,<<ddd>,b,<:<10><10>:>);; oldtime:=0; i:=0; for i:=i while i < wanted do begin rest:=inrec6(z,2); if z.h = -2 then goto stop; if z.h < 1 then begin inrec6(z,rest); i:=i+1; goto nextrecord; end; size:=z.h shift (-12) extract 12; kind:=z.h extract 12; if size-2 > rest or size-2 < 4 then begin getposition(z,file,b); write(out,<:***troubles on segment: :>,b,<: size: :>,size,<:<10>:>); inrec6(z,rest); goto nextrecord; i:=i+1; end; inrec6(z,size-2); if z.h < oldtime then goto stop else oldtime:=z.h; if z.u <> olduser then outchar(out,10); olduser:=z.u; printrecord; nextrecord: end; stop: getposition(z,file,b); write(out,<:<10>endsegment: :>,<<ddd>,b,<:<10>:>); close(z,true); abend: end ▶EOF◀