Trailing-Edge
-
PDP-10 Archives
-
BB-FP64A-SB_1986
-
10,7/users/users.mac
There are 5 other files named users.mac in the archive. Click here to see a list.
TITLE USERS - TYPE OUT WHO'S ON THE SYSTEM %1(3)
SUBTTL R.CLEMENTS/RCC/PFC/DRL 1-JAN-80
;***COPYRIGHT 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***
SEARCH UUOSYM
LOC 137
BYTE (3)0(9)1(6)0(18)6
RELOC
;1 SKIP [OPR] JOBS
;2 SKIP JOBS UNDER PTY'S, SKIP [SELF]
;3 SKIP REMOTE OPR JOBS
;4 DO 1 BIG OUTSTR
;5 OUTPUT NODE_TTY
;6 ADD Jnn= to display
F=0
A=1
B=2
C=3
D=4
T=5
T1=6
T2=7
N=10
N1=11
CH=12
WD=13
BP=14
CT=15
J=16
P=17
PDLL=30
DEFINE GET (A,B,C)<
XLIST
MOVE T,[XWD A,B]
GETTAB T,
MOVEI T,0
IFNB <C>< MOVEM T,C>
LIST
>
R.REPT==400000
JNA==40000
USRMAX==^D512
OUTSIZ==^D4000
USERS: JFCL
RESET
MOVE P,[IOWD PDLL,PDL]
MOVE F,BFCTIN ;[4]
MOVEM F,BUFCNT ;[4]
MOVE F,BFPTIN ;[4]
MOVEM F,BUFPNT ;[4]
MOVEI F,0
GETPPN T, ;GET MY PPN [2]
JFCL ; [2]
MOVEM T,MYPPN# ; [2]
GET 22,11 ;GET PTY RANGE [2]
JUMPE T,[SETOM FIRPTY ; [2]
JRST .+2] ; [2]
HLRZM T,FIRPTY# ; [2]
MOVEI T,-1(T) ; [2]
ADD T,FIRPTY ; [2]
MOVEM T,LASPTY# ; [2]
GET 2,16 ;IDENTIFY OPERATOR [3]
SKIPN T ;SEE IF KNOWN [3]
MOVE T,[1,,2] ;DEFAULT [3]
MOVEM T,OPRPPN# ;STORE FOR LATER [3]
GET 15,11,SEGPTR
MOVNI T,(T) ;-NUMBER OF JOBS
MOVEM T,MJOBN
MOVSI A,(T) ;AOBJN COUNTER
LOOP1: MOVSI T,(A)
GETTAB T,
MOVEI T,0
MOVEM T,JBTSTS(A)
MOVSI T,(A)
HRRI T,2 ;JBTPPN
GETTAB T,
MOVEI T,0
MOVEM T,JBTPPN(A)
MOVSI T,(A)
HRRI T,3 ;JBTPRG
GETTAB T,
MOVEI T,0
MOVEM T,JBTPRG(A)
MOVSI T,(A)
HRRI T,31
GETTAB T,
MOVEI T,0
MOVEM T,JBTNM1(A)
MOVSI T,(A)
HRRI T,32
GETTAB T,
MOVEI T,0
MOVEM T,JBTNM2(A)
MOVSI T,(A)
HRRI T,10
GETTAB T,
MOVEI T,0
HRRZS T
SKIPE T
PEEK T,
MOVEM T,JBTTTY(A)
HLRZ T1,T ;GET GENERIC [2]
CAIE T1,'TTY' ;SEE IF ATTACHED TTY [2]
JRST LOOPOK ;NO--OK [2]
SKIPGE FIRPTY ;SEE IF PTYS [2]
JRST LOOPOK ;NO--MUST BE OK [2]
HRLZ T1,T ;GET OCTAL PART [2]
MOVEI T,0 ;CLEAR RESULT [2]
LOOPX1: JUMPE T1,LOOPXX ;ALL DONE [2]
LSH T1,3 ;DROP OCTAL [2]
LSHC T,3 ;GET DIGIT [2]
JRST LOOPX1 ;LOOP FOR ALL [2]
LOOPXX: CAML T,FIRPTY ;IS .LT. FIRST PTY [2]
CAMLE T,LASPTY ;OR .GT. LAST [2]
JRST LOOPOK ;THEN OK [2]
SETZM JBTPPN(A) ;ELSE, BATCH OR OPSER--KILL [2]
LOOPOK: AOBJN A,LOOP1
;NOW CLEAR OUT UNDEFINED JOBS
HRLZ A,MJOBN
LOOP2: MOVE T,JBTSTS(A)
TLNN T,JNA
SETZM JBTPPN(A)
AOBJN A,LOOP2
;NOW DUMP THE DATA
HRLZ A,MJOBN
LOOP3: SKIPE C,JBTPPN(A)
CAMN C,MYPPN ;SKIP SELF [2]
JRST NEXT3
XOR C,OPRPPN ;COMPARE WITH OPERATOR [1]
JUMPE C,NEXT3 ; [1]
HLL C,JBTPPN(A) ;REFETCH PROJECT [3]
TLC C,100 ;SEE IF [100+S,,2] [3]
TLZE C,77 ;(CLEAR S) [3]
JUMPE C,NEXT3 ;SKIP IF REMOTE [3]
HLRZ N,JBTPPN(A)
PUSHJ P,OCT6
PUSHJ P,COMMA
HRRZ N,JBTPPN(A)
PUSHJ P,OCTTAB
MOVE T,JBTNM1(A)
PUSHJ P,SIXALL
MOVE T,JBTNM2(A)
PUSHJ P,SIXSP
MOVE T,JBTPRG(A)
PUSHJ P,SIXSP
HRLZ B,MJOBN ;FIND ALL WITH THAT PPN
TRZ F,R.REPT
MOVE C,JBTPPN(A) ;RESTORE TARGET PPN [3]
LOOP4: CAME C,JBTPPN(B)
JRST NEXT4
TROE F,R.REPT ; [2]
PUSHJ P,COMMA
MOVEI CH,"J" ;PUT OUT JOB FIELD [6]
PUSHJ P,TYO ; [6]
HRRZ N,B ;JOB NUMBER [6]
PUSHJ P,DECP ;OUT IT [6]
MOVEI CH,"=" ;BREAK FIELD [6]
PUSHJ P,TYO ; [6]
HLRZ T,JBTTTY(B) ;GET TTY [5]
JUMPE T,[MOVEI CH,"D" ; DETATCHED [5]
JRST DOTTY] ; [5]
CAIE T,'TTY' ;SEE IF REAL TTY [5]
JRST NOTTTY ;NO--OUTPUT LITERAL [5]
MOVEI CH,"T" ;TTY [5]
DOTTY: PUSHJ P,TYO ; [5]
HRLZ T,JBTTTY(B) ;GET NUMBER [5]
SKIPA ; [5]
NOTTTY: MOVE T,JBTTTY(B) ;GET LITERAL VALUE [5]
PUSHJ P,SIXSS ; [5]
MOVE T,JBTTTY(B)
GTNTN. T,
JRST NEXT5
MOVEI CH,"="
PUSHJ P,TYO
HLRZ N,T
PUSHJ P,OCTP
MOVEI CH,"_"
PUSHJ P,TYO
HRRZ N,T
PUSHJ P,OCTP
NEXT5: SETZM JBTPPN(B)
NEXT4: AOBJN B,LOOP4
PUSHJ P,CRLF
NEXT3: AOBJN A,LOOP3
MOVEI 1,0 ;[4]
IDPB 1,BUFPNT ;[4]
OUTSTR BUFFER ;[4]
CALLI 1,12
CALLI 12
OCTTAB: PUSHJ P,OCTP
TAB: MOVEI CH,11
JRST TYO
OCT6: CAIG N,77777
PUSHJ P,SPACE
CAIG N,7777
PUSHJ P,SPACE
CAIG N,777
PUSHJ P,SPACE
CAIG N,77
PUSHJ P,SPACE
CAIG N,7
PUSHJ P,SPACE
OCTP: IDIVI N,10
HRLM N1,0(P)
SKIPE N
PUSHJ P,OCTP
HLRZ CH,0(P)
ADDI CH,"0"
JRST TYO
SPACE: MOVEI CH,40
JRST TYO
SIXALL: MOVE T1,[440600,,T]
SIXAL: ILDB CH,T1
ADDI CH,40
PUSHJ P,TYO
TLNE T1,770000
JRST SIXAL
POPJ P,0
SIXSP: PUSHJ P,SIXALL
JRST SPACE
DECP: IDIVI N,12
HRLM N1,0(P)
SKIPE N
PUSHJ P,DECP
HLRZ CH,0(P)
ADDI CH,"0"
JRST TYO
;SUBRS
CRLF: MOVEI T,[ASCIZ /
/]
MSG: HRLI T,440700
MSGL: ILDB CH,T
JUMPE CH,CPOPJ
PUSHJ P,TYO
JRST MSGL
COMMA: MOVEI CH,","
JRST TYO
CPOPJ: POPJ P,0
SIXSS: MOVE T1,[440600,,T]
SIXSL: ILDB CH,T1
JUMPE CH,CPOPJ
ADDI CH,40
PUSHJ P,TYO
TLNE T1,770000
JRST SIXSL
POPJ P,0
TYO: SOSE BUFCNT ;[4]
JRST TYOI ;[4]
MOVEI J,0 ;[4]
IDPB J,BUFPNT ;[4]
OUTSTR BUFFER ;[4]
MOVE J,BFCTIN ;[4]
MOVEM J,BUFCNT ;[4]
MOVE J,BFPTIN ;[4]
MOVEM J,BUFPNT ;[4]
TYOI: IDPB CH,BUFPNT ;[4]
POPJ P,
SEGPTR: 0
MJOBN: 0
BUFFER: BLOCK <OUTSIZ+1>/5 ;[4]
BFPTIN: POINT 7,BUFFER ;[4]
BUFPNT: BLOCK 1 ;[4]
BFCTIN: OUTSIZ ;[4]
BUFCNT: BLOCK 1 ;[4]
JBTSTS: BLOCK USRMAX
JBTPPN: BLOCK USRMAX
JBTNM1: BLOCK USRMAX
JBTNM2: BLOCK USRMAX
JBTPRG: BLOCK USRMAX
JBTTTY: BLOCK USRMAX
PDL: BLOCK PDLL
END USERS