Trailing-Edge
-
PDP-10 Archives
-
bb-bt99g-bb
-
filuuo.c13
There are no other files named filuuo.c13 in the archive.
REP 6/8 ;13C1
JRST RIBSAD ;YES
PUSHJ P,UPDA## ;NO, GET IT
PJRST RIBSAW ;WRITE CHANGED SATS, RETURNS DA
RIBSAD: PUSH P,U ;SAVE UNIT THAT HAS DA
PUSHJ P,RIBSAW ;WRITE CHANGED SATS
WIT
JRST RIBSA9 ;YES
PUSHJ P,UPDA## ;NO, GET IT
PUSHJ P,RIBSA1 ;WRITE CHANGED SATS
PJRST DWNDA## ;GIVE UP DA AND RETURN
RIBSA9: PUSH P,U ;SAVE UNIT THAT HAS DA
PUSHJ P,RIBSA1 ;WRITE CHANGED SATS
PUSHJ P,DWNDA## ;GIVE DA UP ON LAST UNIT
REP 14/8 ;13C2
;ROUTINE TO WRITE SATS - MUST BE CALLED WITH DA, RETURNS WITHOUT DA
RIBSAW: PUSHJ P,SAVE1## ;SAVE P1
WIT
RIBSA1: PUSHJ P,SAVE1## ;SAVE P1
DEL 20/8 ;13C3
PUSHJ P,DWNDA## ;GIVE UP DA
INS 27/8 ;13C4
PUSHJ P,DWNDA##
DEL 32/8 ;13C5
PUSHJ P,DWNDA## ;GIVE UP DA
REP 38/8 ;13C6
PUSHJ P,SAVR## ;AND R
SE1ENT ;ENTER SECTION 1
LDB P1,UNYSIC## ;NUMBER OF SAB BLOCKS FOR UNIT
SKIPN R,UNISAB##(U) ;LOC OF 1ST SAB
POPJ P, ;UNIT HAS NO SAB (OFF-LINE, DOWN, OR STR YANKED)
WTUSA1: SKIPGE SABFIR##(R) ;HAS SAT BEEN MODIFIED?
PUSHJ P,SATWRT## ;YES. WRITE IT
SKIPN UNISAB##(U) ;UNIT STILL HAVE SAB?
POPJ P, ;NO, STR YANKED WHILE BLOCKED IN UUOPWQ
MOVE R,SABRNG##(R) ;STEP TO NEXT SAB IN RING
SOJG P1,WTUSA1 ;GO IF IT HASNT BEEN CHECKED
POPJ P, ;RETURN
WIT
SE1ENT ;ENTER SECTION 1
PUSH P,R ;SAVE R
LDB P1,UNYSIC## ;NUMBER OF SAB BLOCKS FOR UNIT
MOVE R,UNISAB##(U) ;LOC OF 1ST SAB
JUMPE R,WTUSA2 ;EXIT IF UN HAS NO SAB (OFF-LINE OR DOWN)
WTUSA1: SKIPGE SABFIR##(R) ;HAS SAT BEEN MODIFIED?
PUSHJ P,SATWRT## ;YES. WRITE IT
MOVE R,SABRNG##(R) ;STEP TO NEXT SAB IN RING
SOJG P1,WTUSA1 ;GO IF IT HASNT BEEN CHECKED
WTUSA2: POP P,R ;POP OFF R
POPJ P, ;AND RETURN
REP 11/32 ;13C7
PUSH P,T1 ;SAVE SL PTR
SETZ P1, ;COUNT NUMBER OF STRS IN SL
MOVE P2,T1
UFDSR5: PUSHJ P,SLITA##
SKIPA P2,(P) ;RESET SL PTR
AOJA P1,UFDSR5
SOJE P1,UFDSR3 ;ONLY ONE STR, LEAVE THINGS ALONE
;HERE WITH P1 NON-0
WIT
PUSH P,T1 ;SAVE L(A.T.)
MOVE P2,T1 ;P2= SL. PTR.
REP 30/32 ;13C8
UFDSR6: TLZ M,UUOMSK ;SET UUO TO LOOK LIKE A LOOKUP
WIT
TLZ M,UUOMSK ;SET UUO TO LOOK LIKE A LOOKUP
INS 5/33 ;13C9
TLZ S,IOEND ;IT ISNT REALLY AN EOF YET
REP 8/33 ;13C10
JUMPE P1,STOIOS## ;JUST RE-OPENED 1ST STR, GIVE EOF RETURN
TLZ S,IOEND ;IT ISN'T REALLY AN EOF YET
PJRST INPTU ;DO 1ST INPUT ON NEW DIRECTORY FILE
;HERE WHEN SL IS EXHAUSTED
UFDSR4: MOVE P2,(P) ;RESET SL PTR TO BEGINING
TRZE P1,-1 ;1ST TIME HERE?
JRST UFDSR6 ;YES, RE-OPEN 1ST STR (SO REWIND WORKS)
PUSHJ P,JDAADR## ;2ND TIME (STR YANKED)
HLLM F,(T1) ;CLEAR LOOKB IN USRJDA
SETZM DEVUNI##(F) ;FILE IS LEFT CLOSED SO USETI UUO
;WOULD BE INTERPRETED AS SUPER USETI.
;ZERO DEVUNI TO MAKE USETI FAIL.
WIT
PJRST INPTU ;DO 1ST INPUT ON NEW DIRECTORY FILE
;HERE WHEN WE FOUND THE LAST DIRECTORY
UFDSR4: SETZM DEVUNI##(F) ;PREVENT USETI FROM "WINNING"
REP 5/40 ;13C11
CHKLB4: CAMGE T1,P1 ;NEW SIZE MUST BE BIGGER THAN OLD
WIT
CHKLB4: CAMG T1,P1 ;NEW SIZE MUST BE BIGGER THAN OLD
REP 30/44 ;13C12
TLZ T1,-1
CAIE T1,FBMERR ;FILE BEING MODIFIED?
CAIN T1,AEFERR ;OR SUPERSEDE ERROR?
WIT
CAIN T1,AEFERR ;CAN'T - SUPERSEDE ERROR?
DEL 51/58 ;13C13
TLO F,OUTPB ;REMEMBER AN OUTPUT WAS DONE
REP 1/78 ;13C14
UFDAL9: PUSHJ P,WTUSAT ;WRITE CHANGED SAT
LDB T3,UNYBPC## ;DONT COUNT BLOCKS ADDED TO UFD
WIT
UFDAL9: LDB T3,UNYBPC## ;DONT COUNT BLOCKS ADDED TO UFD
REP 33/86 ;13C15
PUSHJ P,GETNMB ;GET THE NMB
WIT
PUSHJ P,GETCB## ;AVOID RACES
PUSHJ P,GETNMB ;GET THE NMB
PUSHJ P,GVCBJ## ;RELEASE THE RESOURCE
REP 39/105 ;13C16
JRST ULOO20
WIT
JRST ULOO15
REP 21/107 ;13C17
JUMPN T2,ULOO20 ;NO, NO LIB/SYS IF NOT LOGICAL SYS
WIT
JUMPN T2,ULOO15 ;NO, NO LIB/SYS IF NOT LOGICAL SYS
REP 25/107 ;13C18
JRST ULOO20 ;YES, LOOKUP FAILS
WIT
JRST ULOO15 ;YES, LOOKUP FAILS
REP 30/108 ;13C19
ULOO14: TLNE M,UTRTWC
SETZM (P)
ULOO15: PUSH P,M ;SAVE M
WIT
ULOO14: PUSH P,M ;SAVE M
REP 36/108 ;13C20
HRRZ T1,-1(P) ;GET THE ERROR CODE
CAIE T1,TRNERR ;RIB ERROR
CAIN T1,PRTERR ; OR PROTECTION FAILURE?
SKIPA T1,DEVPPN(F) ;YES, STORE THE PPN IN THE LOOKUP BLOCK
SETZ T1, ;NO, ZERO PPN WORD ON LOOKUP FAILURE
PUSHJ P,PUTWDU##
SETZM DEVPPN(F) ;SO PATH. WILL WIN
JUMPE T1,ULOO19 ;DON'T STORE PATH IF NO PPN
CAMN M,(P) ;ARE WE FILLING IN A PATH BLOCK?
JRST ULOO19 ;NO. ALL DONE THEN.
PUSH P,[0] ;YES, PUT A MARKER ON THE STACK
HRRZ T2,DEVSFD##(F) ;GET THE FIRST SFD NMB POINTER
JUMPE T2,ULOO18 ;JUMP IF NO SFD
ULOO16: PUSH P,NMBNAM##(T2) ;SAVE THE SFD NAME
ULOO17: HLRZ T2,NMBPPB##(T2) ;GET THE NEXT NMB LINK
TRZN T2,NMPUPT## ;POINTER TO THE NEXT HIGHER LEVEL?
JUMPN T2,ULOO17 ;NO, TRY NEXT
JUMPN T2,ULOO16 ;YES, REMEMBER THIS ONE
ULOO18: POP P,T1 ;RESTORE AN SFD NAME
PUSHJ P,PUTWD1## ;STORE THE SFD NAME IN THE PATH BLOCK
JUMPN T1,ULOO18 ;DO ALL OF THEM.
ULOO19: POP P,M
ULOO20: POP P,T1 ;RESTORE ERROR CODE
WIT
SETZ T1, ;ZERO PPN WORD ON LOOKUP FAILURE
PUSHJ P,PUTWDU##
SETZM DEVPPN(F) ;SO PATH. WILL WIN
POP P,M
TLNE M,UTRTWC
SETZM (P)
ULOO15: POP P,T1 ;RESTORE ERROR CODE
DEL 41/111 ;13C21
PUSHJ P,FIXUSD ;FIX RIBUSD
REP 18/113 ;13C22
CAIGE T1,<UUXFUT-UUXNUM> ;IS THE BLOCK LONG ENOUGH TO
WIT
CAIGE T1,<UUXFUT-UUXNUM-1> ;IS THE BLOCK LONG ENOUGH TO
REP 47/127 ;13C23
TLNN M,UPARAL ;PARTIAL ALLOCATION ONLY?
JRST ENTXI1 ;NO
HRRI M,-<UUXALC-UUXEXT>(M) ;ADJUST
TLOA F,ENTRB ;YES. SET FOR NON-SKIP RETURN
ENTXI1: AOSA (P) ;NO. SKIP(GOOD) RETURN
WIT
TLNE M,UPARAL ;PARTIAL ALLOCATION ONLY?
TLOA F,ENTRB ;YES. SET FOR NON-SKIP RETURN
AOSA (P) ;NO. SKIP(GOOD) RETURN
REP 10/128 ;13C24
HRRZ P1,DEVLNM##(F) ;GET THE LOGICAL NAME POINTER IF ANY
CAMN T1,DEVFIL(F) ;SAME AS LOOKED-UP NAME?
JRST UPDAT0 ;YES, GO ON.
JUMPE P1,UILNMR ;FILENAME MISMATCH IF NO LOGICAL NAME POINTER
SKIPE T1,LNRNAM##(P1) ;SO FAR SO GOOD. ANY FILENAME?
CAME T1,DEVFIL(F) ;YES. SAME AS LOOKED UP NAME?
JRST UILNMR ;NO. ERROR
UPDAT0: HRRI M,UUNEXT-UUNNAM(M) ;YES. POINT TO EXTENSION
WIT
CAME T1,DEVFIL(F) ;SAME AS LOOKED-UP NAME?
JRST UILNMR ;NO. ERROR
HRRI M,UUNEXT-UUNNAM(M) ;YES. POINT TO EXTENSION
REP 25/128 ;13C25
CAMN T1,T2 ;MATCH?
JRST UPDA0A ;YES, SKIP THIS
JUMPE P1,UILNMR ;ERROR IF NO LOGICAL NAME TO LOOK AT
HLL P3,LNREXT##(P1) ;GET THE LOGICAL'S EXTENSION
HLLZ T1,P3 ;COPY IT
CAME T1,T2 ;MATCH?
JRST UILNMR ;NO. ERROR
UPDA0A: HRRI M,UUNPPN-UUNEXT+1(M) ;POINT TO PRJ,PRG
WIT
CAME T1,T2 ;MATCH?
JRST UILNMR ;NO. ERROR
HRRI M,UUNPPN-UUNEXT+1(M) ;POINT TO PRJ,PRG
REP 47/128 ;13C26
UPDAT1: CAMN T1,T2 ;PPN'S MATCH?
JRST UPDAT2 ;YES, EVERYTHING'S COOL
JUMPE P1,UPDERY ;NO. BETTER HAVE A LOGICAL NAME HERE
SKIPE T1,LNRPPN##(P1) ;DOES THE DEFINITION INCLUDE A PPN?
CAME T1,T2 ;YES, PPN'S MATCH?
WIT
UPDAT1: CAME T1,T2 ;PPN'S MATCH?
REP 20/130 ;13C27
JRST UPDER2 ;QUOTA EXCEEDED, RETURN ANYWAY
JRST UPDER2 ;BLOCK NOT FREE, RETURN ANYWAY
WIT
JRST UPDER2 ;COULDN'T? RETURN ANYWAY
DEL 31/130 ;13C28
JRST ENERR7 ;QUOTA EXCEEDED
DEL 28/133 ;13C29
HRRZ T2,DEVACC##(F) ;GET THE ACCESS TABLE POINTER
MOVE T3,RIBPRV##+1(T1) ;GET THE PRIVS WORD
MOVEM T3,ACCPRV##(T2) ;STORE IN THE AT
HRRZ T3,RIBEXT##+1(T1) ;GET THE ACCESS DATE, HI CREATION DATE
HRLM T3,ACCADT##(T2) ;STORE IN THE AT
INS 27/134 ;13C30
MOVE P1,T1 ;SAVE AOBJN WORD FOR THE PNTRS IN THE MON BUF
REP 30/134 ;13C31
PUSHJ P,UPDGV9 ;GIVE UP SOME BLOCKS
WIT
PUSHJ P,UPDGIV ;GIVE UP SOME BLOCKS
DEL 5/138 ;13C32
TLNE F,SYSDEV ;WANT SYS:?
JRST CPOPJ1## ;YES, DON'T TRY ANY SFDS
REP 6/151 ;13C33
PTHU24: HRRZ T1,DEVACC##(F) ;LOOKUP DONE?
JUMPN T1,PTHU25 ;YES, GO TELL THE TRUTH
SKIPLE T1,@SDVPPN(P3) ;IS THERE AN IMPLIED PPN?
TDZA T2,T2 ;YES, FLAG NOT TO USE SFDS FROM DEFAULT PATH
WIT
PTHU24: SKIPE DEVPPN(F) ;LOOKUP DONE?
JRST PTHU25 ;YES--TELL THE TRUTH
CAIE P3,ZPPNDX## ;ALL?
MOVEI T2,0 ;NO--NO SFD'S
SKIPG T1,@SDVPPN(P3) ;AND GET DEFAULT PPN
DEL 22/170 ;13C34
PUSHJ P,CHEKU## ;CHECK IF STR YANKED
JRST RENER5 ;PRETEND FILE NOT FOUND
DEL 15/174 ;13C35
HLRZ P1,DEVEXT(F) ;FNCCAT IS NEVER LEGAL FOR UFD
CAIN P1,'UFD' ;IS THIS THE UFD?
TLO T1,777000 ;YES, TRY FNCCPR (IT'S SOMETIMES LEGAL)
REP 18/177 ;13C36
PUSH P,DEVLNM##(F) ;SAVE THEE LOGICAL NAME POINTER
PUSH P,DEVNAM(F) ;SAVE THE DEVICE NAME
HRRZ T1,DEVLNM##(F) ;GET THE LOGICAL NAME POINTER IF ANY
JUMPE T1,REN16A ;SKIP THIS IF NO LOGICAL NAME
SETZM DEVLNM##(F) ;PRETEND THERE ISN'T ONE
SKIPN T1,LNRDEV##(T1) ;GET THE DEVICE NAME WE'RE USING
MOVSI T1,'DSK' ;NONE. DEFAULT
MOVEM T1,DEVNAM(F) ;STORE THE REAL DEVICE NAME
REN16A: PUSHJ P,SETPT3 ;SET UP NEW PATH
TLO P3,-1 ;ERROR
POP P,DEVNAM(F) ;RESTORE THE DEVICE NAME
POP P,DEVLNM##(F) ;RESTORE THE LOGICAL NAME POINTER
WIT
PUSHJ P,SETPT3 ;SET UP NEW PATH
TLO P3,-1 ;ERROR
DEL 40/183 ;13C37
JRST ENERR7 ;QUOTA EXCEEDED
INS 7/184 ;13C38
MOVE P1,T1 ;SAVE AOBJN POINTER IN P1
REP 10/184 ;13C39
PUSHJ P,UPDGV9 ;GO DEALLOCATE SOME BLOCKS
WIT
PUSHJ P,UPDGIV ;GO DEALLOCATE SOME BLOCKS
REP 14/184 ;13C40
TRNN P4,BLKSIZ##-1 ;YES, PARTIAL BLOCK?
TROA P4,BLKSIZ## ;NO, LAST BLOCK IS FULL
WIT
TRNE P4,BLKSIZ##-1 ;YES, PARTIAL BLOCK?
REP 3/186 ;13C41
IFN FTWATCH,<
PUSH P,M ;SAVE ADDR OF ALC
>
PUSHJ P,SETVAL ;STORE ARGUMENTS FROM USER IN RIB
IFN FTWATCH,<
POP P,M ;POINT AT ERROR CODE
HRRI M,<UUXEXT-UUXALC>(M);IN CASE PARTIAL ALLOCATION
>
RENA37:
IFN FTWATCH,<
;WE MUST DO "SET WATCH FILES" STUFF NOW WHILE
;DEVSFD STILL POINTS TO THE RIGHT PLACE (THE NEW SFD) AND
;WHILE THE SFD USE COUNTS ARE STILL UP
TLNN M,UPARAL ;PARTIAL ALLOCATION ERROR?
TRZ M,-1 ;NO, INDICATE NO ERROR CODE
PUSHJ P,WCHFIL## ;TYPE SET WATCH FILES
CAI "R"
MOVSI T1,(UP.SWF) ;LIGHT BIT SO WE DON'T DO IT AGAIN
IORM T1,.USBTS
>
MOVE T1,.USMBF ;LOC OF MON BUF
WIT
PUSHJ P,SETVAL ;STORE ARGUMENTS FROM USER IN RIB
RENA37: MOVE T1,.USMBF ;LOC OF MON BUF
REP 4/187 ;13C42
;EXIT CPOPJ IF QUOTA EXCEEDED
;EXIT CPOPJ1 IF CANT START WHERE REQUESTED
;EXIT CPOPJ2 IF GOT ANY BLOCKS (UPARAL MAY BE ON IN M)
WIT
;EXIT CPOPJ IF CANT START WHERE REQUESTED
;EXIT CPOPJ1 IF GOT ANY BLOCKS (UPARAL MAY BE ON IN M)
REP 19/187 ;13C43
UPDAT6: AOS (P) ;SET FOR SKIP/DOUBLE SKIP RETURN
PUSH P,T2 ;SAVE NUMBER OF BLOCKS TO GET
WIT
UPDAT6: PUSH P,T2 ;SAVE NUMBER OF BLOCKS TO GET
DEL 7/189 ;13C44
;HERE WITH T1=AOBJN
UPDGV9: MOVE P1,T1 ;PUT IT IN A SAFE PLACE
AOBJN T1,UPDGIV ;LAST RTP IN RIB?
AOS DEVBLK##(F) ;YES, SCNPTR LEFT DEVLFT ONE TOO LOW
;COMPENSATE BY BUMPING DEVBLK
;HERE WITH P1=AOBJN
DEL 15/191 ;13C45
JUMPE T1,DELRB3 ;DON'T ALLOCATE IF NO BLOCK NUMBER GIVEN
REP 10/196 ;13C46
SKIPA T3,P1 ;REMEMBER TRUE NUMBER OF ARGS
SETVAN: SETZ T3, ;MARK THAT WE CAME FROM SETVAN
PUSHJ P,SAVE2##
WIT
SETVAN: PUSHJ P,SAVE2##
REP 18/196 ;13C47
;
;HERE WE ARE PRIV'D, T3 HAS TRUE # OF ARGS, M=PRIV WORD
;TRY TO COPY ACCOUNT STRING FROM USER TO RIB. SIMILAR TO SETE15
;
SKIPGE T2,[XWD MACTSL##,RIBACS##] ;GET MAX ACCT STRING LENG
CAIGE T3,UUXACT ;DID THE USER SPECIFY ACCT STRING?
JRST SETVAC ;MAX IS 0 OR USER DIDN'T SPECIFY
MOVE T1,.USMBF ;POINT TO MONITOR BUFFER
MOVEM T2,RIBACT##+1(T1) ;STORE AOBJN POINTER TO ACCT STRING
ADDI T2,1(T1) ;MAKE AOBJN WORD FOR ACCT STRING IN RIB
HRLZ T1,T2 ;MAKE A BLT POINTER
HRRI T1,1(T2)
SETZM (T2) ;ZAP THE EXISTING ACCOUNT STRING
BLT T1,-MACTSL-1(T2) ;NOTE THAT MACTSL IS A NEG NUMBER
PUSH P,M ;SAVE USER ARG POINTER
HRRI M,UUXACT-UUXPRV-1(M) ;POINT TO USER SUPPLIED STRING
SUBI T3,UUXACT
SETVAR: PUSHJ P,GETWD1## ;GET NEXT USER WORD
JUMPE T1,SETVR1 ;DONE (SINCE ACCOUNT IS ASCIZ)
MOVEM T1,(T2) ;STORE A WORD IN RIB
AOBJP T2,SETVR1 ;DONE IF RIB FULL
SOJG T3,SETVAR ;CONTINUE IF MORE ARGS
SETVR1: POP P,M ;RESTORE USER ARG POINTER TO UUXPRV
SETVAC: HLRZ T1,DEVEXT(F) ;GET EXTENSION
WIT
HLRZ T1,DEVEXT(F) ;GET EXTENSION
DEL 24/200 ;13C48
;ROUTINE TO FIX THE VALUE OF RIBUSD IN THE RIB
;(ONLY THE VALUE IN UFBTAL IS KNOWN TO BE RIGHT)
;RESPECTS ALL ACS EXCEPT T1
FIXUSD: HLRZ T1,DEVEXT(F) ;RIBUSD IS ONLY MEANINGFUL FOR UFD
CAIE T1,'UFD'
POPJ P,
PUSHJ P,SAVT##
PUSHJ P,FNDUFB ;FIND THE UFB
POPJ P, ;NOT THERE
MOVE T1,.USMBF ;%GET QUOTA FROM RIB
MOVE T3,RIBQTF##+1(T1)
SUB T3,UFBTAL##(T2) ;%MINUS AMOUNT LEFT
MOVEM T3,RIBUSD##+1(T1);%GIVES AMOUNT USED
PJRST GVCBJ## ;%GIVE UP CB
INS 1/203 ;13C49
ENERR1: HLRZ T1,DEVRSU##(F)
JRST ENERR5
REP 7/203 ;13C50
ENERR1: MOVEI T1,BNFERR
WIT
MOVEI T1,BNFERR
REP 11/206 ;13C51
UPDER8:
IFN FTDMRB,<
POP P,(P) ;FIX STACK
PUSHJ P,INPSW8 ;USETI TO BLOCK ONE
>
WIT
UPDER8: IFN FTDMRB,<POP P,(P)> ;FIXSTACK
SUM 147705