Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50357/rwatch.mac
There are no other files named rwatch.mac in the archive.
	TITLE	RWATCH  PROGRAM BY ROBERT WILSON
	SUBTTL	SYOSSET HIGH SCHOOL -- 1974-75
	PRINTX	RWATCH
	LOC	124
	EXP	RENTER
	LOC	137
	701002,40
	LOC	125
	EXP	AP
	DEFINE	ECHO(X)
	<TTCALL	6,1
	TL'X	1,4
	TTCALL	7,1>
	TWOSEG
	RELOC	400000
	PRINTX	^^^^^^^HIGH SEGMENT^^^^^^^^
START:	CALLI
	MOVEI	1,147
	SETOM	JOB(1)
	SOJGE	1,.-1
	MOVE	0,[IOWD 25,PDL]
	MOVEI	3,635110
	CALLI	3,16
	JFCL
QUELST:	MOVEI	16,0
	MOVEI	1,0
	HRL	2,1
	HRRI	2,25
	CALLI	2,41
	JRST	AFTER
	MOVEI	17,1
	MOVE	3,[POINT 12,2]
LOAD:	ILDB	4,3
	MOVEM	4,QUEUES(16)
	ADDI	16,1
	ADDI	17,1
	CAIE	17,4
	JRST	LOAD
	ADDI	1,1
	CAIE	1,10
	JRST	QUELST+2
AFTER:	TTCALL	3,[ASCIZ/TYPE ? FOR HELP
/]
RENTER:	ECHO	O
	TTCALL	10,
	TTCALL	4,1
	CAIE	1,33
	CAIN	1,12
	JRST	INSTR
	CAIE	1,73
	CAIN	1,55
	JRST	INSTR
	JRST	.-7
INSTR:	TTCALL	3,[ASCIZ/*/]
	TTCALL	0,1
INSTRB:	CAIN	1,137
	JRST	LSTCOM
	MOVEM	1,COMAND
	CAIN	1,114
	JRST	LIST
	CAIN	1,101
	JRST	ALLJOB
	CAIN	1,132
	JRST	ZAP
	CAIN	1,14
	JRST	LOGOUT
	CAIN	1,122
	JRST	RUN
	CAIN	1,103
	JRST	CHAIN
	CAIN	1,120
	JRST	CORWTH
	CAIN	1,104
	JRST	DAYTME
	CAIN	1,102
	JRST	BATCH
	CAIN	1,52
	JRST	COMLST
	CAIN	1,77
	JRST	HELP
	CAIN	1,112
	JRST	JOBNUM
	CAIN	1,116
	JRST	NAME
	CAIN	1,133
	JRST	PPNNUM
	CAIN	1,125
	JRST	USERS
	CAIE	1,32
	CAIN	1,105
	JRST	FINISH
	CAIN	1,124
	JRST	TTYNUM
	CAIN	1,43
	JRST	LOGNUM
	CAIE	1,123
	CAIN	1,121
	JSP	10,MODE
	CAIN	1,110
	JRST	HGHJOB
	CAIN	1,117
	JRST	OWNPPN
	CAIN	1,113
	JRST	KCORE
	CAIN	1,111
	JRST	ID
	CAIL	1,60
	CAILE	1,71
	JRST	.+2
	JRST	PTYWTC
	CAIN	1,115
	JRST	RUNTIM
	CAIN	1,40
	JRST	DETWTC
	CAIN	1,33
	JRST	CTYWTC
	CAIN	1,73
	JRST	COMENT
	CAIN	1,41
	JRST	ONEPAS
	JRST	INSTR
	PRINTX ALL JOBS
ALLJOB:	TTCALL	3,[ASCIZ/ALL JOBS:
/]
	MOVE	2,[XWD 20,12]
	CALLI	2,41
	JRST	INSTR
JOBST:	MOVEI	17,1
GETALL:	PUSHJ	0,JOBDAT
	SKIPE	16
	JRST	NXTJOB
	TTCALL	2,1
	JRST	ADDJOB
	JRST	RETURN
NXTJOB:	CAMN	14,JOB(17)
	JRST	ADDJOB
	PUSHJ	0,OUTSYS
	TTCALL	3,[BYTE(7) 15,12,0]
ADDJOB:	TTCALL	2,1
	JRST	.+2
	JRST	RETURN
	CAMN	17,2
	JRST	PASCHK
	ADDI	17,1
	JRST	GETALL
RETURN:	CAIE	1,121
	CAIN	1,123
	JSP	10,MODE
	SKIPN	1
	JRST	ADDJOB+3
	SKIPE	PASS1
	JRST	ENDPAS
BACK:	MOVE	3,2
	SETOM	JOB(3)
	SOJGE	3,.-1
	JRST	INSTRB
	PRINTX	ONEPASS
ONEPAS:	SETOM	PASS1
	JRST	ALLJOB
ENDPAS:	SETZM	PASS1
	MOVE	3,2
	SETOM	JOB(3)
	SOJGE	3,.-1
	JRST	INSTR
PASCHK:	SKIPE	PASS1
	JRST	ENDPAS
	JRST	JOBST
	PRINTX	BATCH
BATCH:	TTCALL	3,[ASCIZ/BATCH JOB STATUS
/]
	MOVE	3,[51,,11]
	CALLI	3,41
	JRST	NOBAT
	SKIPN	3
	JRST	NOBAT
	MOVE	10,[52,,11]
	CALLI	10,41
	JFCL
	MOVE	5,[55,,11]
	CALLI	5,41
	JFCL
	PUSHJ	DECOUT
	TTCALL	3,[ASCIZ/ GUARANTEED: /]
	MOVE	10,5
	PUSHJ	DECOUT
	TTCALL	3,[ASCIZ/ IN USE OUT OF A MAXIMUM OF /]
	MOVE	10,3
	PUSHJ	DECOUT
	TTCALL	3,[BYTE(7) 15,12]
	JRST	INSTR
NOBAT:	TTCALL	3,[ASCIZ/NO BATCH ALLOWED ON THIS SYSTEM.
/]
	JRST	INSTR
	PRINTX	LAST COMMAND
LSTCOM:	MOVE	1,COMAND
	JRST	INSTRB
	PRINTX	LIST
LIST:	TTCALL	3,[ASCIZ/LIST OF NOTES:
/]
	TTCALL	3,HELP2
	TTCALL	3,[BYTE(7) 15,12,0]
	JRST	INSTR
	PRINTX	COMMANDS
COMLST:	TTCALL	3,HELP3
	TTCALL	3,[BYTE(7) 15,12]
	JRST	INSTR
	PRINTX HIGH JOB
HGHJOB:	TTCALL	3,[ASCIZ/HIGHJOB = /]
	MOVE	10,[XWD 20,12]
	CALLI	10,41
	JRST	INSTR
	PUSHJ	DECOUT
	TTCALL	3,[BYTE(7) 15,12,0]
	JRST	INSTR
	PRINTX	COMMENTS
COMENT:	TTCALL	1,1
	TTCALL	1
	TTCALL	1,1
	CAIN	1,12
	JRST	INSTR
	CAIE	1,33
	JRST	COMENT+1
	TTCALL	3,[BYTE(7) 15,12]
	JRST	INSTR
	PRINTX DATE AND TIME
DAYTME:	TTCALL	3,[ASCIZ/DATE AND TIME:  /]
	MOVEI	4,0
	MOVE	3,[XWD 60,11]
	CALLI	3,41
	JFCL
	MOVE	10,3
	PUSHJ	DECOUT
	TTCALL	1,["-"]
	MOVE	3,[XW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	3,[ASCIZ/# OF JOBS LOGGED IN -- /]
	MOVE	10,[XWD 54,11]
	CALLI	10,41
	JRST	INSTR
	MOVE	4,[XWD 50,11]
	CALLI	4,41
	JRST	INSTR
	PUSHJ	DECOUT
	TTCALL	3,[ASCIZ/ OUT OF /]
	MOVE	10,4
	PUSHJ	DECOUT
	TTCALL	3,[BYTE(7) 15,12,0]
	JRST	INSTR
	PRINTX	USERS
USERS:	TTCALL	3,[ASCIZ/USERS NAMED: /]
	PUSHJ	SIXIN
	MOVEM	3,WRDONE
	MOVEM	4,WRDTWO
	MOVE	2,[XWD 20,12]
	CALLI	2,41
	JRST	INSTR
USERST:	MOVEI	17,1
	PUSHJ	JOBDAT
	CAMN	12,WRDONE
	CAME	13,WRDTWO
	JRST	ADDUSE
	CAME	14,JOB(17)
	CAIN	16,0
	JRST	ADDUSE
	PUSHJ	OUTSYS
	TTCALL	3,[BYTE(7) 15,12,0]
ADDUSE:	TTCALL	2,1
	JRST	.+2
	JRST	USEBCK
	CAMN	17,2
	JRST	USERST
	ADDI	17,1
	JRST	USERST+1
USEBCK:	CAIE	1,121
	CAIN	1,123
	JSP	10,MODE
	SKIPN	1
	JRST	ADDUSE+3
	JRST	BACK
	PRINTX	TTY
TTYNUM:	TTCALL	3,[ASCIZ/TTY/]
	PUSHJ	OCTIN
	MOVE	6,3
GETTTY:	MOVE	2,[XWD 20,12]
	CALLI	2,41
	JRST	INSTR
	MOVEM	6,TTYNAM
TTYST:	MOVEI	17,1
TTYSRC:	PUSHJ	0,JOBDAT
	CAME	15,TTYNAM
	JRST	ADDTTY
	CAME	1,PTYNUM
	CAMN	14,JOB(17)
	JRST	ADDTTY
	PUSHJ	0,OUTSYS
	TTCALL	3,[BYTE(7) 15,12,0]
ADDTTY:	TTCALL	2,1
	JRST	.+2
	JRST	TTYBCK
	CAME	17,2
	JRST	.+2
	JRST	TTYST
	ADDI	17,1
	JRST	TTYSRC
TTYBCK:	CAIE	1,121
	CAIN	1,123
	JSP	10,MODE
	SKIPN	1
	JRST	ADDTTY+3
	JRST	BACK
	PRINTX	PTY'S
PTYWTC:	TTCALL	3,[ASCIZ/PTY/]
	SETZ	3,
	IMULI	3,10
	SUBI	1,60
	ADD	3,1
	ADDI	1,60
	TTCALL	1,1
	TTCALL	4,1
	CAIN	1,15
	JRST	.-3
	CAIE	1,12
	CAIN	1,33
	JRST	.+2
	JRST	PTYWTC+2
	TTCALL	1,1
	TTCALL	3,[BYTE(7) 15,12]
	MOVE	2,[XWD 20,12]
	CALLI	2,41
	JRST	INSTR
	MOVEM	3,PTYLOC
PTYST:	MOVEI	17,1
	PUSHJ	JOBDAT
	CAME	1,PTYNUM
	CAME	15,PTYLOC
	JRST	ADDPTY
	SKIPE	16
	CAMN	14,JOB(17)
	JRST	ADDPTY
	PUSHJ	OUTSYS
	TTCALL	3,[BYTE(7) 15,12]
ADDPTY:	TTCALL	2,1
	JRST	.+2
	JRST	PTYBCK
	CAMN	17,2
	JRST	PTYST
	ADDI	17,1
	JRST	PTYST+1
PTYBCK:	CAIE	1,121
	CAIN	1,123
	JSP	10,MODE
	SKIPN	1
	JRST	ADDPTY+3
	JRST	BACK
	PRINTX	DET'S
DETWTC:	TTCALL	2,1
	JFCL
	TTCALL	3,[ASCIZ/DETACHED JOBS:/]
	TTCALL	3,[BYTE(7) 15,12]
	MOVE	2,[XWD 20,12]
	CALLI	2,41
	JRST	INSTR
DETST:	MOVEI	17,1
	PUSHJ	JOBDAT
	SKIPN	16
	JRST	ADDDET
	CAMN	1,DETNUM
	CAMN	14,JOB(17)
	JRST	ADDDET
	PUSHJ	OUTSYS
	TTCALL	3,[BYTE(7) 15,12]
ADDDET:	TTCALL	2,1
	JRST	.+2
	JRST	DETBCK
	CAMN	17,2
	JRST	DETST
	ADDI	17,1
	JRST	DETST+1
DETBCK:	CAIE	1,121
	CAIN	1,123
	JSP	10,MODE
	SKIPN	1
	JRST	ADDDET+3
	JRST	BACK
	PRINTX	CTY'S
CTYWTC:	TTCALL	3,[ASC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XIN+6
SIXBCK:	ECHO	O
	POPJ
	PRINTX	NAME
NAME:	TTCALL	3,[ASCIZ/NAME /]
	PUSHJ	SIXIN
	CALLI	3,43
	JFCL
	JRST	INSTR
	PRINTX	JOBDAT
JOBDAT:	MOVS	14,17
	ADDI	14,3
	CALLI	14,41
	JFCL
	MOVS	12,17
	ADDI	12,31
	CALLI	12,41
	JFCL
	MOVS	13,17
	ADDI	13,32
	CALLI	13,41
	JFCL
	MOVS	16,17
	ADDI	16,2
	CALLI	16,41
	JFCL
	MOVE	15,[XWD 22,11]
	CALLI	15,41
	JFCL
	HLRZS	15
	SUBI	15,1
	MOVEM	15,CTYN
	MOVE	15,17
	CALLI	15,115
	JRST	DET
	SUBI	15,200000
	CAMGE	15,CTYN
	MOVE	1,[ASCIZ/TTY/]
	CAMN	15,CTYN
	JRST	.+2
	JRST	.+4
	MOVEI	15,-1
	MOVE	1,[ASCIZ/CTY/]
	JRST	JBSTS
	CAMLE	15,CTYN
	JRST	PTY
	JRST	JBSTS
PTY:	MOVE	1,[ASCIZ/PTY/]
	SUB	15,CTYN
	SUBI	15,1
	JRST	JBSTS
DET:	MOVE	1,[ASCIZ/DET/]
	MOVEI	15,-1
JBSTS:	MOVN	7,17
	CALLI	7,61
	JFCL
	SKIPN	QMODE
	JRST	ENDDAT
	MOVE	7,14
	HRLZ	14,17
	CALLI	14,41
	JRST	ENDDAT
	MOVE	12,[POINT 5,14,14]
	LDB	13,12
	MOVE	14,QUEUES(13)
ENDDAT:	MOVEI	5,25
	CALLI	5,72
	JFCL
	POPJ	0,
	PRINTX	OUTSYS
OUTSYS:	TTCALL	3,1
	MOVE	10,15
	CAIE	10,-1
	JRST	.+3
	JFCL
	JRST	NXTOUT
	PUSHJ	0,OCTOUT
	CAME	1,PTYNUM
	JRST	NXTOUT
	TTCALL	1,["-"]
	MOVE	10,17
	CALLI	10,65
	JRST	NXTOUT
	PUSHJ	DECOUT
NXTOUT:	TTCALL	1,[11]
	MOVE	10,17
	PUSHJ	0,DECOUT
	TTCALL	1,[11]
	SKIPE	QMODE
	JRST	.+7
	MOVE	10,12
	PUSHJ	0,SIXOUT
	MOVE	10,13
	PUSHJ	0,SIXOUT
	TTCALL	1,[11]
	JRST	.+3
	MOVE	10,7
	JRST	.+2
	MOVE	10,14
	PUSHJ	0,SIXOUT
	TTCALL	1,[11]
	SKIPE	QMODE
	JRST	SYSOUT
	TTCALL	1,["["]
	HLRZ	10,16
	PUSHJ	0,OCTOUT
	TTCALL	1,[","]
	HRRZ	10,16
	PUSHJ	0,OCTOUT
	TTCALL	1,["]"]
	TLNE	7,^B000001000000000000
	TTCALL	3,[ASCIZ/ +/]
	TLNE	7,^B001000000000000000
	TTCALL	3,[ASCIZ/ ^C/]
	MOVS	3,17
	HRRI	3,40
	CALLI	3,41
	JRST	.+3
	TLNE	3,100
	TTCALL	3,[ASCIZ/ */]
	HRLZ	3,17
	CALLI	3,41
	JRST	.+3
	TRNE	3,2000
	TTCALL	3,[ASCIZ/ $/]
	HRLZ	3,17
	HRRI	3,14
	CALLI	3,41
	JRST	.+5
	TRNE	3,-1
	TTCALL	3,[ASCIZ/ ^/]
	TLNE	3,200000
	TTCALL	3,[ASCIZ/ #/]
	JRST	.+3
SYSOUT:	MOVE	10,14
	PUSHJ	SIXOUT
	MOVEM	14,JOB(17)
	MOVEM	14,OUTPUT
	MOVEM	16,OUTPPN
	POPJ	0,
	PRINTX	OUTPUT
OCTOUT:	SKIPA	6,[10]
DECOUT:	MOVEI	6,12
	IDIV	10,6
	PUSH	0,11
	SKIPE	10
	PUSHJ	0,DECOUT+1
	POP	0,10
	ADDI	10,60
	TTCALL	1,10
	POPJ	0,
SIXOUT:	MOVE	11,[POINT 6,10]
	ILDB	3,11
	ADDI	3,40
	TTCALL	1,3
	TLNN	11,770000
	POPJ	0,
	JRST	SIXOUT+1
	PRINTX	ERRORS
AP:	JRSTF	@127
	RELOC	140
	PRINTX	______LOW SEGMENT_____
	PRINTX	MEMORY
FINISH:	TTCALL	3,[ASCIZ/EXIT/]
	ECHO	Z
	CALLI	1,12
JOB:	BLOCK	150
PDL:	BLOCK	25
CTYN:	0
CORNAM:	0
TTYNAM:	0
WRDONE:	0
WRDTWO:	0
QMODE:	0
PTYNUM:	ASCIZ/PTY/
DETNUM:	ASCIZ/DET/
CTYNUM:	ASCIZ/CTY/
KILCOR:	0
QUEUES:	BLOCK	50
PASS1:	0
COMAND:	0
MONTH:	0
	ASCIZ/JAN/
	ASCIZ/FEB/
	ASCIZ/MAR/
	ASCIZ/APR/
	ASCIZ/MAY/
	ASCIZ/JUN/
	ASCIZ/JUL/
	ASCIZ/AUG/
	ASCIZ/SEP/
	ASCIZ/OCT/
	ASCIZ/NOV/
	ASCIZ/DEC/
PTYLOC:	0
OUTPUT:	0
OUTPPN:	0
JIF:	0
MNT:	0
SEC:	0
PROG2:	SIXBIT/SYS/
	SIXBIT/LOGOUT/
	BLOCK	4
PROG3:	SIXBIT/SYS/
	BLOCK	5
PROG4:	SIXBIT/DSK/
	BLOCK	5
PROG:	SIXBIT/SYS/
	SIXBIT/CANCEL/
	BLOCK	4
	PRINTX	HELP TEXT
HLPTXT:	ASCIZ/	'RWATCH' IS USED TO WATCH THE SYSTEM. YOU CAN WATCH
ALLJOBS, A SPECIFIED JOB, A SPECIFIED PPN, A SPECIFIED PROGRAM IN CORE,
 A SPECIFIED TTY, OR A SPECIFIED USER.
BELOW IS THE OUTPUT FORMAT:

TTY#  JOB#  USER  PROG IN USER'S CORE  PPN  + ^C $ * ^ #

THE '+','*','$', '^', '#', AND '^C' APPEAR ONLY UNDER THE CIRCUMSTANCES LISTED:
/
HELP2:	ASCIZ/

	+	MEANS JOBS JACCT BIT IS SET
	^C	MEANS JOB IS AT MONITOR LEVEL
	*	MEANS PROGRAM IS FROM SYS
	$	MEANS EXECUTE ONLY
	^	MEANS PROGRAM HAS A HIGH SEGMENT
	#	MEANS HIGH SEGMENT IS SHARABLE
/
HELP3:	ASCIZ/

BELOW IS A LIST OF COMMANDS:

	A	TO WATCH ALL JOBS
	B	FOR BATCH JOB STATUS
	S	TO RETURN TYPEOUT TO STANDARD MODE
	H	FOR HIGHEST JOB NUMBER CURRENTLY ASSIGNED
	I	YOUR ID
	#	FOR NUMBER OF JOBS LOGGED IN
	O	TO WATCH OWN PPN
	Q	TO ENTER QUICK MODE (TTY,JOB,PROGRAM, AND JOB QUEUE)
	U	TO WATCH A USER
	K	FOR VIRTUAL CORE
	M	RUNTIME FOR JOB (RETURN ONLY GIVES ALL JOBS)
	C	CHAIN TO 'DSK' FILE (MUST BE .SAV)
		IF NO FILE NAMED, LAST OUTPUT IS USED
	D	FOR DATE AND TIME
	?	FOR HELP
	J	TO WATCH A CERTAIN JOB
	^L	(CONTROL-L)TO LOGOUT
	N	TO CHANGE PROGRAM NAME (SETNAM)
	[	TO WATCH A CERTAIN PPN
	P	TO WATCH A PROGRAM
	R	TO RUN 'SYS' FILE (DEVICE SYS)
		IF NO FILE NAMED, LAST OUTPUT IS USED
	E	TO EXIT FROM THE PROGRAM (ALSO ^Z)
	T	TO WATCH A CERTAIN TTY
	!	TO LIST ALL JOBS
	<SPACE>	TO WATCH DETACHED JOBS
	<ESC>	TO WATCH THE CTY
	0-9	TO WATCH PTY'S - TYPE IN PTY NUMBER
	;	TO DOCUMENT A RUN OF 'RWATCH'
	*	FOR A LIST OF COMMANDS
	_	TO REENTER LAST COMMAND
	L	TO GET A LIST OF NOTES
	X	TO EXIT A LOOP
	Z	TO CANCEL, TYPE JOB# AFTER '>'


	FOR MORE DETAILED HELP SEE 'RWATCH.HLP'

/
	END	START