.TITLE CHKQUOUSE .IDENT \ISUQUOTA 2.9\ ARG_COUNT= 0 ARG_QMASK= 4 ARG_TABLE= 8 ARG_QUAX= 12 ARG_FAILSTS= 16 ARG_WARNSTS= 20 ; THIS ROUTINE CHECKS USAGE AGAINST QUOTA FOR ALL RESOURCES LISTED IN THE ; QUOTA CHECK TABLE. IF THE USAGE EXCEEDS THE QUOTA THE APPROPRIATE BIT IS ; SET IN THE FAILSTS MASK. IF THE USAGE IS WITHIN 90% OF THE QUOTA THE ; APPROPRIATE BIT IS SET IN THE WARNSTS MASK. ; ; ; CALL CHKQUOUSE (QMASK, TABLE, QUAX, FAILSTS, WARNSTS) ; ; WHERE ; ; QMASK - ADR LONG WORD CONTAINING ENFORCED QUOTAS ; TABLE - TABLE OF QUOTA CHECK DATA (DEFINED IN QCKDEF) ; QUAX - ADR QUAX RECORD ; FAILSTS - LONG WORD CONTAINING RESULTANT FATAL ERROR STATUS ; WARNSTS - LONG WORD CONTAINING RESULTANT WARNING STATUS ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ANTHONY E. BIBLE ; 104 COMPUTER SCIENCE ; ISU COMPUTATION CENTER ; IOWA STATE UNIVERSITY ; AMES, IA 50011 ; ; 515-294-5659 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .PAGE .SBTTL MACROS ; USER MACROS QCKDEF QUAXDEF .PAGE .SBTTL LOCAL READ-ONLY DATA .PSECT LCLRODATA,RD,NOWRT,NOEXE,LONG MASK_FLOAT: .LONG QMSK_M_DOLLARS .PAGE .SBTTL CODE .PSECT CODE,RD,NOWRT,EXE,LONG .ENTRY CHKQUOUSE,^M MOVL ARG_TABLE(AP),R7 ; ADR QUOTA CHECK TABLE MOVL ARG_QUAX(AP),R10 ; ADR QUAX RECORD LOOP_CHKQUOUSE: TSTL QCK_MASK(R7) ; END TABLE? BNEQ 10$ ; NO JMP RET_CHKQUOUSE 10$: BITL QCK_MASK(R7),@ARG_QMASK(AP) ; QUOTA ENFORCED? BEQL CONT_CHKQUOUSE ; NO ADDL3 QCK_Q_OFFSET(R7),R10,R8 ; ADR QUOTA ADDL3 QCK_U_OFFSET(R7),R10,R9 ; ADR USAGE BITL MASK_FLOAT,QCK_MASK(R7) ; FLOAT NUMBERS? BEQL 13$ ; NO CMPF (R9),(R8) ; OVER QUOTA? BLSS CHK_WARN ; NO BRB 15$ 13$: CMPL (R9),(R8) ; OVER QUOTA? BLEQ CHK_WARN ; NO 15$: BISL QCK_MASK(R7),@ARG_FAILSTS(AP) ; MARK FAILED QUOTA BRW CONT_CHKQUOUSE CHK_WARN: TSTL QCK_WAR_MSGID(R7) ; WARN FOR THIS QUOTA? BEQL CONT_CHKQUOUSE ; NO BITL MASK_FLOAT,QCK_MASK(R7) ; FLOAT NUMBERS? BEQL 10$ ; NO MOVF (R8),-(SP) ; VALUE QUOTA MOVF (R9),-(SP) ; VALUE USAGE BRB 13$ 10$: CVTLF (R8),-(SP) ; FLOAT QUOTA CVTLF (R9),-(SP) ; FLOAT USAGE 13$: MULF #0.90,4(SP) ; 90% QUOTA CMPF (SP),4(SP) ; WITHIN 90% QUOTA? BLSS 15$ ; NO BISL QCK_MASK(R7),@ARG_WARNSTS(AP) ; MARK WARN QUOTA 15$: MOVAB 8(SP),SP ; RELEASE WORK AREA CONT_CHKQUOUSE: ADDL #QCK_K_LENGTH,R7 ; NEXT ENTRY JMP LOOP_CHKQUOUSE ; CONTINUE RET_CHKQUOUSE: RET .END