ALELD	MACRO M1110  22-AUG-78 01:38  PAGE 3





      1						.TITLE	ALELD

      2						.IDENT	/05/                                                           ;**NEW**

      3					                                                                                ;**-1

      4					;

      5					; COPYRIGHT   1973,  DIGITAL  EQUIPMENT  CORP.,  MAYNARD,   MASS.

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

      7					;

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

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

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

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

     12					;

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

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

     15					; EQUIPMENT CORPORATION.

     16					;

     17					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR RELIABILITY

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

     19					;

     20					; VERSION 05                                                                   ;**NEW**

     21					;                                                                               ;**-1

     22					; D. N. CUTLER/C. MONIA 03-FEB-74

     23					;+

     24					; **-$ALELD-ALLOCATE ELEMENT DESCRIPTOR

     25					; **-$ALELO-ALLOCATE ELEMENT DESCRIPTOR FOR OUTPUT FILE                         ;**NEW**

     26					; **-$ALEL1-ALLOCATE ELEMENT DESCRIPTOR WITH ADDITIONAL WORD                    ;**-1

     27					;

     28					; THIS ROUTINE IS CALLED TO ALLOCATE AND INITIALIZE AN ELEMENT DE-

     29					; SCRIPTOR. IT IS A MONITOR DEPENDENT ROUTINE SINCE IT MUST KNOW

     30					; THE FORMAT OF THE NAME STRING. THE DESCRIPTOR STORAGE IS ALLOCATED

     31					; AND THE NAME STRING INFORMATION IS TAKEN FROM THE $INPPT RECORD

     32					; BLOCK.

     33					;

     34					; INPUTS:

     35					;

     36					;	$INIPT RECORD BLOCK                                                     ;**NEW**

     37					;                                                                               ;**-1

     38					; OUTPUTS:

     39					;

     40					;	AN ELEMENT DESCRIPTOR IS ALLOCATED AND INITIALIZED.

     41					;		R0=REAL ADDRESS OF ELEMENT DESCRIPTOR                           ;**NEW**

     42					;		R1=VIRTUAL ADDRESS OF ELEMENT DESCRIPTOR                        ;**NEW**

     43					;                                                                               ;**-1

     44					;	IF $ALELO IS CALLED THEN THE DIRECTORY I/D                              ;**NEW**

     45					;	IS SAVED INSTEAD OF THE FILE ID (IE. A PREVIOUS                         ;**-1

     46					;	CALL TO .PARSE IS ASSUMED) AND E$LNUM IS SET TO -2.                     ;**NEW**

     47					;-                                                                              ;**-1

     48

     49	000000	012701 	000002G		$ALEL1::MOV	#E$LLGH+2,R1	;GET LENGTH OF DESCRIPTOR PLUS 2

     50	000004	000402 				BR	ALELD1		;

     51	000006	012701 	000000G		$ALELD::MOV	#E$LLGH,R1	;GET LENGTH OF ELEMENT DESCRIPTOR

     52	000012				ALELD1:				;

     53	000012					CALL	ALEL		; ALLOCATE DESCRIPTOR AND SETUP FILENAME

     54	000016	062701 	000000 			ADD	#N.FID,R1	; POINT TO FILE I/D

     55	000022	000410 				BR	ALELO1		; SETUP I/D

     56	000024				$ALELO::			;

     57	000024	012701 	000000G			MOV	#E$LLGH,R1	; SETUP DESCRIPTOR LENGTH

ALELD	MACRO M1110  22-AUG-78 01:38  PAGE 3-1





     58	000030					CALL	ALEL		; ALLOCATE DESCRIPTOR AND SETUP FILENAME

     59	000034	005360 	000000G			DEC	E$LNUM(R0)	; SET HIGHEST SECTION NUMBER TO -2              ;**NEW**

     60	000040	062701 	000024 			ADD	#N.DID,R1	; POINT TO DIRECTORY I/D                        ;**-1

     61	000044				ALELO1:				;

     62	000044	012122 				MOV	(R1)+,(R2)+	; STORE I/D

     63	000046	012122 				MOV	(R1)+,(R2)+	;

     64	000050	012122 				MOV	(R1)+,(R2)+	;

     65	000052					RETURN			;

     66

     67					;

     68					; SETUP ELEMENT DESCRIPTOR (LESS I/D).

     69					; LEAVE R2 POINTING TO SPACE FOR I/D.

     70					;

     71

     72	000054				ALEL:				;

     73	000054					CALL	$ALVRT		; ALLOCATE VIRTUAL MEMORY                       ;**NEW**

     74	000060	011646 				MOV	(SP),-(SP)	; COPY RETURN ADDRESS                           ;**NEW**

     75	000062	010166 	000002 			MOV	R1,2(SP)	; SAVE VIRTUAL ADDRESS                          ;**NEW**

     76	000066	016701 	000000G			MOV	$INIPT,R1	; GET INPUT FILE RECORD BLOCK                   ;**-1

     77	000072	005360 	000000G			DEC	E$LNUM(R0)	;SET HIGHEST SECTION NUM TO -1

     78	000076	016160 	000000G	000000G		MOV	R$SWTH(R1),E$LSWT(R0);STORE SWITCH WORD

     79	000104	062701 	000102 			ADD	#F.FNB,R1	;POINT TO FILE NAME BLOCK

     80	000110	010002 				MOV	R0,R2		;COPY ADDR OF ELEMENT BLOCK

     81	000112	062702 	000000G			ADD	#E$LMND,R2	;CALCULATE ADDR MONITOR INFO

     82	000116	016122 	000034 			MOV	N.UNIT(R1),(R2)+;STORE UNIT NUMBER

     83	000122	016122 	000032 			MOV	N.DVNM(R1),(R2)+;STORE DEVICE NAME

     84	000126	016122 	000006 			MOV	N.FNAM(R1),(R2)+;STORE FILE NAME

     85	000132	016122 	000010 			MOV	N.FNAM+2(R1),(R2)+;

     86	000136	016122 	000012 			MOV	N.FNAM+4(R1),(R2)+;

     87	000142	016122 	000014 			MOV	N.FTYP(R1),(R2)+;STORE FILE TYPE

     88	000146	016122 	000016 			MOV	N.FVER(R1),(R2)+;STORE FILE VERSION

     89	000152					CALL	@(SP)+		; CALL THE CALLER                               ;**NEW**

     90	000154	012601 				MOV	(SP)+,R1	; RESTORE VIRTUAL ADDRESS                       ;**NEW**

     91	000156					RETURN			;

     92

     93		000001 				.END

ALELD	MACRO M1110  22-AUG-78 01:38  PAGE 3-2

SYMBOL TABLE



ALEL    000054R  	FD.CR = 000002   	F.ACTL= 000076   	F.NRBD= 000024   	N.FID = 000000

ALELD1  000012R  	FD.DIR= 000010   	F.ALOC= 000040   	F.NREC= 000030   	N.FNAM= 000006

ALELO1  000044R  	FD.FTN= 000001   	F.BBFS= 000062   	F.OVBS= 000030   	N.FTYP= 000014

B.BBFS= 000010   	FD.F11= 040000   	F.BDB = 000070   	F.RACC= 000016   	N.FVER= 000016

B.BFST= 000015   	FD.INS= 000010   	F.BGBC= 000057   	F.RATT= 000001   	N.NEXT= 000022

B.NXBD= 000012   	FD.ISP= 002000   	F.BKDN= 000026   	F.RCNM= 000034   	N.STAT= 000020

B.VBN = 000004   	FD.MNT= 100000   	F.BKDS= 000020   	F.RCTL= 000017   	N.UNIT= 000034

CH.AND= 000001   	FD.OSP= 004000   	F.BKEF= 000050   	F.RSIZ= 000002   	R$SWTH= ****** GX

CR    = 000015   	FD.PLC= 000004   	F.BKP1= 000051   	F.RTYP= 000000   	R$$11M= 000000

E$LLGH= ****** GX	FD.PRN= 000004   	F.BKST= 000024   	F.SEQN= 000100   	R.FIX = 000001

E$LMND= ****** GX	FD.PSE= 010000   	F.BKVB= 000064   	F.SPDV= 000072   	R.SEQ = 000003

E$LNUM= ****** GX	FD.RAH= 000001   	F.CHR = 000075   	F.SPUN= 000074   	R.VAR = 000002

E$LSWT= ****** GX	FD.RAN= 000002   	F.CNTG= 000034   	F.STBK= 000036   	SPA   = 000040

FA.APD= 000100   	FD.REC= 000001   	F.DFNB= 000046   	F.UNIT= 000136   	S.BFHD= 000020

FA.CRE= 000010   	FD.RWM= 000001   	F.DSPT= 000044   	F.URBD= 000020   	S.FATT= 000016

FA.DLK= 001000   	FD.SDI= 000020   	F.DVNM= 000134   	F.VBN = 000064   	S.FDB = 000140

FA.ENB= 100000   	FD.SQD= 000040   	F.EFBK= 000010   	F.VBSZ= 000060   	S.FNAM= 000006

FA.EXC= 002000   	FD.TTY= 000004   	F.EFN = 000050   	HT    = 000011   	S.FNB = 000036

FA.EXT= 000004   	FD.WBH= 000002   	F.EOBB= 000032   	LF    = 000012   	S.FNBW= 000017

FA.NSP= 000100   	FF    = 000014   	F.ERR = 000052   	NB.DEV= 000200   	S.FNTY= 000004

FA.POS= 010000   	FF.CHR= 000005   	F.FACC= 000043   	NB.DIR= 000100   	S.FTYP= 000002

FA.RD = 000001   	FF.NV = 000003   	F.FFBY= 000014   	NB.NAM= 000004   	S.NFEN= 000020

FA.RWD= 004000   	FF.POE= 000002   	F.FNAM= 000110   	NB.SD1= 000400   	VT    = 000013

FA.SEQ= 040000   	FF.RWD= 000001   	F.FNB = 000102   	NB.SD2= 001000   	$ALELD  000006RG

FA.SHR= 000040   	FF.RWF= 000006   	F.FTYP= 000116   	NB.SNM= 000040   	$ALELO  000024RG

FA.TMP= 000020   	FF.SPC= 000004   	F.FVER= 000120   	NB.STP= 000020   	$ALEL1  000000RG

FA.WCK= 020000   	FO.APD= 000106   	F.HIBK= 000004   	NB.SVR= 000010   	$ALVRT= ****** GX

FA.WRT= 000002   	FO.MFY= 000002   	F.LUN = 000042   	NB.TYP= 000002   	$INIPT= ****** GX

FD.BLK= 000010   	FO.RD = 000001   	F.MBCT= 000054   	NB.VER= 000001   	$$    = 000001

FD.CCL= 000002   	FO.UPD= 000006   	F.MBC1= 000055   	N.DID = 000024   	...GBL= 000000

FD.COM= 020000   	FO.WRT= 000016   	F.MBFG= 000056   	N.DVNM= 000032   	...TPC= 000140



. ABS.	000000	   000

      	000160	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2163 WORDS  ( 9 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:13

OBJ$:ALELD,LIS$:ALELD/-SP=SRC$:MACFLM,FCSPR,ALELD

