Google
 

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


      1						.TITLE	DRASG
      2						.IDENT	/05/
      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 05
     12					;
     13					; D. N. CUTLER 18-SEP-73
     14					;
     15					; PREVIOUSLY MODIFIED BY:
     16					;
     17					;	D. N. CUTLER
     18					;	T. J. MILLER
     19					;
     20					; MODIFIED BY:
     21					;
     22					; MACRO LIBRARY CALLS
     23					;
     24
     25						.MCALL	TCBDF$
     26	000000					TCBDF$			;DEFINE TASK CONTROL BLOCK OFFSETS
     27
     28					;+
     29					; **-$DRASG-ASSIGN LUN
     30					;
     31					; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ASSIGN A DEVICE UNIT TO A
     32					; LOGICAL UNIT NUMBER (LUN).
     33					;
     34					; DPB FORMAT:
     35					;
     36					;	WD. 00 -- DIC(7.),DPB SIZE(4.).
     37					;	WD. 01 -- LUN TO BE ASSIGNED.
     38					;	WD. 02 -- NAME OF DEVICE TO BE ASSIGNED.
     39					;	WD. 03 -- UNIT NUMBER OF DEVICE TO BE ASSIGNED.
     40					;
     41					; INPUTS:
     42					;
     43					;	R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
     44					;	R3=ADDRESS OF THE LUN IN THE DPB.
     45					;	R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
     46					;	R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
     47					;
     48					; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
     49					;
     50					;	C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
     51					;		DIRECTIVE STATUS OF +1 IS RETURNED.
     52					;	C=1 IF DIRECTIVE IS REJECTED.
     53					;		DIRECTIVE STATUS OF 'D.RS90' IS RETURNED IF A FILE
     54					;			IS OPEN OR UNIT ATTACHED ON THE SPECIFIED LUN.
     55					;		DIRECTIVE STATUS OF 'D.RS92' IS RETURNED IF DEVICE
     56					;			AND/OR UNIT IS INVALID.
     57					;-
DRASG	MACRO M1110  22-AUG-79 06:57  PAGE 3-1


     58
     59	000000				$DRASG::CALL	$MPLUN		;MAP LUN TO DEVICE UCB
     60	000004	005711 				TST	(R1)		;FILE ACCESSED ON LUN?
     61	000006	001100 				BNE	40$		;IF NE YES
     62	000010	010046 				MOV	R0,-(SP)	;SAVE ADDRESS OF UCB
     63	000012	010104 				MOV	R1,R4		;SAVE ADDRESS OF SECOND LUN WORD
     64	000014	012302 				MOV	(R3)+,R2	;GET NAME OF DEVICE
     65	000016	111300 				MOVB	(R3),R0		;GET UNIT NUMBER
     66
     67
     68						.IF DF	L$$ASG
     69
     70
     71						.IF DF	M$$MUP
     72
     73						BIT	#T3.SLV,T.ST3(R5) ;SLAVE TASK?
     74						BNE	17$		;IF NE YES, BYPASS LOGICAL DEVICE TABLE
     75
     76						.ENDC
     77
     78
     79	000020	012703 	000000G			MOV	#$LOGHD,R3	;POINT TO LOGICAL ASSIGNMENT LIST
     80	000024	011303 			13$:	MOV	(R3),R3		;GET ADDRESS OF NEXT ENTRY
     81	000026	001420 				BEQ	17$		;IF EQ END OF LIST
     82	000030	105763 	000000G			TSTB	L.TYPE(R3)	;SYSTEM WIDE ASSIGNMENT?
     83	000034	001404 				BEQ	15$		;IF EQ YES
     84	000036	026365 	000000G	000026 		CMP	L.UCB(R3),T.UCB(R5) ;TI UCB ADDRESS MATCH?
     85	000044	001367 				BNE	13$		;IF NE NO
     86	000046	020263 	000000G		15$:	CMP	R2,L.NAM(R3)	;DEVICE NAME MATCH?
     87	000052	001364 				BNE	13$		;IF NE NO
     88	000054	120063 	000000G			CMPB	R0,L.UNIT(R3)	;UNIT NUMBER MATCH?
     89	000060	001361 				BNE	13$		;IF NE NO
     90	000062	016301 	000000G			MOV	L.ASG(R3),R1	;GET ASSIGNMENT UCB ADDRESS
     91	000066	000427 				BR	25$		;FINISH IN COMMON CODE
     92
     93						.ENDC
     94
     95
     96	000070	012703 	000000G		17$:	MOV	#$DEVHD,R3	;POINT TO PHYSICAL DEVICE TABLES
     97	000074	011303 			20$:	MOV	(R3),R3		;GET ADDRESS OF NEXT DCB
     98	000076	001445 				BEQ	50$		;IF EQ END OF TABLES
     99	000100	020263 	000000G			CMP	R2,D.NAM(R3)	;DEVICE NAME MATCH?
    100	000104	001373 				BNE	20$		;IF NE NO
    101	000106	120063 	000000G			CMPB	R0,D.UNIT(R3)	;UNIT GREATER THAN OR EQUAL TO LOW BOUNDRY?
    102	000112	103770 				BLO	20$		;IF LO NO
    103	000114	120063 	000001G			CMPB	R0,D.UNIT+1(R3)	;UNIT LESS THAN OR EQUAL TO HIGH BOUNDRY?
    104	000120	101365 				BHI	20$		;IF HI NO
    105	000122	166300 	000000G			SUB	D.UNIT(R3),R0	;CALCULATE RELATIVE UNIT NUMBER
    106	000126	042700 	177400 			BIC	#177400,R0	;CLEAR EXCESS BITS
    107	000132	016301 	000000G			MOV	D.UCBL(R3),R1	;GET LENGTH OF UCB IN BYTES
    108	000136					CALL	$MUL		;CALCULATE NUMBER OF BYTES
    109	000142	066301 	000000G			ADD	D.UCB(R3),R1	;CALCULATE ADDRESS OF UCB
    110	000146	012603 			25$:	MOV	(SP)+,R3	;WAS LUN PREVIOUSLY ASSIGNED?
    111	000150	001415 				BEQ	30$		;IF EQ NO
    112	000152	020563 	000000G			CMP	R5,U.ATT(R3)	;UNIT ATTACHED TO CURRENT TASK?
    113	000156	001007 				BNE	27$		;IF NE NO
    114	000160	010146 				MOV	R1,-(SP)	;SAVE NEW ASSIGNMENT UCB ADDRESS
DRASG	MACRO M1110  22-AUG-79 06:57  PAGE 3-2


    115	000162	010100 				MOV	R1,R0		;COPY UCB ADDRESS
    116	000164					CALL	$MPLND		;MAP TO REAL UCB ADDRESS
    117	000170	012601 				MOV	(SP)+,R1	;RETRIEVE NEW ASSIGNMENT UCB ADDRESS
    118	000172	020003 				CMP	R0,R3		;NEW ASSIGNMENT TO SAME FINAL UCB?
    119	000174	001005 				BNE	40$		;IF NE NO
    120	000176	010305 			27$:	MOV	R3,R5		;COPY OLD ASSIGNMENT UCB ADDRESS
    121	000200	012746 	000000G			MOV	#$IOKIL,-(SP)	;SET TO KILL I/O ON PREVIOUS ASSIGNMENT
    122	000204	010144 			30$:	MOV	R1,-(R4)	;ASSIGN LUN TO NEW UNIT
    123	000206					RETURN			;
    124	000210				40$:	DRSTS	D.RS90		;SET DIRECTIVE STATUS
    125	000212				50$:	DRSTS	D.RS92		;SET DIRECTIVE STATUS
    126
    127		000001 				.END
DRASG	MACRO M1110  22-AUG-79 06:57  PAGE 3-3
SYMBOL TABLE

A$$CHK= 000000   	L.NAM = ****** GX	TS.NRP= 010000   	T.SRCT  000063   	T3.CLI= 001000
A$$CPS= 000000   	L.TYPE= ****** GX	TS.OUT= 000400   	T.STAT  000032   	T3.MCR= 004000
A$$TRP= 000000   	L.UCB = ****** GX	TS.RDN= 040000   	T.ST2   000034   	T3.NET= 000020
C$$ORE= 002000   	L.UNIT= ****** GX	TS.RUN= 004000   	T.ST3   000036   	T3.NSD= 000200
D.NAM = ****** GX	M$$CRB= 000124   	T.ACTL  000052   	T.TCBL  000030   	T3.PMD= 040000
D.RS90= ****** GX	M$$MGE= 000000   	T.ASTL  000016   	T.UCB   000026   	T3.PRV= 010000
D.RS92= ****** GX	M$$NET= 000000   	T.ATT   000054   	T2.ABO= 000100   	T3.REM= 020000
D.UCB = ****** GX	M$$NT2= 000000   	T.CPCB  000004   	T2.AST= 100000   	T3.ROV= 000040
D.UCBL= ****** GX	N$$LDV= 000001   	T.DPRI  000040   	T2.BFX= 004000   	T3.RST= 000400
D.UNIT= ****** GX	P$$RTY= 000000   	T.EFLG  000022   	T2.CAF= 000400   	T3.SLV= 002000
G$$TPP= 000000   	P$$TPT= 000000   	T.IOC   000003   	T2.CHK= 020000   	U.ATT = ****** GX
G$$TTK= 000000   	R$$DER= 000000   	T.LBN   000041   	T2.CKD= 010000   	V$$CTR= 001200
H$$RTZ= 000074   	R$$EXV= 000000   	T.LDV   000044   	T2.DST= 040000   	V$$RSN= 000031
I$$RDN= 000000   	R$$SND= 000000   	T.LNK   000000   	T2.FXD= 002000   	X$$DBT= 000000
K$$CNT= 177546   	R$$11M= 000000   	T.MXSZ  000050   	T2.HLT= 000200   	$DEVHD= ****** GX
K$$CSR= 177546   	R$$11S= 000000   	T.NAM   000006   	T2.SPN= 000004   	$DRASG  000000RG
K$$IEN= 000115   	S$$YSZ= 001740   	T.OFF   000060   	T2.STP= 000020   	$IOKIL= ****** GX
K$$LDC= 000001   	TS.BLK= 170700   	T.PCB   000046   	T2.TIO= 001000   	$LOGHD= ****** GX
K$$TPS= 000074   	TS.CKP= 000200   	T.PRI   000002   	T2.WFR= 000001   	$MPLND= ****** GX
L$$ASG= 000000   	TS.CKR= 000100   	T.RCVL  000012   	T3.ACP= 100000   	$MPLUN= ****** GX
L$$DRV= 000000   	TS.EXE= 100000   	T.RRFL  000064   	T3.CAL= 000100   	$MUL  = ****** GX
L.ASG = ****** GX	TS.MSG= 020000

. ABS.	000070	   000
      	000214	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2259 WORDS  ( 9 PAGES)
DYNAMIC MEMORY:  2980 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:12
[11,24]DRASG,SY0:[11,34]DRASG/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,DRASG