Google
 

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


      1						.TITLE	DRRAS
      2						.IDENT	/07/
      3
      4					;
      5					; COPYRIGHT (C) 1974, 1978
      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 07
     12					;
     13					; D. N. CUTLER 4-SEP-73
     14					;
     15					; PREVIOUSLY MODIFIED BY:
     16					;
     17					;	T. J. MILLER
     18					;
     19					; MODIFIED BY:
     20					;
     21					;	T. J. MILLER 26-MAY-77
     22					;
     23					;		TM086 -- MODIFY TO USE COMMON EVENT FLAG SETTING
     24					;			ROUTINE.
     25					;
     26					;	T. J. MILLER 17-SEP-77
     27					;
     28					;		TM107 -- ADDITION OF SUPPORT FOR RECEIVE FROM SPECIFIED
     29					;			TASK.
     30					;
     31					; RECEIVE AND SEND DIRECTIVES
     32					;
     33					; MACRO LIBRARY CALLS
     34					;
     35
     36						.MCALL	HDRDF$,TCBDF$
     37	000000					HDRDF$			;DEFINE TASK HEADER OFFSETS
     38	000000					TCBDF$			;DEFINE TASK CONTROL BLOCK OFFSETS
     39
     40					;+
     41					; **-$DRREC-RECEIVE DATA AND RECEIVE DATA OR EXIT
     42					;
     43					; THESE DIRECTIVES INSTRUCT THE SYSTEM TO DEQUEUE A DATA BLOCK FROM THE
     44					; ISSUING TASK'S RECEIVE QUEUE. IF THE DIRECTIVE IS RECEIVE DATA OR EXIT,
     45					; THEN A TASK EXIT WILL BE EFFECTED IF NO DATA IS QUEUED.
     46					;
     47					; DPB FORMAT:
     48					;
     49					;	WD. 00 -- DIC(75. OR 77.),DPB SIZE(4.).
     50					;	WD. 01 -- FIRST HALF OF SENDER TASK NAME OR 0 FOR ANY TASK.	; TM107
     51					;	WD. 02 -- SECOND HALF OF SENDER TASK NAME.			; TM107
     52					;	WD. 03 -- ADDRESS OF A FIFTEEN WORD RECEIVE BUFFER.		;**-2
     53					;
     54					; INPUTS:
     55					;
     56					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
     57					;	R3=ADDRESS OF THE SECOND WORD IN THE DPB.
DRRAS	MACRO M1110  22-AUG-79 07:02  PAGE 3-1


     58					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
     59					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
     60					;
     61					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
     62					;
     63					;	C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
     64					;		DIRECTIVE STATUS OF +1 IS RETURNED.
     65					;	C=1 IF DIRECTIVE IS REJECTED.
     66					;		DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF NO DATA
     67					;			IS QUEUED IN TASK'S RECEIVE QUEUE.
     68					;-
     69
     70
     71						.IF DF R$$SND
     72
     73	000000	016346 	177776 		$DRREC::MOV	-2(R3),-(SP)	;SAVE DIC CODE OF DIRECTIVE		; TM107
     74	000004	012346 				MOV	(R3)+,-(SP)	;SAVE FIRST HALF OF SENDER TASK NAME	; TM107
     75	000006	012346 				MOV	(R3)+,-(SP)	;SAVE SECOND HALF OF SENDER TASK NAME	; TM107
     76	000010	011303 				MOV	(R3),R3		;GET ADDRESS OF RECEIVE BUFFER		; TM107
     77														;**-2
     78
     79						.IF DF	A$$CHK!M$$MGE
     80
     81	000012	012701 	000036 			MOV	#15.*2,R1	;SET SIZE OF BUFFER
     82	000016					CALL	$ACHKP		;ADDRESS CHECK RECEIVE BUFFER
     83
     84						.ENDC
     85
     86
     87	000022	010304 				MOV	R3,R4		;SAVE ADDRESS OF RECEIVE BUFFER
     88	000024	012603 				MOV	(SP)+,R3	;RETRIEVE 2ND HALF OF SENDER TASK NAME	; TM107
     89	000026	012602 				MOV	(SP)+,R2	;RETRIEVE FIRST HALF OF SENDER TASK NAME; TM107
     90	000030	010500 				MOV	R5,R0		;CALCULATE ADDRESS OF TASK RECEIVE
     91	000032	062700 	000012 			ADD	#T.RCVL,R0	;QUEUE LISTHEAD
     92	000036	010001 				MOV	R0,R1		;COPY LISTHEAD ADDRESS			; TM107
     93	000040	011101 			3$:	MOV	(R1),R1		;POINT TO NEXT ENTRY IN RECEIVE LIST	; TM107
     94	000042	001423 				BEQ	20$		;IF EQ THERE IS NONE			; TM107
     95	000044	005702 				TST	R2		;TASK NAME SPECIFIED?			; TM107
     96	000046	001406 				BEQ	4$		;IF EQ NO, DEQUEUE FIRST BLOCK		; TM107
     97	000050	026102 	000002 			CMP	2(R1),R2	;MATCH ON FIRST WORD OF TASK NAME?	; TM107
     98	000054	001371 				BNE	3$		;IF NE NO				; TM107
     99	000056	026103 	000004 			CMP	4(R1),R3	;MATCH ON SECOND WORD OF TASK NAME?	; TM107
    100	000062	001366 				BNE	3$		;IF NE NO				; TM107
    101	000064				4$:	CALL	$QRMVT		;DEQUEUE THE APPROPRIATE PACKET		; TM107
    102														;**-2
    103
    104						.IF DF	M$$MUP
    105
    106						BIT	#T3.SLV,T.ST3(R5) ;IS RECEIVER A SLAVE TASK?
    107						BEQ	5$		;IF EQ NO
    108						MOV	40(R1),R0	;PICK UP TI ADDRESS
    109						MOV	R0,T.UCB(R5)	;SET TI ADDRESS OF RECEIVER
    110						MOV	$HEADR,R2	;PICK UP CURRENT TASK HEADER ADDRESS
    111						MOV	42(R1),H.CUIC(R2) ;SET CURRENT UIC OF RECEIVER
    112						MOV	42(R1),H.DUIC(R2) ;SET DEFAULT UIC OF RECEIVER
    113
    114						.ENDC
DRRAS	MACRO M1110  22-AUG-79 07:02  PAGE 3-2


    115
    116
    117	000070	010100 			5$:	MOV	R1,R0		;SAVE ADDRESS OF ENTRY REMOVED
    118	000072	022126 				CMP	(R1)+,(SP)+	;POINT TO SENDER TASK NAME AND CLEAN STA
    119	000074	012702 	000017 			MOV	#15.,R2		;SET LOOP COUNT
    120	000100	012124 			10$:	MOV	(R1)+,(R4)+	;MOVE DATA BLOCK TO TASK BUFFER
    121	000102	005302 				DEC	R2		;ANY MORE WORDS TO MOVE?
    122	000104	003375 				BGT	10$		;IF GT YES
    123	000106					CALLR	$DEPKT		;DEALLOCATE RECEIVE QUEUE PACKET
    124	000112	122726 	000115 		20$:	CMPB	#77.,(SP)+	;RECEIVE DATA OR EXIT DIRECTIVE?
    125	000116	001002 				BNE	30$		;IF NE NO
    126	000120	000167 	000000G			JMP	$DREXT		;EXIT TASK
    127	000124				30$:	DRSTS	D.RS8		;SET DIRECTIVE STATUS
    128
    129					;+
    130					; **-$DRSND-SEND DATA
    131					;
    132					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE A THIRTEEN WORD DATA BLOCK
    133					; IN A SPECIFIED TASK'S RECEIVE QUEUE.
    134					;
    135					; DPB FORMAT:
    136					;
    137					;	WD. 00 -- DIC(71.),DPB SIZE(5.).
    138					;	WD. 01 -- FIRST HALF OF RECEIVER TASK NAME.
    139					;	WD. 02 -- SECOND HALF OF RECEIVER TASK NAME.
    140					;	WD. 03 -- ADDRESS OF THIRTEEN WORD DATA BLOCK.
    141					;	WD. 04 -- EVENT FLAG NUMBER (OPTIONAL).
    142					;
    143					; INPUTS:
    144					;
    145					;	R0=ADDRESS OF THE TCB OF THE RECEIVER TASK.
    146					;	R1=ADDRESS OF THE TASK STATUS WORD OF THE RECEIVER TASK.
    147					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
    148					;	R3=ADDRESS OF THE DATA BLOCK ADDRESS IN THE DPB.
    149					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
    150					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
    151					;
    152					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
    153					;
    154					;	C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
    155					;		DIRECTIVE STATUS OF +1 IS RETURNED.
    156					;	C=1 IF DIRECTIVE IS REJECTED.
    157					;		DIRECTIVE STATUS OF 'D.RS1' IS RETURNED IF INSUFFICIENT
    158					;			CORE IS AVAILABLE TO QUEUE THE DATA BLOCK.
    159					;		DIRECTIVE STATUS OF 'D.RS2' IS RETURNED IF RECEIVER
    160					;			TASK IS AN ANCILLARY CONTROL PROCESSOR.
    161					;-
    162
    163	000126	032760 	100200 	000036 	$DRSND::BIT	#T3.ACP!T3.NSD,T.ST3(R0) ;SENDS ALLOWED TO RECEIVER?
    164	000134	001045 				BNE	20$		;IF NE NO
    165	000136	010046 				MOV	R0,-(SP)	;SAVE TCB ADDRESS OF RECEIVER TASK
    166	000140	116346 	000002 			MOVB	2(R3),-(SP)	;SAVE EVENT FLAG NUMBER
    167	000144	011303 				MOV	(R3),R3		;GET ADDRESS OF DATA BUFFER
    168
    169
    170						.IF DF	A$$CHK!M$$MGE
    171
DRRAS	MACRO M1110  22-AUG-79 07:02  PAGE 3-3


    172	000146	012701 	000032 			MOV	#13.*2,R1	;SET SIZE OF BUFFER
    173	000152					CALL	$ACHKP		;ADDRESS CHECK DATA BUFFER
    174
    175						.ENDC
    176
    177
    178	000156	112600 				MOVB	(SP)+,R0	;RETRIEVE OPTIONAL EVENT FLAG NUMBER
    179	000160					CALL	$SETF		;SET THE EVENT FLAG			; TM086
    180	000164					CALL	$ALPKT		;ALLOCATE SEND PACKET			;**-2
    181
    182
    183						.IF DF	M$$MUP
    184
    185						MOV	T.UCB(R5),40(R0) ;SET UCB ADDRESS
    186						MOV	H.CUIC(R4),42(R0) ;SET CURRENT (PROTECTION) UIC
    187
    188						.ENDC
    189
    190
    191	000170	010304 				MOV	R3,R4		;SAVE ADDRESS OF DATA BUFFER
    192	000172	010001 				MOV	R0,R1		;COPY ADDRESS OF ALLOCATED PACKET
    193	000174	005720 				TST	(R0)+		;POINT TO SECOND WORD OF PACKET
    194	000176	016520 	000006 			MOV	T.NAM(R5),(R0)+	;INSERT SENDER TASK NAME IN SEND PACKET
    195	000202	016520 	000010 			MOV	T.NAM+2(R5),(R0)+ ;
    196	000206	012702 	000015 			MOV	#13.,R2		;SET LOOP COUNT
    197	000212	012420 			10$:	MOV	(R4)+,(R0)+	;MOVE DATA TO SEND PACKET
    198	000214	005302 				DEC	R2		;ANY MORE WORDS TO MOVE?
    199	000216	003375 				BGT	10$		;IF GT YES
    200	000220	011600 				MOV	(SP),R0		;CALCULATE ADDRESS OF RECEIVER TASK'S
    201	000222	062700 	000012 			ADD	#T.RCVL,R0	;RECEIVE QUEUE LISTHEAD
    202	000226					CALL	$QINSF		;INSERT SEND PACKET IN RECEIVE QUEUE
    203	000232	012704 	000036 			MOV	#H.RCVA,R4	;SET OFFSET TO AST CONTROL BLOCK IN HEADER
    204	000236	012605 				MOV	(SP)+,R5	;RETRIEVE RECEIVER TASK TCB ADDRESS
    205	000240					CALL	$DASTT		;DECLARE RECEIVE AST
    206	000244					CALLR	$DRDSE		;DECLARE A SIGNIFICANT EVENT
    207	000250				20$:	DRSTS	D.RS2		;SET DIRECTIVE STATUS
    208
    209						.ENDC
    210
    211
    212		000001 				.END
DRRAS	MACRO M1110  22-AUG-79 07:02  PAGE 3-4
SYMBOL TABLE

A$$CHK= 000000   	H.ODVL  000024   	R$$11M= 000000   	T.RRFL  000064   	T3.REM= 020000
A$$CPS= 000000   	H.OVLY  000054   	R$$11S= 000000   	T.SRCT  000063   	T3.ROV= 000040
A$$TRP= 000000   	H.PFVA  000032   	S$$YSZ= 001740   	T.STAT  000032   	T3.RST= 000400
C$$ORE= 002000   	H.RCVA  000036   	TS.BLK= 170700   	T.ST2   000034   	T3.SLV= 002000
D.RS2 = ****** GX	H.RRVA  000062   	TS.CKP= 000200   	T.ST3   000036   	V$$CTR= 001200
D.RS8 = ****** GX	H.SPRI  000060   	TS.CKR= 000100   	T.TCBL  000030   	V$$RSN= 000031
G$$TPP= 000000   	H.TKVA  000026   	TS.EXE= 100000   	T.UCB   000026   	W.BATT  000006
G$$TTK= 000000   	H.TKVL  000030   	TS.MSG= 020000   	T2.ABO= 000100   	W.BFPD  000014
H$$RTZ= 000074   	H.VEXT  000056   	TS.NRP= 010000   	T2.AST= 100000   	W.BHVR  000004
H.CSP   000000   	H.WND   000044   	TS.OUT= 000400   	T2.BFX= 004000   	W.BLGH  000020
H.CUIC  000010   	I$$RDN= 000000   	TS.RDN= 040000   	T2.CAF= 000400   	W.BLPD  000016
H.DSW   000046   	K$$CNT= 177546   	TS.RUN= 004000   	T2.CHK= 020000   	W.BLVR  000002
H.DUIC  000012   	K$$CSR= 177546   	T.ACTL  000052   	T2.CKD= 010000   	W.BNPD  000015
H.EFLM  000004   	K$$IEN= 000115   	T.ASTL  000016   	T2.DST= 040000   	W.BOFF  000012
H.EFSV  000040   	K$$LDC= 000001   	T.ATT   000054   	T2.FXD= 002000   	W.BPCB  000000
H.FCS   000050   	K$$TPS= 000074   	T.CPCB  000004   	T2.HLT= 000200   	W.BSIZ  000010
H.FORT  000052   	L$$ASG= 000000   	T.DPRI  000040   	T2.SPN= 000004   	X$$DBT= 000000
H.FPSA  000042   	L$$DRV= 000000   	T.EFLG  000022   	T2.STP= 000020   	$ACHKP= ****** GX
H.FPVA  000034   	M$$CRB= 000124   	T.IOC   000003   	T2.TIO= 001000   	$ALPKT= ****** GX
H.GARD  000072   	M$$MGE= 000000   	T.LBN   000041   	T2.WFR= 000001   	$DASTT= ****** GX
H.HDLN  000002   	M$$NET= 000000   	T.LDV   000044   	T3.ACP= 100000   	$DEPKT= ****** GX
H.IPC   000016   	M$$NT2= 000000   	T.LNK   000000   	T3.CAL= 000100   	$DRDSE= ****** GX
H.IPS   000014   	N$$LDV= 000001   	T.MXSZ  000050   	T3.CLI= 001000   	$DREXT= ****** GX
H.ISP   000020   	P$$RTY= 000000   	T.NAM   000006   	T3.MCR= 004000   	$DRREC  000000RG
H.LUN   000076   	P$$TPT= 000000   	T.OFF   000060   	T3.NET= 000020   	$DRSND  000126RG
H.NLUN  000074   	R$$DER= 000000   	T.PCB   000046   	T3.NSD= 000200   	$QINSF= ****** GX
H.NML   000061   	R$$EXV= 000000   	T.PRI   000002   	T3.PMD= 040000   	$QRMVT= ****** GX
H.ODVA  000022   	R$$SND= 000000   	T.RCVL  000012   	T3.PRV= 010000   	$SETF = ****** GX

. ABS.	000102	   000
      	000252	   001
ERRORS DETECTED:  0

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