Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/maint/sutgca.alg
There is 1 other file named sutgca.alg in the archive. Click here to see a list.
BEGIN
BOOLEAN STATUS;
EXTERNAL REAL PROCEDURE RF;
COMMENT
	SUBROUTINE RF(R,R1)
	R1=R
	RETURN
	END;
OUTPUT(4,"LPT");
SELECTOUTPUT(4);
INPUT(5,"DSK",11);
OPENFILE(5,"GCP");
SELECTINPUT(5);
BEGIN
INTEGER TID,ACKTID,NGC,L,BOT,TOP,LIM;
REAL TAU,KTAK,FTAK,LFTAK,RTAK,BTAK,R,ALFA;
REAL MR,SR,MK,SK,MDK,SDK,MB,SB,KL,SA,MA,SF,MF,RL,MDR,SDR;
INTEGER N;
REAL PROCEDURE INFLOAT(R); REAL R;
BEGIN INTEGER I; 
REAL R1;
INSYMBOL(I); 
CALL (RF,I,R1);
R:=R1;
INFLOAT:=R;
END;
PROCEDURE INIT;
BEGIN MR:=SR:=MK:=SK:=MDK:=0;
SDR:=MDR:=0;
SDK:=MB:=SB:=KL:=MA:=SA:=MF:=SF:=RL:=0;
N:=0;
END INIT;
PROCEDURE STAT(Q,M,S);
STRING Q;
REAL M,S;
BEGIN NEWLINE;
WRITE (Q);
TAB;
PRINT(M/N,0,3);
TAB;
PRINT(SQRT(S/N-(M/N)^2),0,3);
END;
PROCEDURE TREATDATA;
BEGIN MR:=MR+RTAK;
SR:=SR+RTAK^2;
MK:=MK+KTAK;
SK:=SK+KTAK^2;
MDR:=MDR+ABS(RTAK-RL);
SDR:=SDR+(RTAK-RL)^2;
MDK:=MDK+ABS(KTAK-KL);
SDK:=SDK+(KTAK-KL)^2;
MB:=MB+BTAK;
SB:=SB+BTAK^2;
SA:=SA+ALFA^2;
MA:=MA+ALFA;
SF:=SF+FTAK^2;
MF:=MF+FTAK;
N:=N+1;
KL:=KTAK;
RL:=RTAK;
END;
PROCEDURE SUMOFF;
BEGIN
WRITE("SUMMARY OF");
PRINT(N,3,0);
WRITE("  GARBAGE COLLECTIONS");
NEWLINE;
STAT("R",MR,SR);
STAT("K",MK,SK);
STAT("DR",MDR,SDR);
STAT("DK",MDK,SDK);
STAT("BETA",MB,SB);
STAT("ALFA",MA,SA);
STAT("F",MF,SF);
INIT;
END;
PROCEDURE READDATA;
BEGIN
SELECTINPUT(5);
INSYMBOL(TID);
WHILE TID=0 DO INSYMBOL(TID);
INSYMBOL(ACKTID);
INSYMBOL(NGC);
INFLOAT(TAU);
INFLOAT(KTAK);
INFLOAT(FTAK);
INFLOAT(LFTAK);
INFLOAT(RTAK);
INFLOAT(BTAK);
INFLOAT(R);
INFLOAT(ALFA);
INSYMBOL(L);
INSYMBOL(BOT);
INSYMBOL(TOP);
INSYMBOL(LIM);
STATUS:=IOCHAN(5);
STATUS:=STATUS AND %100;
IF INT(STATUS) # 0 THEN STATUS:=TRUE;
END;
PROCEDURE PRINTDATA;
BEGIN
NEWLINE;
PRINT(TID,0,2);
PRINT(ACKTID,0,2);
PRINT(NGC,0,2);
PRINT(TAU,0,2);
PRINT(KTAK,0,2);
PRINT(FTAK,0,2);
PRINT(LFTAK,0,2);
NEWLINE;
PRINT(RTAK,0,2);
PRINT(BTAK,0,2);
PRINT(RTAK,0,2);
PRINT(ALFA,0,2);
PRINT(L,0,2);
PRINT(BOT,0,2);
PRINT(TOP-BOT,0,2);
PRINT(LIM-BOT,0,2);
NEWLINE;
END;
INIT;
STATUS:=FALSE;
WHILE NOT STATUS DO
BEGIN NEWLINE; WRITE("NEW EXECUTION");NEWLINE;
TID:=1;
WHILE TID>0 AND NOT STATUS  DO
BEGIN READDATA;
TREATDATA;
PRINTDATA;
END;
SUMOFF;
END;
END;
END;