Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99e-bb - pulsar.c08
There is 1 other file named pulsar.c08 in the archive. Click here to see a list.
 INS 37/3	;08C1
	G$INDP:: BLOCK	1			;INDEPENDANT PROJECT-PROGRAMMER NUMBERS
	G$SEQC:: BLOCK	1			;CODE TO PROCESS SEQUENCE ERRORS
	G$REEL:: BLOCK	1			;TEMP STORAGE FOR REELID (PLRINI)
 INS 22/11	;08C2
		[ASCIZ /ABORT/]
 REP 27/11	;08C3
		SKIPE	TCB.WS(B)		;THIS TCB IDLE?
		$RETF				;NO, PROCESS IT LATER
		LOAD	S1,TLM.ST(M),TS.INF	;GET XTRA INFO FROM MESSAGE
		STORE	S1,TCB.IN(B)		;STORE IN TCB
		LOAD	S1,TLM.ST(M),TS.RQT	;GET BACK REQUEST TYPE FROM MESSAGE
		MOVE	S1,MSGD.4(S1)		;Get dispatch addr
		PJRST	G$NPRC			;Create new stack
 WIT
		LOAD	S1,TLM.ST(M),TS.RQT	;GET THE REQUEST TYPE ON TAPE LABEL MSG
		SKIPL	S1,MSGD.4(S1)		;GET FLAGS,,DISPATCH
		SKIPN	TCB.WS(B)		;THIS TCB IDLE?
		SKIPA	S2,[TI.ABO]		;FUNCTION IS OK EVEN IF TCB ISN'T IDLE
		$RETF				;NO, PROCESS IT LATER
		TLNE	S1,LD.ABO		;ABORTING?
		IORM	S2,TCB.IO(B)		;TURN ON FOR THE SCHEDULER
		LOAD	S2,TLM.ST(M),TS.INF	;GET XTRA INFO FROM MESSAGE
		STORE	S2,TCB.IN(B)		;STORE IN TCB
		LOAD	S2,TLM.ST(M),TS.RQT	;GET BACK REQUEST TYPE FROM MESSAGE
		HRRZS	S1			;STRIP OFF FLAGS
		PJRST	G$NPRC			;CREATE NEW STACK
 REP 43/11	;08C4
	MSGD.4:	Z				;ILLEGAL REQUEST TYPE, CAUGHT ABOVE
		L$FINPUT##			;FIRST INPUT
		L$FOUTPUT##			;FIRST OUTPUT
		L$POSI##			;POSITIONING REQUEST
		L$TMARK##			;TAPE MARK SEEN
		L$EOT##				;PHYSICAL EOT SEEN
		L$CLIN##			;CLOSE INPUT
		L$CLOU##			;CLOSE OUTPUT
		L$FEOV##			;FORCE END OF VOLUME
		L$USRQ##			;USER REQUEST
 WIT

	; Labeler function dispatch
	; Format: XWD	flags,processor-addr
	; where flags are:

		LD.ANY==400000			;LEGAL FOR ANY WS (MUST BE SIGN BIT)
		LD.ABO==200000			;ABORT


	MSGD.4:	XWD	0,0			;ILLEGAL REQUEST TYPE, CAUGHT ABOVE
		XWD	0,L$FINPUT##		;FIRST INPUT
		XWD	0,L$FOUTPUT##		;FIRST OUTPUT
		XWD	0,L$POSI##		;POSITIONING REQUEST
		XWD	0,L$TMARK##		;TAPE MARK SEEN
		XWD	0,L$EOT##		;PHYSICAL EOT SEEN
		XWD	0,L$CLIN##		;CLOSE INPUT
		XWD	0,L$CLOU##		;CLOSE OUTPUT
		XWD	0,L$FEOV##		;FORCE END OF VOLUME
		XWD	0,L$USRQ##		;USER REQUEST
		XWD	LD.ANY+LD.ABO,L$ABOR##	;ABORT CURRENT OPERATION
 REP 12/12	;08C5
		LOAD	T1,TCB.WS(P1)		;GET THE WAIT STATE CODE
		JUMPGE	T1,CHKJ.2		;STEP TO NEXT IF THIS NOT RUNNABLE
		MOVEM	P1,TCB.AC+B(P1)		;Make process' B point to TCB
		ZERO	TCB.WS(P1)		;MARK TCB AS IDLE NOW
 WIT
		MOVE	T1,TCB.WS(P1)		;GET THE WAIT STATE CODE
		MOVX	T2,TI.ABO		;GET THE ABORT OPERATION BIT
		TDNN	T2,TCB.IO(P1)		;ABORTING?
		JUMPGE	T1,CHKJ.2		;NO--STEP TO NEXT IF THIS NOT RUNNABLE
		MOVEM	P1,TCB.AC+B(P1)		;Make process' B point to TCB
		TDNN	T2,TCB.IO(P1)		;ABORTING?
		SETZM	TCB.WS(P1)		;NO--MARK TCB AS IDLE NOW
 REP 23/14	;08C6
	G$STRN::MOVX	S1,TW.RUN		;Get runnable code
		STORE	S1,TCB.WS(B)		;Set in TCB
		DOSCHD				;Force a scheduling pass
		$RETT
 WIT
	G$STRN::MOVX	TF,TI.ABO		;GET ABORT BIT
		TDNE	TF,TCB.IO(B)		;ABORTING?
		SKIPA	S1,TCB.WS(B)		;YES
		MOVX	S1,TW.RUN		;GET RUNNABLE CODE
		MOVEM	S1,TCB.WS(B)		;SET WAIT STATE
		DOSCHD				;FORCE A SCHEDULING PASS
		$RETT				;RETURN
 REP 17/15	;08C7
		PJRST	G$STRN			;And mark this one runnable
 WIT
		PJRST	G$STRN			;And mark this one runable
 SUM 41138