Google
 

Trailing-Edge - PDP-10 Archives - cuspmar86binsrc_2of2_bb-fp63a-sb - 10,7/quolst/quolst.mac
There are 4 other files named quolst.mac in the archive. Click here to see a list.
TITLE QUOLST - CUSP TO LIST FILE STRUCTURE QUOTAS  %5(42)
SUBTTL D BLACK/RCC/PFC/JNG/WSM/SMW - 9-JUN-78
	SEARCH	JOBDAT,UUOSYM	;[42]

VQUOLS==5	;MAJOR VERSION NUMBER
VEDIT==42	;EDIT NUMBER
VMINOR==0	;MINOR VERSION NUMBER
VWHO==0		;WHO LAST EDITED



;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1970,1972,1984,1986.
;ALL RIGHTS RESERVED.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERRED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.


; . . . EDIT HISTORY . . .
; VERSION 5:
;  EDIT 37 - ADDS STRUCTURES IN PASSIVE SEARCH LIST TO REPORT
;            ADDS PRINTOUT OF QUOTA ON STR WITH NO UFD
;             AREAS AFFECTED: QUOLST,LSTSTR,NOUFD,FENCE
;  EDIT 40 - ALWAYS PRINTS SYSTEM BLOCKS LEFT.
;		AREAS AFFECTED: LSTSTR,LSTST1,NDLUFD
;  EDIT 41 - FIX BUG WHERE DSKCHR GETS CONFUSED BY LOGICAL
;		DEVICE ASSIGNMENTS. MAKE PROGRAM SHAREABLE.
;  EDIT 42 - CONVERT TO UUOSYM SYMBOLS

	LOC	.JBVER
	BYTE	(3)VWHO(9)VQUOLS(6)VMINOR(18)VEDIT

;AC'S

T=1
T1=T+1
T2=T1+1
P=17

EXLLEN==.RBUSD	;LENGTH

.CHLEN==3

;IO CHANNELS

TTY==1
STR==2

OPDEF PJRST [JRST]

	PDLSIZ==20		;SIZE OF PDL
	TWOSEG
	RELOC	400000


COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1970,1986. ALL RIGHTS RESERVED.
\;END COPYRIGHT MACRO



QUOLST:	JFCL			;IN CASE OF CCL
	RESET
	SETOM	STRNAM+.DCNAM
	SETOM	GATE#		;[37] SET UP FOR PASSIVE PRNT
	GETPPN	T,
	  JFCL
	MOVEM	T,PPN
	MOVE	T,[%LDMFD]
	GETTAB	T,
	  MOVE	T1,[1,,1]
	MOVEM	T,LOOKBF+.RBPPN
	MOVSI	T,'UFD'		;[41]SET UP OPEN BLOCK IN ACS
	MOVEM	T,LOOKBF+.RBEXT
	MOVEI	T,EXLLEN
	MOVEM	T,LOOKBF
	MOVEI	T,0
	MOVSI	T1,'TTY'
	MOVSI	T2,TOBUF
	OPEN	TTY,T
	  EXIT
	MOVE	P,[IOWD PDLSIZ,PDLIST]
	MOVEI	T,[ASCIZ /User:	/]
	PUSHJ	P,MSG
	HLRZ	T,PPN
	PUSHJ	P,OCTPRT
	PUSHJ	P,COMMA
	HRRZ	T,PPN
	PUSHJ	P,OCTPRT
	MOVEI	T,[ASCIZ /
Str	used   left:(in) (out)	(sys)
/]
	PUSHJ	P,MSG
NXTSTR:	MOVEI	T,STRNAM+.DCNAM
	JOBSTR	T,
	  JRST	XIT
	MOVE	T,STRNAM+.DCNAM
	AOJE	T,XIT
	PUSHJ	P,LSTSTR
	JRST	NXTSTR


FENCE:	MOVEI	T,[ASCIZ /--FENCE--
/]				;[37] HERE IF STR AFTER FENCE
	PUSHJ	P,MSG		;[37] TELL THE USER
	POPJ	P,		;[37] AND RETURN
LSTSTR:	SKIPN	GATE		;[37] WAS LAST A FENCE?
	PUSHJ	P,FENCE		;[37] YES
	MOVE	T,STRNAM+.DCNAM
	MOVEM	T,GATE		;[37] 
	JUMPE	T,CPOPJ		;[37] IF THIS IS FENCE NO PPN
	PUSHJ	P,SIXMSG
	MOVEI	T,[ASCIZ /:	/]
	PUSHJ	P,MSG
	MOVSI	T,(UU.PHS)
	MOVEI	T2,0
	MOVE	T1,STRNAM+.DCNAM
	OPEN	STR,T
	  POPJ	P,
	MOVE	T,PPN
	MOVEM	T,LOOKBF+.RBNAM
	HLLZS	LOOKBF+.RBEXT
	LOOKUP	STR,LOOKBF
	  JRST	NOUFD
	MOVE	T,LOOKBF+.RBSTS
	TRNE	T,RP.NDL	;SEE IF RENAMEABLE
	JRST	NDLUFD		;[40] NO--ONLY PRINT SYSTEM LEFT


LSTSY1:	MOVE	T,[XWD .CHLEN,STRNAM]
	DSKCHR	T,UU.PHY
	  PJRST	CRLF
	MOVE	T,STRNAM+.DCUFT
	CAMN	T,[XWD 400000,0]
	JRST	LSTST1
	MOVNS	T		;GET -FREE
	ADD	T,LOOKBF+.RBQTF	;GET USED=FCFS-FREE
	MOVEM	T,LOOKBF+.RBUSD	;UPDATE UFD IN CORE
LSTST1:	MOVE	T,LOOKBF+.RBUSD	;GET USED
	PUSHJ	P,DECPR5
	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
	MOVE	T,LOOKBF+.RBQTF	;GET FCFS
	CAMN	T,[377777,,777777]  ;SEE IF +INFINITY
	JRST	LSTST3		;[40] YES, DON'T PRINT ANYTHING
	SUB	T,LOOKBF+.RBUSD	;GET FREE=FCFS-USED
	PUSHJ	P,DECPR5
LSTST3:	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
	MOVE	T,LOOKBF+.RBQTO	;GET QUOTA OUT
	CAMN	T,[377777,,777777]  ;SEE IF +INFINITY
	JRST	LSTST4		;[40] YES--DON'T PRINT ANYTHING
	SUB	T,LOOKBF+.RBUSD	;GET OUT FREE=OUT-USED
	PUSHJ	P,DECPR5
LSTST4:	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
LSTST2:	MOVE	T,STRNAM+.DCFCT
	PUSHJ	P,DECPR5
	PJRST	CRLF

NOUFD:	MOVEI	T,[ASCIZ / No /]
	PUSHJ	P,MSG
	HLRZ	T,PPN
	PUSHJ	P,OCTPRT
	PUSHJ	P,COMMA
	HRRZ	T,PPN
	PUSHJ	P,OCTPRT
	MOVEI	T,[ASCIZ / UFD      	/]	;[37]
	PUSHJ	P,MSG			;[37]
	MOVE	T,[XWD .CHLEN,STRNAM]	;[37]
	DSKCHR	T,UU.PHY		;[41]
	 PJRST	CRLF			;[37]
	JRST	LSTST2			;[37]

;HERE IF UFD HAS RP.NDL SET. ONLY PRINT SYSTEM LEFT
NDLUFD:	MOVE	T,[XWD .CHLEN,STRNAM]	;[40]
	DSKCHR	T,UU.PHY		;[41]
	  PJRST	CRLF			;[40]
	MOVEI	T,[ASCIZ/			/]	;[40]
	PUSHJ	P,MSG			;[40]
	JRST	LSTST2			;[40]
SPACE:	MOVEI	T," "
	PJRST	TYO

COMMA:	MOVEI	T,","
	PJRST	TYO

CRLF:	JSP	T,MSG
	ASCIZ .
.

MSG:	MOVE	T1,T
	HRLI	T1,440700
MSG1:	ILDB	T,T1
	JUMPE	T,CPOPJ
	PUSHJ	P,TYO
	JRST	MSG1

SIXMSG:	MOVE	T2,T
	MOVE	T1,[POINT 6,T2]
SIXMS1:	TLNN	T1,770000
CPOPJ:	POPJ	P,
	ILDB	T,T1
	JUMPE	T,CPOPJ
	ADDI	T,40
	PUSHJ	P,TYO
	JRST	SIXMS1
DECPR5:	MOVM	T1,T		;GET SIZE OF NUMBER
	PUSH	P,T
	JUMPL	T,DECPR4	;ALLOW FOR -
	CAIG	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