Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11c-bm_tops20_v6_1_atpch1_16 - autopatch/watmai.c13
There are no other files named watmai.c13 in the archive.
 INS 1/1	;13C1
	; *** Edit 602 to WATMAI.MAC by GRANT on 18-Dec-85
	; Add CI Statistics 
	;------------------------- Autopatch Tape # 12 -------------------------
 INS 20/3	;13C2
	TBL=:13				;CONTAINS EITHER VNAMES OR CNAMES
 REP 71/21	;13C3
	GTA3:	RET			;
 WIT
	GTA3:	CALL GETCIS		;() GET CI STATISTICS
		RET			;
	;GETCIS - GET CI STATISTICS
	;	CALL GETCIS		;()
	;RETURNS: +1

	GETCIS:	SKIPE CSTATF		;DO WE HAVE CI STATS IN MONITOR?
		RET			;NO, ALL DONE
		MOVE A,[SIXBIT /CISTAT/] ;GET CI STATISTICS TABLE
		SYSGT
		JUMPE B,[HRROI A,[ASCIZ/CISTAT table not found
	/]
			PSOUT
			SETOM CSTATF	;SAY WE DIDN'T FIND IT
			RET]
		HRRZM B,CISTAT		;SAVE TABLE NUMBER
		HLRE A,B		;NEGATIVE OF LENGTH
		MOVM A,A		;POSITIVE LENGTH
		CAIG A,CSTATW		;TOO LARGE FOR STORAGE?
		IFSKP.
		  TMSG <%This version of WATCH cannot handle all CI statistics.
	>
		  MOVEI A,CSTATW	;USE MAX
		ENDIF.
		MOVEM A,CISYST
		MOVN A,A
		HRLM A,CISYST		;NSYST/ -LENGTH,,+LENGTH
		HLLZ E,CISYST		;SYSTAT TABLE
	GETCIL:	HRRZ A,CISTAT		;
		HRLI A,0(E)		;
		GETAB%			;
		 IFJER.
		   CALL LJSERR
		   SETZ A,
		 ENDIF.
		MOVEM A,CINEW(E)	;SAVE THE CURRENT VALUE
		AOBJN E,GETCIL		;LOOP TO GET ALL 
		RET
 INS 26/22	;13C4
		MOVEI TBL,VNAMES	;GET TABLE ORIGIN
 INS 29/22	;13C5
		CALL OUTCIS		;() OUTPUT CI STATISTICS
 INS 2/24	;13C6
	;OUTCIS - OUTPUT CI STATISTICS
	;	CALL OUTCIS		;()
	;RETURNS: +1

	OUTCIS:	SKIPE CSTATF		;DID WE FIND THE CISTAT TABLE IN THE MONITOR?
		RET			;NO
		MOVE A,OJFN		;GET OUTPUT FILE
		HRROI B,[ASCIZ/CI Statistics
	/]
		SETZ C,
		SOUT%
		 ERJMP .+1
		MOVSI G,-CIVALS		;SET UP TO DO ALL VALUES
		SETZ FF,		;INIT ITEMS PER LINE
	OUTCI1:	MOVE A,OJFN
		SOJLE FF,[CALL CRLF	;DO NEW LINE IF ITEM COUNT DONE
			MOVE FF,NCOL
			JRST OUTCI2]
		CALL SPACE		;ELSE SPACE TO NEXT ITEM
		CALL SPACE
		CALL SPACE
	OUTCI2:	HLRZ A,CNAMES(G)	;POINTER TO CALL WORD
		MOVE E,0(A)		;CALL WORD, IE. INDEX,,ROUTINE
		HLRZ A,E		;A/0,,INDEX
		MOVEI TBL,CNAMES	;GET TABLE ORIGIN
		CALL 0(E)		;PERFORM SPECIFIED FUNCTION
		AOBJN G,OUTCI1		;LOOP TO DO WHOLE TABLE
		CALL CRLF		;NEW LINE
		CALL CRLF		;AND ANOTHER
		RET
 REP 26/25	;13C7
		HRRO B,VNAMES(G)	; OUTPUT STAT NAME
 WIT
		MOVE B,TBL		;GET TABLE ORIGIN
		ADDI B,(G)		;ADD THE OFFSET WE NEED
		HRRO B,(B)		;POINT AT STAT NAME
 INS 37/25	;13C8
	CDORAT:	MOVE B,CINEW(A)
		SUBB B,CIOLD(A)
		JRST DORAT0

 INS 2/30	;13C9
	;CI STATISTICS TO BE REPORTED
	;ITEMS ARE PRINTED 4 ACROSS PAGE, HENCE SOME USEFUL GROUPINGS OF 4
	;SHOULD BE NOTED WHEN ADDING NEW ITEMS

	DEFINE CNAME(NM,SUBR,LC)<
		XWD [XWD LC,SUBR],[ASCIZ/NM/]>

	CNAMES:	CNAME(CMQ0,CDORAT,14)
		CNAME(CMQ1,CDORAT,15)
		CNAME(CMQ2,CDORAT,16)
		CNAME(CMQ3,CDORAT,17)

		CNAME(CFMS,CDORAT,10)
		CNAME(CFMR,CDORAT,11)
		CNAME(SCOS,CDORAT,2)
		CNAME(SCOR,CDORAT,3)

		CNAME(MSMS,CDORAT,4)
		CNAME(MSMR,CDORAT,5)
		CNAME(DNDS,CDORAT,22)
		CNAME(DNDR,CDORAT,23)

		CNAME(MVMS,CDORAT,6)
		CNAME(MVMR,CDORAT,7)
		CNAME(IPDS,CDORAT,20)
		CNAME(IPDR,CDORAT,21)

		CNAME(SJMS,CDORAT,12)
		CNAME(SJMR,CDORAT,13)
		CNAME(SJDS,CDORAT,24)
		CNAME(SJDR,CDORAT,25)

		CNAME(CISN,CDORAT,0)
		CNAME(CIRC,CDORAT,1)
		CNAME(HOOB,CDORAT,27)
		CNAME(MSDR,CDORAT,26)

	CIVALS==.-CNAMES
 INS 65/30	;13C10
	CMQ0: PACKETS PUT ON COMMAND QUEUE 0 (PER SECOND)
	CMQ1: PACKETS PUT ON COMMAND QUEUE 1 (PER SECOND)
	CMQ2: PACKETS PUT ON COMMAND QUEUE 2 (PER SECOND)
	CMQ3: PACKETS PUT ON COMMAND QUEUE 3 (PER SECOND)
	CFMS: CFS MESSAGES SENT (PER SECOND)
	CFMR: CFS MESSAGES RECEIVED (PER SECOND)
	SCOS: SCA OVERHEAD MESSAGES SENT (PER SECOND)
	SCOR: SCA OVERHEAD MESSAGES RECEIVED (PER SECOND)
	MSMS: MSCP DRIVER MESSAGES SENT (PER SECOND)
	MSMR: MSCP DRIVER MESSAGES RECEIVED (PER SECOND)
	DNDS: DECNET DATAGRAMS SENT (PER SECOND)
	DNDR: DECNET DATAGRAMS RECEIVED (PER SECOND)
	MVMS: MSCP SERVER MESSAGES SENT (PER SECOND)
	MVMR: MSCP SERVER MESSAGES RECEIVED (PER SECOND)
	IPDS: INTERNET DATAGRAMS SENT (PER SECOND)
	IPDR: INTERNET DATAGRAMS RECEIVED (PER SECOND)
	SJMS: SCS% MESSAGES SENT (PER SECOND)
	SJMR: SCS% MESSAGES RECEIVED (PER SECOND)
	SJDS: SCS% DATAGRAMS SENT (PER SECOND)
	SJDR: SCS% DATAGRAMS RECEIVED (PER SECOND)
	CISN: CI PACKETS SENT (PER SECOND)
	CIRC: CI PACKETS RECEIVED (PER SECOND)
	MSDR: MSCP DRIVER DATAGRAMS RECEIVED (PER SECOND)
	HOOB: HSC OUT-OF-BAND PACKETS (PER SECOND)
 INS 32/32	;13C11
	CISYST:	BLOCK 1
	CISTAT:	BLOCK 1
	CSTATF:	BLOCK 1				;CI STAT FLAG
 INS 41/32	;13C12
	CSTATW==50			;NUMBER OF CI STATISTICS WORDS MAX
 INS 45/32	;13C13
	CIOLD:	BLOCK CSTATW
 INS 51/32	;13C14
	CINEW:	BLOCK CSTATW
 SUM 167302