DSALO	MACRO M1110  22-AUG-78 01:40  PAGE 2





      1						.TITLE	DSALO

      2						.IDENT	/02/

      3

      4					;

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

      6					;

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

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

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

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

     11					;

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

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

     14					; EQUIPMENT CORPORATION.

     15					;

     16					; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE  USE  OR  RELIABILITY

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

     18					;

     19					; VERSION 02

     20					;

     21					; C. MONIA 09-FEB-76

     22					;

     23					; ALLOCATE TASK-RESIDENT DESCRIPTORS

     24					;

     25					; LOCAL MACROS

     26					;

     27					; DEFINE SECTION EXTENSION TABLE ENTRY

     28					;

     29					; EXTSC	MUL1,MUL2,ADDCON

     30					;

     31					; WHERE:

     32					;

     33					;	MUL1 = ADDRESS OF MULTIPLICATION CONSTANT #1

     34					;	MUL2 = ADDRESS OF MULTIPLICATION CONSTANT #2

     35					;	ADDCON = ADDITIVE CONSTANT

     36					;

     37

     38						.MACRO	EXTSC	MUL1,MUL2,ADDCON

     39

     40					$$$=.

     41						.WORD	MUL1

     42						.WORD	MUL2

     43						.WORD	ADDCON

     44					EXSIZ=.-$$$

     45						.ENDM

     46

     47					;

     48					; LOCAL DATA

     49					;

     50					; SECTION EXTENSION TABLE

     51					;

     52

     53	000000				EXTBL:	EXTSC	SZATL,NMATL,0

     54	000006					EXTSC	SZREG,$NUMRG,0

     55	000014					EXTSC	$SZSEG,$NUMSG,0

     56	000022					EXTSC	SZWND,$TSKWD,0

     57		000004 			TBSIZ=.-EXTBL/EXSIZ

DSALO	MACRO M1110  22-AUG-78 01:40  PAGE 2-1





     58

     59	000030				NMATL:	.BLKW	1		; NUMBER OF AUTOLOAD VECTORS

     60	000032				SGSEG:	.BLKW	1		; CURRENT SEGMENT DESCRIPTOR TASK ADDRESS

     61	000034					.BLKW	1		; ADDRESS OF SEGMENT DESCRIPTOR SECTION

     62	000036					.BLKW	1		; CURRENT WINDOW DESCRIPTOR TASK ADDRESS

     63	000040					.BLKW	1		; ADDRESS OF WINDOW DESCRIPTOR SECTION

     64

     65					;

     66					; DESCRIPTOR SIZES

     67					;

     68

     69	000042	000000G			SZATL:	.WORD	S$ZATL		; AUTLOLOAD VECTOR

     70	000044	000000G			SZREG:	.WORD	R$GLGH		; SIZE OF REGION DESCRIPTOR

     71	000046	000000G			SZWND:	.WORD	W$NLGH		; SIZE OF WINDOW DESCRIPTOR

     72

     73					;+

     74					;

     75					; **-$DSALO-ALLOCATE SPACE FOR TASK-RESIDENT DESCRIPTORS

     76					;

     77					; THIS SUBROUTINE IS CALLED TO SET THE LENGTH OF PROGRAM SECTIONS

     78					; THAT WILL CONTAINS THE FOLLOWING TASK-RESIDENT DESCRIPTORS:

     79					;

     80					;	. SEGMENT TABLES

     81					;	. AUTOLOAD VECTORS

     82					;	. WINDOW DESCRIPTORS

     83					;	. REGION DESCRIPTORS

     84					;

     85					; INPUTS:

     86					;

     87					;	SEGMENT TABLES

     88					;

     89					; OUTPUTS:

     90					;

     91					;	THE LENGTH OF THE FOLLOWING PROGRAM SECTIONS IS ESTABLISHED

     92					;

     93					;	$$ALVC - AUTOLOAD VECTORS

     94					;	$$RGDS - REGION DESCRIPTORS

     95					;	$$SGD1 - SEGMENT DESCRIPTORS

     96					;	$$WNDS - WINDOW DESCRIPTORS

     97					;

     98					;-

     99

    100	000050				$DSALO::			;

    101	000050	026727 	000000G	000001 		CMP	$NUMSG,#1	; TASK OVERLAID?

    102	000056	003404 				BLE	10$		; IF LE NO

    103	000060	012700 	000072'			MOV	#DSALO,R0	; GET ADDRESS OF PHASE DEPENDANT ROUTINE

    104	000064					CALL	$PCTRL		; CALL PHASE CONTROL ROUTINE

    105	000070				10$:				;

    106	000070					RETURN			;

    107

    108					;

    109					; ALLOCATE DESCRIPTOR STORAGE

    110					;

    111

    112	000072				DSALO:				;

    113	000072					SAVRG			; SAVE THE NONVOLATILE REGISTERS

    114	000076	016701 	000000G			MOV	$CRVSG,R1	; GET VIRTUAL ADDRESS OF CURRENT SEGMENT

DSALO	MACRO M1110  22-AUG-78 01:40  PAGE 2-2





    115	000102					CALL	$WRMPG		; WRITE-MARK PAGE

    116	000106	016705 	000000G			MOV	$CRSEG,R5	; GET THE REAL ADDRESS OF CURRENT SEGMENT

    117	000112	016567 	000004G	177710 		MOV	S$GATL+4(R5),NMATL ; SET NUMBER OF AUTOLOAD VECTORS

    118	000120	010504 				MOV	R5,R4		; COPY SEGMENT DESCRIPTOR ADDRESS

    119	000122	062704 	000000G			ADD	#S$GAUT,R4	; POINT TO FIRST DESCRIPTOR

    120	000126	012703 	000000'			MOV	#EXTBL,R3	; POINT TO EXTENSION LIST

    121	000132					CALL	CMPSZ		; COMPUTE AUTOLOAD SECTION SIZE

    122	000136	012746 	000032'			MOV	#SGSEG,-(SP)	; PUSH ADDRESS OF LOCAL STORE

    123	000142	026767 	000000G	000000G		CMP	$CRVSG,$RTSEG	; CURRENT = ROOT?

    124	000150	001022 				BNE	20$		; IF NE NO

    125	000152	012746 	000003 			MOV	#TBSIZ-1,-(SP)	; PUSH NUMBER OF ENTRIES TO CONSIDER

    126	000156				10$:				;

    127	000156					CALL	CMPSZ		; COMPUTE SIZE INCREMENT

    128	000162	005316 				DEC	(SP)		; MORE TO PROCESS?

    129	000164	001374 				BNE	10$		; IF NE NO

    130	000166	005226 				INC	(SP)+		; CLEAN STACK

    131	000170	011604 				MOV	(SP),R4		; GET ADDRESS OF LOCAL STORE

    132	000172	016524 	000000G			MOV	S$GSEG(R5),(R4)+ ; SET BASE OF SEGMENT DESCRIPTORS

    133	000176	016524 	000002G			MOV	S$GSEG+2(R5),(R4)+ ; SET VIRTUAL ADDRESS OF SECTION

    134	000202	016524 	000000G			MOV	S$GWND(R5),(R4)+ ; SET BASE OF WINDOW DESCRIPTORS

    135	000206	005065 	000000G			CLR	S$GWND(R5)	; RESET BASE ADDRESS

    136	000212	016514 	000002G			MOV	S$GWND+2(R5),(R4) ; SET VIRTUAL ADDRESS OF WINDOW SECTIPN

    137	000216				20$:				;

    138	000216	012604 				MOV	(SP)+,R4	; GET ADDRESS OF LOCAL STORE

    139	000220	011465 	000000G			MOV	(R4),S$GSEG(R5) ; SET BASE OF SEGMENT TABLES

    140	000224	066724 	000000G			ADD	$SZSEG,(R4)+	; UPDATE ADDRESS

    141	000230	012465 	000002G			MOV	(R4)+,S$GSEG+2(R5) ; SET VIRTUAL ADDRESS OF SEGMENT TABLE SECTIPN

    142	000234	062465 	000000G			ADD	(R4)+,S$GWND(R5) ; OFFSET WINDOW DESCRIPTOR ADDRESS

    143	000240	011465 	000002G			MOV	(R4),S$GWND+2(R5) ; SET ADDRESS OF WINDOW SECTION

    144	000244					RETURN			;

    145

    146					;

    147					; COMPUTE SIZE OF PROGRAM SECTION TO CONTAIN DESCRIPTOR

    148					;

    149

    150	000246				CMPSZ:				;

    151	000246	013301 				MOV	@(R3)+,R1	; GET MULTIPLIER

    152	000250	013300 				MOV	@(R3)+,R0	; GET MULTIPLICAND

    153

    154						.IF NDF	V1145

    155

    156	000252					CALL	$MUL		; MULTIPLY

    157

    158						.IFF

    159

    160						MUL	R0,R1		; MULTIPLY

    161

    162						.ENDC

    163

    164	000256	062301 				ADD	(R3)+,R1	; ADD ADDITIVE CONSTANT

    165	000260	010146 				MOV	R1,-(SP)	; SAVE RESULT

    166	000262	016401 	000002 			MOV	2(R4),R1	; GET VIRTUAL ADDRESS OF SECTION

    167	000266	001422 				BEQ	10$		; IF EQ NONE

    168	000270					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    169	000274					CALL	$WRMPG		; WRITE-MARK PAGE

    170	000300	016014 	000000G			MOV	C$SCUR(R0),(R4)	; SET BASE OF DESCRIPTOR

    171	000304	061660 	000000G			ADD	(SP),C$SCUR(R0)	; UPDATE CURRENT BASE

DSALO	MACRO M1110  22-AUG-78 01:40  PAGE 2-3





    172	000310	103011 				BCC	10$		; IF C/C OK

    173	000312	011460 	000000G			MOV	(R4),C$SCUR(R0)	; RESET CURRENT BASE

    174	000316	010002 				MOV	R0,R2		; COPY ADDRESS OF SECTION

    175	000320	062702 	000000G			ADD	#S$YM,R2	; POINT TO SECTION NAME

    176	000324	012701 	000000C			MOV	#<S$V0*400!E$R19>,R1 ; GET ERROR/SEVERITY

    177	000330					CALL	$ERMSG		; REPORT SECTION OVERFLOW

    178	000334				10$:				;

    179	000334	005226 				INC	(SP)+		; CLEAN STACK

    180	000336	022424 				CMP	(R4)+,(R4)+	; POINT TO NEXT SECTION

    181	000340					RETURN			;

    182

    183		000001 				.END

DSALO	MACRO M1110  22-AUG-78 01:40  PAGE 2-4

SYMBOL TABLE



CMPSZ   000246R  	LF    = 000012   	S$GATL= ****** GX	W$NLGH= ****** GX	$PCTRL= ****** GX

CR    = 000015   	NMATL   000030R  	S$GAUT= ****** GX	$CRSEG= ****** GX	$RTSEG= ****** GX

C$SCUR= ****** GX	R$GLGH= ****** GX	S$GSEG= ****** GX	$CRVSG= ****** GX	$SAVRG= ****** GX

DSALO   000072R  	R$$11M= 000000   	S$GWND= ****** GX	$CVRL = ****** GX	$SZSEG= ****** GX

EXSIZ = 000006   	SGSEG   000032R  	S$V0  = ****** GX	$DSALO  000050RG 	$TSKWD= ****** GX

EXTBL   000000R  	SPA   = 000040   	S$YM  = ****** GX	$ERMSG= ****** GX	$WRMPG= ****** GX

E$R19 = ****** GX	SZATL   000042R  	S$ZATL= ****** GX	$MUL  = ****** GX	$$    = 000001

FF    = 000014   	SZREG   000044R  	TBSIZ = 000004   	$NUMRG= ****** GX	$$$   = 000022R

HT    = 000011   	SZWND   000046R  	VT    = 000013   	$NUMSG= ****** GX



. ABS.	000000	   000

      	000342	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  835 WORDS  ( 4 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:07

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

