Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/rsx11s/drres.list
There are no other files named drres.list in the archive.
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3


      1						.TITLE	DRRES
      2						.IDENT	/04/
      3
      4					;
      5					; COPYRIGHT (C) 1974, 1976
      6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
      7					;
      8					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
      9					; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
     10					;
     11					; VERSION 04
     12					;
     13					; D. N. CUTLER 31-AUG-73
     14					;
     15					; PREVIOUSLY MODIFIED BY:
     16					;
     17					;	T. J. MILLER
     18					;
     19					; MODIFIED BY:
     20					;
     21					; MACRO LIBRARY CALLS
     22					;
     23
     24						.MCALL	HDRDF$,PKTDF$,PCBDF$,TCBDF$
     25	000000					HDRDF$			;DEFINE TASK HEADER OFFSETS
     26	000000					PKTDF$			;DEFINE I/O PACKET OFFSETS
     27	000000					PCBDF$			;DEFINE PARTITION CONTROL BLOCK OFFSETS
     28	000000					TCBDF$			;DEFINE TASK CONTROL BLOCK OFFSETS
     29
     30					;+
     31					; **-$DRRES-RESUME TASK EXECUTION
     32					;
     33					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RESUME THE EXECUTION OF A TASK THAT
     34					; HAS ISSUED A SUSPEND DIRECTIVE.
     35					;
     36					; DPB FORMAT:
     37					;
     38					;	WD. 00 -- DIC(47.),DPB SIZE(3.).
     39					;	WD. 01 -- FIRST HALF OF TASK NAME.
     40					;	WD. 02 -- SECOND HALF OF TASK NAME.
     41					;
     42					; INPUTS:
     43					;
     44					;	R0=ADDRESS OF THE TCB OF THE TASK TO BE RESUMED.
     45					;	R1=ADDRESS OF THE TASK STATUS WORD OF THE TASK TO BE RESUMED.
     46					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
     47					;	R3=ADDRESS OF THE LAST WORD IN THE DPB+2.
     48					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
     49					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
     50					;
     51					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
     52					;
     53					;	C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
     54					;		DIRECTIVE STATUS OF +1 IS RETURNED.
     55					;	C=1 IF DIRECTIVE IS REJECTED.
     56					;		DIRECTIVE STATUS OF 'D.RS7 IS RETURNED IF THE SPECIFIED
     57					;			TASK IS NOT ACTIVE.
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3-1


     58					;		DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF THE SPECIFIED
     59					;			TASK IS NOT SUSPENDED.
     60					;-
     61
     62						.ENABL	LSB
     63	000000	005721 			$DRRES::TST	(R1)+		;TASK ACTIVE?
     64	000002	100414 				BMI	20$		;IF MI NO
     65	000004	012702 	000004 			MOV	#T2.SPN,R2	;GET SUSPEND BIT
     66	000010	030211 				BIT	R2,(R1)		;TASK CURRENTLY SUSPENDED?
     67	000012	001005 				BNE	10$		;IF NE YES
     68	000014	005711 				TST	(R1)		;AST IN PROGRESS?
     69	000016	100007 				BPL	30$		;IF PL NO
     70	000020	006302 				ASL	R2		;SET PRE AST SUSPEND BIT
     71	000022	030211 				BIT	R2,(R1)		;WAS TASK SUSPENDED?
     72	000024	001404 				BEQ	30$		;IF EQ NO
     73	000026	040211 			10$:	BIC	R2,(R1)		;CLEAR SUSPEND STATE
     74	000030					CALLR	$SETCR		;SET A CONDITIONAL SCHEDULE REQUEST
     75	000034				20$:	DRSTS	D.RS7		;SET DIRECTIVE STATUS
     76	000036				30$:	DRSTS	D.RS8		;SET DIRECTIVE STATUS
     77
     78					;+
     79					; **-$DRSPN-SUSPEND EXECUTION
     80					;
     81					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE ISSUING
     82					; TASK.
     83					;
     84					; DPB FORMAT:
     85					;
     86					;	WD. 00 -- DIC(45.),DPB SIZE(1.).
     87					;
     88					; INPUTS:
     89					;
     90					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
     91					;	R3=ADDRESS OF THE LAST WORD IN THE DPB+2.
     92					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
     93					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
     94					;
     95					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
     96					;
     97					;	C=0 WITH A DIRECTIVE STATUS OF 'D.RS22'.
     98					;-
     99
    100	000040	052712 	000004 		$DRSPN::BIS	#T2.SPN,(R2)	;SUSPEND CURRENT TASK
    101	000044					CALL	$SETRT		;FORCE A REDISPATCHING OF PROCESSOR
    102	000050					DRSTS	D.RS22		;SET DIRECTIVE STATUS
    103
    104					;+
    105					; **-$DRATP-ALTER TASK PRIORITY
    106					;
    107					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CHANGE THE TASK PRIORITY
    108					; OF THE SPECIFIED TASK.
    109					;
    110					; DPB FORMAT:
    111					;
    112					;	WD. 00 -- DIC(9.),DPB SIZE(4.)
    113					;	WD. 01 -- FIRST HALF OF TASK NAME.
    114					;	WD. 02 -- SECOND HALF OF TASK NAME.
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3-2


    115					;	WD. 03 -- NEW PRIORITY.
    116					;
    117					; INPUTS:
    118					;
    119					;	R0=ADDRESS OF THE TCB OF THE TASK TO BE ALTERED.
    120					;	R1=ADDRESS OF THE TASK STATUS WORD OF THE TASK TO BE ALTERED.
    121					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
    122					;	R3=ADDRESS OF THE LAST WORD IN THE DPB.
    123					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
    124					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
    125					;
    126					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
    127					;
    128					;	C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
    129					;		DIRECTIVE STATUS OF +1 IS RETURNED.
    130					;	C=1 IF DIRECTIVE IS REJECTED.
    131					;		DIRECTIVE STATUS OF 'D.RS7' IS RETURNED IF THE
    132					;			TASK IS NOT ACTIVE.
    133					;		DIRECTIVE STATUS OF 'D.RS95' IS RETURNED IF THE
    134					;			NEW PRIORITY SPECIFIED IS INVALID.
    135					;
    136					;-
    137
    138
    139						.IF DF	A$$PRI
    140
    141					$DRATP::			;REF LABEL
    142
    143
    144						.IF DF	M$$MUP
    145
    146						BIT	#T3.PRV,T.ST3(R5) ;ISSUING TASK PRIVILEGED?
    147						BEQ	180$		;IF EQ NO
    148
    149						.ENDC
    150
    151
    152						MOV	R0,R5		;SAVE TCB ADDR OF TASK TO BE ALTERED
    153						TST	(R1)		;TASK ACTIVE?
    154						BMI	20$		;IF MI NO
    155						MOV	(R3),R3		;GET NEW PRIORITY AND TEST IT
    156						BNE	40$		;IF NE ONE WAS SPECIFIED
    157						BISB	T.DPRI(R5),R3	;USE DEFAULT PRIORITY
    158					40$:	CMP	R3,#250.	;NEW PRIORITY .GT. 250?
    159						BHI	170$		;IF HI YES
    160						MOVB	R3,T.PRI(R5)	;SET NEW PRIORITY
    161						TSTB	T.IOC(R5)	;ANY I/O ACTIVE?
    162						BEQ	100$		;IF EQ NO
    163						CLR	-(SP)		;PUSH INITIAL LUN NUMBER - 1
    164					50$:	MOV	T.PCB(R5),R4	;GET PCB ADDR
    165						MOV	P.HDR(R4),R4	;GET TASK HEADER OF TASK TO BE ALTERED
    166						CMP	(SP),H.NLUN(R4)	;PAST LAST LUN?
    167						BHIS	90$		;IF HIS YES
    168						MOV	(SP),R1		;GET LUN -1
    169						CALL	$MPLNE		;MAP LUN TO UCB ADDRESS
    170						BCS	80$		;IF CS LUN IS NOT ASSIGNED
    171
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3-3


    172
    173						.IF DF	A$$CPS
    174
    175						MOV	R0,-(SP)	;SAVE UCB ADDRESS
    176
    177						.IFTF
    178
    179						MOV	U.SCB(R0),R4	;GET PTR TO SCB FOR THIS UCB
    180						CALL	130$		;REORDER I/O QUEUE
    181
    182						.IFT
    183
    184						MOV	(SP)+,R0	;RETRIEVE UCB ADDRESS
    185						TST	U.CW1(R0)	;DEVICE MOUNTABLE?
    186						BPL	80$		;IF PL NO
    187						BITB	#US.MNT!US.FOR,U.STS(R0) ;MOUNTED AND NOT FOREIGN?
    188						BNE	80$		;IF NE NO
    189						MOV	U.ACP(R0),R4	;PICK UP TCB OF ACP
    190						ADD	#T.RCVL,R4	;POINT TO RECEIVE QUEUE LISTHEAD
    191						CALL	130$		;REORDER ACP QUEUE
    192
    193						.ENDC
    194
    195
    196					80$:	INC	(SP)		;UPDATE LUN NUMBER
    197						BR	50$		;CONTINUE THROUGH LUN LOOP
    198					90$:	TST	(SP)+		;POP LUN NUMBER FROM STACK
    199					100$:	MOV	R5,R0		;GET TCB ADDR OF TASK TO BE ALTERED
    200						CALL	$ACTRM		;REMOVE TCB FROM ATL
    201						BCS	110$		;IF CS TCB NOT YET IN ATL
    202						CALL	$ACTTK		;RE-INSERT TCB IN ATL
    203					110$:				;REF LABEL
    204
    205
    206						.IF DF	D$$ISK
    207
    208						MOV	T.PCB(R5),R4	;GET PCB ADDR
    209						MOV	P.MAIN(R4),R0	;GET MAIN PCB ADDR
    210						ADD	#P.WAIT,R0	;GET LISTHEAD FOR PARTITION WAIT QUEUE
    211						MOV	R5,R1		;POINT TO TASK TCB
    212						CALL	$QRMVT		;TRY TO REMOVE TCB FROM QUEUE
    213						BCS	120$		;IF CS TCB NOT IN WAIT QUEUE
    214						CALL	$QINSP		;RE-INSERT TCB BY NEW PRIORITY
    215					120$:	MOV	R4,R0		;GET PCB ADDR
    216						CALL	$NXTSK		;RE-SCHEDULE PARTITION
    217
    218						.ENDC
    219
    220
    221						CALLR	$DRDSE		;DECLARE SIGNIFICANT EVENT
    222					130$:	MOV	#-2,-(SP)	;CONSTRUCT TEMPORARY LISTHEAD ON STACK
    223						ADD	SP,(SP)		;
    224						CLR	-(SP)		;
    225					140$:	MOV	R4,R0		;GET I/O PACKET LISTHEAD ADDR
    226						MOV	R5,R1		;GET TCB ADDR OF TASK TO BE ALTERED
    227						CALL	$QRMVT		;REMOVE I/O PACKET BY TCB ADDR
    228						BCS	150$		;IF CS NO I/O PACKET FOUND
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3-4


    229						MOVB	T.PRI(R5),I.PRI(R1) ;SET NEW PRIORITY
    230						MOV	SP,R0		;SET TEMPORARY LISTHEAD ADDR
    231						CALL	$QINSF		;INSERT I/O PACKET IN TEMPORARY LIST
    232						BR	140$		;CONTINUE THROUGH PACKET REMOVAL LOOP
    233					150$:	MOV	SP,R0		;SET TEMPORARY LISTHEAD ADDR
    234						CALL	$QRMVF		;REMOVE FIRST I/O PACKET FROM LIST
    235						BCS	160$		;IF CS NO I/O PACKET FOUND
    236						MOV	R4,R0		;GET I/O PACKET LISTHEAD ADDR
    237						CALL	$QINSP		;RE-INSERT I/O PACKET BY NEW PRIORITY
    238						BR	150$		;CONTINUE THROUGH PACKET INSERTION LOOP
    239					160$:	CMP	(SP)+,(SP)+	;CLEAN TEMPORARY LISTHEAD OFF STACK
    240						RETURN			;
    241					170$:	DRSTS	D.RS95		;SET DIRECTIVE STATUS
    242
    243
    244						.IF DF	M$$MUP
    245
    246					180$:	DRSTS	D.RS16		;PRIVILEGE VIOLATION
    247
    248						.ENDC
    249
    250
    251						.ENDC
    252
    253
    254						.DSABL	LSB
    255
    256		000001 				.END
DRRES	MACRO M1110  22-AUG-79 07:03  PAGE 3-5
SYMBOL TABLE

AS.DEL= 000010   	H.FPVA  000034   	L$$DRV= 000000   	R$$SND= 000000   	T2.CAF= 000400
AS.EXT= 000004   	H.GARD  000072   	M$$CRB= 000124   	R$$11M= 000000   	T2.CHK= 020000
AS.RED= 000001   	H.HDLN  000002   	M$$MGE= 000000   	R$$11S= 000000   	T2.CKD= 010000
AS.WRT= 000002   	H.IPC   000016   	M$$NET= 000000   	S$$YSZ= 001740   	T2.DST= 040000
A$$CHK= 000000   	H.IPS   000014   	M$$NT2= 000000   	TS.BLK= 170700   	T2.FXD= 002000
A$$CPS= 000000   	H.ISP   000020   	N$$LDV= 000001   	TS.CKP= 000200   	T2.HLT= 000200
A$$TRP= 000000   	H.LUN   000076   	PS.APR= 000007   	TS.CKR= 000100   	T2.SPN= 000004
A.AST   000006   	H.NLUN  000074   	PS.CHK= 010000   	TS.EXE= 100000   	T2.STP= 000020
A.BYT   000004   	H.NML   000061   	PS.CKP= 040000   	TS.MSG= 020000   	T2.TIO= 001000
A.CBL   000002   	H.ODVA  000022   	PS.CKR= 020000   	TS.NRP= 010000   	T2.WFR= 000001
A.DQSR  177776   	H.ODVL  000024   	PS.COM= 000200   	TS.OUT= 000400   	T3.ACP= 100000
A.IOC   000003   	H.OVLY  000054   	PS.DEL= 000010   	TS.RDN= 040000   	T3.CAL= 000100
A.KSR5  177774   	H.PFVA  000032   	PS.DRV= 000020   	TS.RUN= 004000   	T3.CLI= 001000
A.LGTH= 000014   	H.RCVA  000036   	PS.FXD= 004000   	T.ACTL  000052   	T3.MCR= 004000
A.MPCT  000011   	H.RRVA  000062   	PS.LIO= 001000   	T.ASTL  000016   	T3.NET= 000020
A.NPR   000010   	H.SPRI  000060   	PS.NSF= 000400   	T.ATT   000054   	T3.NSD= 000200
A.PCB   000012   	H.TKVA  000026   	PS.OUT= 100000   	T.CPCB  000004   	T3.PMD= 040000
A.PCBL  000000   	H.TKVL  000030   	PS.PER= 002000   	T.DPRI  000040   	T3.PRV= 010000
A.PRI   000002   	H.VEXT  000056   	PS.PIC= 000100   	T.EFLG  000022   	T3.REM= 020000
A.PRM   000012   	H.WND   000044   	PS.SYS= 000040   	T.IOC   000003   	T3.ROV= 000040
A.STAT  000010   	I$$RDN= 000000   	P$$RTY= 000000   	T.LBN   000041   	T3.RST= 000400
A.TCB   000004   	I.AST   000022   	P$$TPT= 000000   	T.LDV   000044   	T3.SLV= 002000
A.TCBL  000006   	I.ATTL= 000044   	P.BLKS  000016   	T.LNK   000000   	V$$CTR= 001200
C$$ORE= 002000   	I.EFN   000003   	P.BUSY  000024   	T.MXSZ  000050   	V$$RSN= 000031
D.RS22= ****** GX	I.FCN   000012   	P.IOC   000003   	T.NAM   000006   	W.BATT  000006
D.RS7 = ****** GX	I.IOSB  000014   	P.LNK   000000   	T.OFF   000060   	W.BFPD  000014
D.RS8 = ****** GX	I.LGTH= 000044   	P.MAIN  000012   	T.PCB   000046   	W.BHVR  000004
G$$TPP= 000000   	I.LNK   000000   	P.NAM   000004   	T.PRI   000002   	W.BLGH  000020
G$$TTK= 000000   	I.LN2   000006   	P.OWN   000026   	T.RCVL  000012   	W.BLPD  000016
H$$RTZ= 000074   	I.PRI   000002   	P.PRI   000002   	T.RRFL  000064   	W.BLVR  000002
H.CSP   000000   	I.PRM   000024   	P.REL   000014   	T.SRCT  000063   	W.BNPD  000015
H.CUIC  000010   	I.TCB   000004   	P.SIZE  000016   	T.STAT  000032   	W.BOFF  000012
H.DSW   000046   	I.UCB   000010   	P.STAT  000030   	T.ST2   000034   	W.BPCB  000000
H.DUIC  000012   	K$$CNT= 177546   	P.SUB   000010   	T.ST3   000036   	W.BSIZ  000010
H.EFLM  000004   	K$$CSR= 177546   	P.SWSZ  000022   	T.TCBL  000030   	X$$DBT= 000000
H.EFSV  000040   	K$$IEN= 000115   	P.TCB   000026   	T.UCB   000026   	$DRRES  000000RG
H.FCS   000050   	K$$LDC= 000001   	P.WAIT  000020   	T2.ABO= 000100   	$DRSPN  000040RG
H.FORT  000052   	K$$TPS= 000074   	R$$DER= 000000   	T2.AST= 100000   	$SETCR= ****** GX
H.FPSA  000042   	L$$ASG= 000000   	R$$EXV= 000000   	T2.BFX= 004000   	$SETRT= ****** GX

. ABS.	177776	   000
      	000052	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3809 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  5092 WORDS  ( 19 PAGES)
ELAPSED TIME:  00:00:18
[11,24]DRRES,SY0:[11,34]DRRES/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,DRRES