ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 7





      1						.TITLE	ASSLUN 0115MS, ASSIGN LOGICAL UNIT TO DEVICE

						.IDENT	/0115MS/

      2					;

      3					; ALTERED 20-DEC-77 BY E. H. MARISON

      4					; MODIFIED BY ELLEN R SIMICH 29-MAR-76

      5					;

      6					; ALTERED TUESDAY 29-DEC-75 13:15 BY P. H. LIPMAN

      7					; ALTERED THRU 20-FEB-75 11:05 BY E. MARISON

      8					; ALTERED THRU 11-SEP-75 09:58 BY E. MARISON

      9					;

     10					; COPYRIGHT (C) 1977, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     11					; COPYRIGHT (C) 1973, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     12					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     13					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     14

     15					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

     16					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION

     17					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

     18					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

     19

     20					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     21					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     22					; EQUIPMENT CORPORATION.

     23

     24					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

     25					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

     26					;

     27					; PETER H. LIPMAN 17-AUG-73

     28					;

     29					; MODIFIED BY: M. GONSALVES

     30					;

     31					; DATE:15-JUN-74

     32					;

     33					; SHAO-SUN CHIEN	24-NOV-1974

     34					;

     35					;

ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 8





     37	000000				.ASLUN::.SAVR1

     38					; ENTER HERE WITH R0=FDB, R1=FNB, RETURNS R0,R1 UNCHANGED, R2-R5 DESTROYED

     39	000004	010146 			..ALUN::MOV	R1,-(SP)

     40	000006	016102 	000034 			MOV	N.UNIT(R1),R2	;R2=UNIT NUMBER

     41	000012	016103 	000032 			MOV	N.DVNM(R1),R3	;R3=DEVICE NAME

     42	000016	001411 				BEQ	20$		;BRANCH IF DEFAULT DEVICE

     43

     44					; R3 = DEVICE NAME, R2 = UNIT NUMBER - ASSIGN THE LUN

     45	000020	116004 	000042 		10$:	MOVB	F.LUN(R0),R4

     46	000024					ALUN$S	R4,R3,R2	;LUN, DEVICE NAME, UNIT

     47	000040	103411 				BCS	30$		;BRANCH IF ERROR

     48	000042				20$:	CALL	CHRLUN

     49	000046	103013 				BCC	40$		;BRANCH IF LUN IS ASSIGNED OK

     50	000050	012702 	000000 			MOV	#SYUNIT,R2	;ASSIGN LUN TO DEFAULT DEVICE

     51	000054	012703 	054523 			MOV	#SYDEV,R3

     52						.IF	EQ,R$$SPL-1	;AUTOMATIC SPOOLING FOR DEVICES?

     53						BITB	#FD.SPL,F.BKP1(R0);SPOOL INDICATOR SET

     54						BEQ	25$		;NO - PROCEED

     55						MOV	#SPDEV,R3	;SET THE DEVICE NAME TO SP:

     56						SPDEV	="SP

     57						CLR	R2		;SPOOL UNIT IS ZERO

     58						.ENDC

     59	000060	011601 			25$:	MOV	(SP),R1		;RESET R1 TO FILNAME BLOCK

     60	000062	000756 				BR	10$

     61	000064	012601 			30$:	MOV	(SP)+,R1

     62	000066	013760 	000000G	000052 		MOV	@#$DSW,F.ERR(R0)

     63	000074					RETURN

     64	000076	010305 			40$:	MOV	R3,R5		;SAVE UNIT NO. IN R5

     65	000100	110260 	000017 			MOVB	R2,F.RCTL(R0)	;INIT CONTROL BYTES

     66	000104	010160 	000060 			MOV	R1,F.VBSZ(R0)	;SIZE OF VIRTUAL BLOCKS

     67	000110	010160 	000062 			MOV	R1,F.BBFS(R0)	;SET BLOCK SIZE

     68	000114	012601 				MOV	(SP)+,R1

     69	000116	010561 	000034 			MOV	R5,N.UNIT(R1)	;STORE UNIT IN FNB

     70	000122	010461 	000032 			MOV	R4,N.DVNM(R1)	;STORE DEVICE NAME IN FNB

     71						.IF	EQ,R$$SPL-1	;CHECK IF SPOOLING ENABLED

     72						BITB	#FD.SPL,F.BKP1(R0);IS SPOOL INDICATOR SET?

     73						BEQ	70$		;IF NOT THEN BYPASS

     74						MOV	#404,N.DID+4(R1);PPN BINARY OF [1,4]

     75						MOV	#140117,N.FNAM(R1);RAD50 FOR 001

     76						MOV	#140122,N.FNAM+2(R1);RAD50 FOR 004

     77						CALL	..DID1		;GET THE PROPER DID

     78						BCS	90$		; EXIT IF NO 1,4 UFD ON SPOOLING DEV.

     79					;

     80					;THE FOLLOWING CODE WILL CREATE A FILENAME OF ORIGINAL DESTINATION

     81					; NOTE: ..DID1 HAS CLEARED THE N.FNAM 3 WORD BLOCK IN THE FNB

     82					;

     83						MOV	R1,R4		;SET UP ADDRESS TO

     84						ADD	#N.FNAM,R4	;STORE RAD50 STRING

     85						MOV	#2,R3		;SET UP SIZE OF STRING

     86						MOV	R0,R2		;SET UP ADDRESS OF

     87						ADD	#F.SPDV,R2	;INPUT STRING

     88						CALL	..SGR5

     89						MOV	SPOOL,N.FTYP(R1);SET FILE TYPE TO SPR

     90						CLR	N.FVER(R1)	;CLEAR VERSION FOR INCREMENTATION

     91					70$:

     92						.ENDC

     93						.IF	GT,R$$ANI

ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 8-1





     94					; GET GLOBAL VOLUMN CHARACTERISTICS:

     95					; IF SEQ. DEVICE IE MAGTAPE

     96					;

     97	000126	105060 	000075 			CLRB	F.CHR(R0)		;SET DEFAULT VALUE

     98	000132	132760 	000040 	000017 		BITB	#FD.SQD,F.RCTL(R0)	; SEQ DEV

     99	000140	001403 				BEQ	80$			; BRANCH IF NOT

    100					;

    101					; ********** THIS CODE IS COMMENTED OUT TO AVOID AND EXTRA QIO

    102					; ********** TO THE MAGTAPE ACP. IT IS ONLY REQUIRED IF THE

    103					; ********** OLD FL300 TAPE PRODUCE BY RSX-11D V4 NEED TO BE

    104					; ********** SUPPORTED. OTHERWISE ANSI D FORMAT VARIABLE LENGTH

    105					; ********** RECORDS ARE THE ONLY TYPE SUPPORTED ON ANSI MAGTAPE

    106					; **********	E. H. MARISON 20-DEC-77		***************

    107					;	MOV	R1,-(SP)	;SAVE R1

    108					;	CLR	-(SP)		;END OF LIST

    109					;	MOV	R0,-(SP)	;SET POINTER TO

    110					;	.IF GT,R$$11M		;ERS CLOUGE ADDRESS FOR 11M WORD ALIGNMENT

    111					;	ASSUME F.SPUN,F.CHR-1	;       REQUIREMENT

    112					;	ADD	#F.SPUN,(SP)	;ERS USE LOW BYTE

    113					;	SWAB	F.SPUN(R0)	;ERS SWAP BYTES TO SAVE LOW BYTE

    114					;	.IFF

    115					;	ADD	#F.CHR,(SP)	;F.CHR

    116					;	.ENDC

    117					;	MOV	(PC)+,-(SP)

    118					;	.BYTE	1,1		;1 BYTE IN FDB

    119					;				;1=CODE FOR GET CHARACTERISTICS

    120					;	MOV	SP,R3		;ADDRESS OF ATTRIBUTE LIST

    121					;	CLR	R2

    122					;	MOV	#FF.CHR,R1	;ACP/VOL CHAR CODE

    123					;	CALL	..CTRL		;GET GLOBAL CHAR.

    124					;	ADD	#6.,SP		;POP BACK STACK (NOTE CLEARS C-BIT)

    125					;	MOV	(SP)+,R1	; RESTORE R1

    126					;	.IF GT,R$$11M

    127					;	SWAB	F.SPUN(R0)	;ERS SWAP BYTES TO RESTORE F.SPUN

    128					;	.ENDC

    129

    130	000142	152760 	000001 	000075 		BISB	#CH.AND,F.CHR(R0)	; SET ANSI RECORD FORMAT BIT

    131	000150				80$:				; REF TAG

    132						.ENDC

    133	000150	112760 	000001 	000052 		MOVB	#IS.SUC,F.ERR(R0)

    134	000156				90$:	RETURN

ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 9





    136					;+

    137					; GET INFORMATION PER LUN

    138					; CALLING SEQUENCE:

    139					;	CALL	CHRLUN

    140					; INPUTS:

    141					;	R0=FDB, ONLY NEEDED FOR THE LUN

    142					; OUTPUTS:

    143					;	C=0 FOR SUCCESS, C=1 FOR FAILURE (FROM GLUN$S)

    144					;	R1=DEFAULT BLOCK SIZE

    145					;	R2=DEVICE CHARACTERISTICS BITS FOR F.RCTL

    146					;	R3=UNIT NUMBER IN BINARY

    147					;	R4=DEVICE NAME IN ASCII

    148					;	R0, R5 PRESERVED

    149					;-

    150	000160	013701 	000000G		CHRLUN:	MOV	@#.FSRPT,R1

    151	000164	062701 	000014 			ADD	#A.DPB,R1	;R1=ADDRESS TO STORE GLUN INOFRMATION

    152	000170	116002 	000042 			MOVB	F.LUN(R0),R2

    153	000174					GLUN$S	R2,R1

    154	000206	103406 				BCS	10$

    155	000210	012104 				MOV	(R1)+,R4	;ASCII NAME

    156						.IF	EQ,R$$SPL-1	;AUTOMATIC SPOOLING FOR DEVICES

    157						BIT	#FD.OSP,2(R1)	;IF A RECORD ORIENTED FILE CONSIDER

    158						BEQ	5$		;SPOOLING IF NOT BYPASS

    159						BITB	#FA.WRT,F.FACC(R0) ;ONLY REDIRECT FILE IF

    160						BEQ	5$		;IT IS OPENED FOR WRITE

    161						MOVB	#FO.WRT,F.FACC(R0) ;FORCE CREATE MODE TO KEEP USERS OF

    162									   ;OF SPOOLING FROM STEPPING ON EACH OTHER

    163						BISB	#FD.SPL,F.BKP1(R0) ;SET SPOOL INDICATOR

    164						MOV	R4,F.SPDV(R0)	;PLACE DEVICE IN FDB TO GUARD

    165						MOVB	@R1,F.SPUN(R0)	;AGAINST DEFAULT LUN ASSIGNMENTS

    166						SEC			;CAUSE AN ASSIGNMENT TO SY

    167						RETURN

    168					5$:

    169						.ENDC

    170	000212	111103 				MOVB	(R1),R3		;UNIT NUMBER

    171	000214	016102 	000002 			MOV	2(R1),R2	;DEVICE CHARACTERISTICS

    172	000220	016101 	000010 			MOV	8.(R1),R1	;DEFAULT BLOCK SIZE

    173	000224				10$:	RETURN

    174					;

    175						.IF	EQ,R$$SPL-1	;FOR AUTOMATIC SPOOLING

    176					SPOOL:	.RAD50	/SPR/

    177						.ENDC

    178					;

    179	000226					$END	ASSLUN

    180					;

    181					;

    182		000001 				.END

ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 9-1

SYMBOL TABLE



A.BFSR= 000004   	FD.RAH= 000001   	F.RCNM= 000034   	IE.EOT= 177702   	IE.RBS= 177761

A.DFBC= 000100   	FD.RAN= 000002   	F.RCTL= 000017   	IE.EOV= 177765   	IE.RCN= 177722

A.DFDR= 000050   	FD.REC= 000001   	F.RSIZ= 000002   	IE.EXP= 177665   	IE.RER= 177740

A.DFUI= 000102   	FD.RWM= 000001   	F.RTYP= 000000   	IE.FEX= 177717   	IE.RNM= 177715

A.DPB = 000014   	FD.SDI= 000020   	F.SEQN= 000100   	IE.FHE= 177705   	IE.RSU= 177757

A.EFSR= 000006   	FD.SPL= 000200   	F.SPDV= 000072   	IE.FIX= 177767   	IE.SDP= 177635

A.FIPR= 000012   	FD.SQD= 000040   	F.SPUN= 000074   	IE.FLN= 177657   	IE.SNC= 177735

A.IOST= 000044   	FD.TTY= 000004   	F.STBK= 000036   	IE.FOP= 177713   	IE.SPC= 177772

A.OWUI= 000010   	FD.WBH= 000002   	F.UNIT= 000136   	IE.HFU= 177744   	IE.SQC= 177734

BD.FRE= 000001   	FD.WRT= 000001   	F.URBD= 000020   	IE.HWR= 177772   	IE.SRE= 177762

BL.SZ = 000013   	FF.CHR= 000005   	F.VBN = 000064   	IE.IBS= 177647   	IE.STK= 177706

B.BBFS= 000010   	FF.NV = 000003   	F.VBSZ= 000060   	IE.IDU= 177644   	IE.TCH= 177765

B.BFST= 000015   	FF.POE= 000002   	G.LUCW= 000004   	IE.IEF= 177637   	IE.TMM= 177671

B.NXBD= 000012   	FF.RWD= 000001   	G.LUFB= 000003   	IE.IES= 177656   	IE.TMO= 177666

B.VBN = 000004   	FF.RWF= 000006   	G.LUNA= 000000   	IE.IFC= 177776   	IE.ULK= 177653

CHRLUN  000160R     002	FF.SPC= 000004   	G.LUNU= 000002   	IE.IFU= 177747   	IE.ULN= 177773

CH.AND= 000001   	FO.APD= 000106   	HA.CHU= 000003   	IE.ILL= 177726   	IE.UNS= 177774

DIRTYP= 015172   	FO.MFY= 000002   	HA.FP = 000002   	IE.ILU= 177640   	IE.UPN= 177777

D.DFDV= 000024   	FO.RD = 000001   	HA.NAM= 000005   	IE.ILV= 177755   	IE.VER= 177774

D.DFID= 000016   	FO.UPD= 000006   	HA.TYP= 000006   	IE.INS= 177776   	IE.WAC= 177743

D.DFUN= 000026   	FO.WRT= 000016   	HA.UAT= 000004   	IE.IOP= 177655   	IE.WAT= 177741

FA.APD= 000100   	F.ACTL= 000076   	HA.UI = 000001   	IE.IPR= 177641   	IE.WCK= 177652

FA.CRE= 000010   	F.ALOC= 000040   	HA.VER= 000007   	IE.ISQ= 177703   	IE.WER= 177737

FA.DLK= 001000   	F.BBFS= 000062   	IE.ABO= 177761   	IE.ITI= 177643   	IE.WLK= 177764

FA.ENB= 100000   	F.BDB = 000070   	IE.ACT= 177771   	IE.ITP= 177650   	IE.WOV= 177653

FA.EXC= 002000   	F.BGBC= 000057   	IE.ADP= 177636   	IE.ITS= 177770   	IE.2DV= 177720

FA.EXT= 000004   	F.BKDN= 000026   	IE.ALC= 177654   	IE.IUI= 177645   	IO.ACE= 007400

FA.NSP= 000100   	F.BKDS= 000020   	IE.ALG= 177654   	IE.LCK= 177745   	IO.ACR= 006400

FA.POS= 010000   	F.BKEF= 000050   	IE.ALN= 177736   	IE.LNL= 177646   	IO.ACW= 007000

FA.RD = 000001   	F.BKP1= 000051   	IE.AST= 177660   	IE.MAP= 177657   	IO.APC= 014000

FA.RWD= 004000   	F.BKST= 000024   	IE.BAD= 177777   	IE.MOD= 177753   	IO.APV= 014010

FA.SEQ= 040000   	F.BKVB= 000064   	IE.BBE= 177710   	IE.NBF= 177731   	IO.ATT= 001400

FA.SHR= 000040   	F.CHR = 000075   	IE.BCC= 177676   	IE.NBK= 177727   	IO.CLN= 003400

FA.TMP= 000020   	F.CNTG= 000034   	IE.BDI= 177714   	IE.NDR= 177670   	IO.CRE= 012000

FA.WCK= 020000   	F.DFNB= 000046   	IE.BDR= 177716   	IE.NFI= 177704   	IO.DAC= 010000

FA.WRT= 000002   	F.DSPT= 000044   	IE.BDV= 177711   	IE.NFW= 177673   	IO.DEL= 012400

FCSEFN= 000040   	F.DVNM= 000134   	IE.BHD= 177700   	IE.NLK= 177661   	IO.DET= 002000

FD.BLK= 000010   	F.EFBK= 000010   	IE.BLB= 177672   	IE.NLN= 177733   	IO.ENA= 006000

FD.CCL= 000002   	F.EFN = 000050   	IE.BLK= 177754   	IE.NNC= 177663   	IO.EXT= 011400

FD.COM= 020000   	F.EOBB= 000032   	IE.BNM= 177712   	IE.NNL= 177662   	IO.FNA= 004400

FD.CR = 000002   	F.ERR = 000052   	IE.BTF= 177664   	IE.NNN= 177674   	IO.KIL= 000012

FD.DIR= 000010   	F.FACC= 000043   	IE.BTP= 177725   	IE.NOD= 177751   	IO.LOV= 001010

FD.DVR= 000020   	F.FFBY= 000014   	IE.BVR= 177701   	IE.NSF= 177746   	IO.LTK= 000050

FD.EFB= 000004   	F.FNAM= 000110   	IE.BYT= 177755   	IE.NST= 177660   	IO.RAT= 013000

FD.EF1= 000010   	F.FNB = 000102   	IE.CKP= 177766   	IE.NSW= 177756   	IO.RDN= 000022

FD.EOF= 000002   	F.FTYP= 000116   	IE.CKS= 177742   	IE.NVR= 177652   	IO.RLB= 001000

FD.FTN= 000001   	F.FVER= 000120   	IE.CLO= 177732   	IE.NVW= 177651   	IO.RNA= 005400

FD.F11= 040000   	F.HIBK= 000004   	IE.CNR= 177667   	IE.OFL= 177677   	IO.RTK= 000060

FD.INS= 000010   	F.LUN = 000042   	IE.CON= 177752   	IE.ONP= 177773   	IO.RVB= 010400

FD.INV= 000100   	F.MBCT= 000054   	IE.DAA= 177770   	IE.OVR= 177756   	IO.SET= 000030

FD.ISP= 002000   	F.MBC1= 000055   	IE.DAO= 177763   	IE.PES= 177655   	IO.ULK= 005000

FD.MNT= 100000   	F.MBFG= 000056   	IE.DFU= 177750   	IE.PNS= 177642   	IO.UNL= 000042

FD.OER= 000040   	F.NRBD= 000024   	IE.DNA= 177771   	IE.PRI= 177760   	IO.WAT= 013400

FD.OSP= 004000   	F.NREC= 000030   	IE.DNR= 177775   	IE.PTS= 177775   	IO.WLB= 000400

FD.PLC= 000004   	F.OVBS= 000030   	IE.DUN= 177767   	IE.RAC= 177724   	IO.WVB= 011000

FD.PRN= 000004   	F.RACC= 000016   	IE.DUP= 177707   	IE.RAT= 177723   	IQ.Q  = 000002

FD.PSE= 010000   	F.RATT= 000001   	IE.EOF= 177766   	IE.RBG= 177730   	IQ.S  = 000004

ASSLUN 0115MS, ASSIGN LOGICAL U	MACRO M1110  22-AUG-78 01:18  PAGE 9-2

SYMBOL TABLE



IQ.UMD= 000004   	NB.DIR= 000100   	N.FNAM= 000006   	R$$RSL= 000001   	S.FSR2= 000104

IQ.X  = 000001   	NB.DOT= 100000   	N.FNPT= 000012   	R$$SEQ= 000000   	S.FTYP= 000002

IS.BV = 000005   	NB.NAM= 000004   	N.FNSZ= 000010   	R$$SPL= 000000   	S.NFEN= 000020

IS.CC = 001401   	NB.SD1= 000400   	N.FTYP= 000014   	R$$VMS= 000001   	WI.DLK= 000002

IS.CLR= 000000   	NB.SD2= 001000   	N.FVER= 000016   	R$$11M= 000001   	WI.LCK= 000001

IS.CR = 006401   	NB.SMI= 040000   	N.NEXT= 000022   	R.FIX = 000001   	WI.SPL= 000020

IS.EOT= 002001   	NB.SNM= 000040   	N.STAT= 000020   	R.SEQ = 000003   	WI.UPD= 000100

IS.ESC= 015401   	NB.STP= 000020   	N.UNIT= 000034   	R.VAR = 000002   	$DSW  = ****** GX

IS.ESQ= 115401   	NB.SVR= 000010   	PP.SEP= 000002   	SYDEV = 054523   	$$MSG = 000000

IS.PES= 100001   	NB.TYP= 000002   	PP.ZER= 000001   	SYUNIT= 000000   	$$$OST= 000014

IS.PND= 000000   	NB.VER= 000001   	P$$ARS= 000001   	S.BFHD= 000020   	.ASLUN  000000RG    002

IS.RDD= 000002   	N.DID = 000024   	R$$ANI= 000001   	S.FATT= 000016   	.FSRPT= ****** GX

IS.SET= 000002   	N.DRPT= 000006   	R$$BBF= 000000   	S.FDB = 000140   	.SAVR1= ****** GX

IS.SPD= 000002   	N.DRSZ= 000004   	R$$DPB= 000001   	S.FNAM= 000006   	..ALUN  000004RG    002

IS.SUC= 000001   	N.DVNM= 000032   	R$$EIS= 000001   	S.FNB = 000036   	...CTL= 000001

IS.TAB= 004401   	N.DVPT= 000002   	R$$LCL= 000001   	S.FNBW= 000017   	...GBL= 000000

IS.TMO= 000002   	N.DVSZ= 000000   	R$$MUL= 000000   	S.FNTY= 000004   	...TPC= 000030

NB.DEV= 000200   	N.FID = 000000   	R$$OPF= 000000



. ABS.	000000	   000

      	000000	   001

$$RESL	000226	   002

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  4741 WORDS  ( 19 PAGES)

DYNAMIC MEMORY:  5940 WORDS  ( 22 PAGES)

ELAPSED TIME:  00:00:34

OBJ$:ASSLUN,LIS$:ASSLUN/-SP=SRC$:FCSPRE,ASSLUN

