ALSGD	MACRO M1110  22-AUG-78 01:38  PAGE 2





      1						.TITLE	ALSGD

      2						.IDENT	/06/

      3					                                                                                ;**-1

      4					;

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

      6					; COPYRIGHT   1976,  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 06

     21					;                                                                               ;**-1

     22					; D. N. CUTLER/C. MONIA	14-MAR-74

     23					;

     24					; MODIFICATIONS:

     25					;

     26					; NO.		DATE		PROGRAMMER

     27					; ---		----		----------

     28					;

     29					; 038		22-MAR-75	C. MONIA

     30					; 048		11-FEB-76	C. MONIA

     31					;

     32					;

     33					;+

     34					; **-$ALSGD-ALLOCATE SEGMENT DESCRIPTOR

     35					;

     36					; THIS ROUTINE IS CALLED TO ALLOCATE A SEGMENT DESCRIPTOR IN VIRTUAL

     37					; MEMORY. STORAGE IS ALLOCATED AND THE DESCRIPTOR IS INITIALIZED.

     38					;

     39					; INPUTS:

     40					;

     41					;	NONE

     42					;

     43					; OUTPUTS:

     44					;

     45					;	R0=REAL ADDRESS OF DESCRIPTOR

     46					;	R1=VIRTUAL ADDRESS OF DESCRIPTOR

     47					;	SEGMENT COUNT IS INCREMENTED.

     48					;-

     49

     50	000000	012701 	000000G		$ALSGD::MOV	#S$ZSEQ,R1	;GET SIZE OF SEQUENCE LIST ENTRY

     51	000004					CALL	$ALBLK		;ALLOCATE STORAGE

     52	000010	016760 	000000G	000002 		MOV	$ASCT,2(R0)	; SET ADDRESS OF ABS SECTION ENTRY              ;**NEW**

     53	000016	010046 				MOV	R0,-(SP)	;SAVE ADDRESS FOR LATER                         ;**-1

     54	000020	012701 	000000G			MOV	#S$GLGH,R1	;GET SIZE OF SEGMENT DESCRIPTOR

     55	000024					CALL	$ALVRT		; ALLOCATE VIRTUAL MEMORY

     56	000030	012760 	177777G	000000G		MOV	#L$HCNT-1,S$GSTB(R0) ;++038 SET LISTHEAD COUNT FOR SYMBOLS

     57	000036	112760 	000000C	000000G		MOVB	#<SG$DES!SG$MEM>,S$GSTS(R0) ; SET STATUS

ALSGD	MACRO M1110  22-AUG-78 01:38  PAGE 2-1





     58	000044	010160 	000000G			MOV	R1,S$GNXT(R0)	; SET VIRTUAL ADDRESS OF NEXT

     59	000050	010160 	000000G			MOV	R1,S$GPRV(R0)	; SET VIRTUAL ADDRESS OF PREVIOUS

     60	000054	010160 	000002G			MOV	R1,S$GELT+2(R0)	; SETUP ELEMENT LISTHEAD                        ;**-8

     61	000060	062760 	000000C	000002G		ADD	#<S$GELT/2>,S$GELT+2(R0) ; LAST POINTS TO FIRST INITALLY

     62	000066	010002 				MOV	R0,R2		;COPY ADDRESS OF BLOCK

     63	000070	062702 	000000G			ADD	#S$GATL,R2	;POINT TO AUTOLOAD LIST

     64	000074	010262 	000002 			MOV	R2,2(R2)	;LAST POINTS TO FIRST

     65	000100	011660 	000000G			MOV	(SP),S$GSEQ(R0)	;INITIALIZE SEQUENCE ALLOCATION LISTHEAD

     66	000104	012660 	000002G			MOV	(SP)+,S$GSEQ+2(R0);

     67	000110	005267 	000000G			INC	$NUMSG		;INCREMENT NUMBER OF SEGMENTS

     68	000114					RETURN			;

     69

     70		000001 				.END

ALSGD	MACRO M1110  22-AUG-78 01:38  PAGE 2-2

SYMBOL TABLE



CR    = 000015   	R$$11M= 000000   	S$GELT= ****** GX	S$GSTB= ****** GX	$ALSGD  000000RG

FF    = 000014   	SG$DES= ****** GX	S$GLGH= ****** GX	S$GSTS= ****** GX	$ALVRT= ****** GX

HT    = 000011   	SG$MEM= ****** GX	S$GNXT= ****** GX	S$ZSEQ= ****** GX	$ASCT = ****** GX

LF    = 000012   	SPA   = 000040   	S$GPRV= ****** GX	VT    = 000013   	$NUMSG= ****** GX

L$HCNT= ****** GX	S$GATL= ****** GX	S$GSEQ= ****** GX	$ALBLK= ****** GX	$$    = 000001



. ABS.	000000	   000

      	000116	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  660 WORDS  ( 3 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:05

OBJ$:ALSGD,LIS$:ALSGD/-SP=SRC$:MACFLM,ALSGD

