Google
 

Trailing-Edge - PDP-10 Archives - ap-c796e-sb - 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  %4(36)
SUBTTL D BLACK/RCC/PFC - 3-MAR-72

VQUOLS==4	;MAJOR VERSION NUMBER
VEDIT==36	;EDIT NUMBER
VMINOR==0	;MINOR VERSION NUMBER
VWHO==0		;WHO LAST EDITED

;***COPYRIGHT 1970, 1971, 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***

JOBVER==137
LOC	JOBVER
	BYTE	(3)VWHO(9)VQUOLS(6)VMINOR(18)VEDIT
	RELOC

;AC'S

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

;EXTENDED LOOKUP INDICES

EXLNAM==2
EXLEXT==3
EXLSTS==17
EXLQTR==24
EXLQTO==23
EXLQTF==22
EXLUSD==25
EXLLEN==25	;LENGTH

;DSKCHR INDICES

.CHUTL==1
.CHSTL==2	;SYSTEM TALLY

.CHLEN==3

;IO CHANNELS

TTY==1
STR==2

OPDEF PJRST [JRST]
QUOLST:	JFCL			;IN CASE OF CCL
	RESET
	SETOM	STRNAM
	GETPPN	T,
	  JFCL
	MOVEM	T,PPN
	MOVEI	T,16
	GETTAB	T,
	  SKIPA
	MOVEM	T,MFDPPN
	INIT	TTY,
	SIXBIT	.TTY.
	XWD	TOBUF,0
	  EXIT
	MOVE	P,PDL

	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
	JOBSTR	T,
	  JRST	XIT
	MOVE	T,STRNAM
	JUMPE	T,XIT
	AOJE	T,XIT
	PUSHJ	P,LSTSTR
	JRST	NXTSTR
LSTSTR:	MOVE	T,STRNAM
	PUSHJ	P,SIXMSG
	MOVEI T,[ASCIZ	/:	/]
	PUSHJ	P,MSG
	SETZB	T,T2
	MOVE	T1,STRNAM
	OPEN	STR,T
	  POPJ	P,
	MOVE	T,PPN
	MOVEM	T,LOOKBF+EXLNAM
	HLLZS	LOOKBF+EXLEXT
	LOOKUP	STR,LOOKBF
	  JRST	NOUFD
	MOVE	T,LOOKBF+EXLSTS
	TRNE	T,1B19		;SEE IF RENAMEABLE
	PJRST	CRLF		;NO--SO DSKCHR IS WRONG ANYWAY


LSTSY1:	MOVE	T,[XWD .CHLEN,STRNAM]
	DSKCHR	T,
	  PJRST	CRLF

	MOVE	T,STRNAM+.CHUTL
	CAMN	T,[XWD 400000,0]
	JRST	LSTST1
	MOVNS	T		;GET -FREE
	ADD	T,LOOKBF+EXLQTF	;GET USED=FCFS-FREE
	MOVEM	T,LOOKBF+EXLUSD	;UPDATE UFD IN CORE
LSTST1:	MOVE	T,LOOKBF+EXLUSD	;GET USED
	PUSHJ	P,DECPR5
	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
	MOVE	T,LOOKBF+EXLQTF	;GET FCFS
	CAMN	T,[377777,,777777]  ;SEE IF +INFINITY
	PJRST	CRLF		;YES--THAT'S ALL FOLKS
	SUB	T,LOOKBF+EXLUSD	;GET FREE=FCFS-USED
	PUSHJ	P,DECPR5
	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
	MOVE	T,LOOKBF+EXLQTO	;GET QUOTA OUT
	CAMN	T,[377777,,777777]  ;SEE IF +INFINITY
	PJRST	CRLF		;YES--FUNNY PLACE TO STOP
	SUB	T,LOOKBF+EXLUSD	;GET OUT FREE=OUT-USED
	PUSHJ	P,DECPR5
	MOVEI	T,[ASCIZ /	/]
	PUSHJ	P,MSG
	MOVE	T,STRNAM+.CHSTL
	PUSHJ	P,DECPR5
	PJRST	CRLF

NOUFD:	MOVEI	T,[ASCIZ /	No /]
	PUSHJ	P,MSG
	HLRZ	T,PPN
	PUSH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