INITL	MACRO M1110  22-AUG-78 01:44  PAGE 3





      1						.TITLE	INITL

      2						.IDENT	/25/

      3					                                                                                ;**-1

      4					;

      5					;

      6					; COPYRIGHT (C) 1976

      7					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      8					;

      9					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A

     10					; SINGLE COMPUTER SYSTEM AND MAY  BE  COPIED   ONLY  WITH  THE

     11					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE,  OR

     12					; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED  OR  OTHERWISE

     13					; MADE AVAILABLE TO ANY OTHER PERSON   EXCEPT FOR  USE ON SUCH

     14					; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE  TERMS.  TITLE

     15					; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL  TIMES  REMAIN

     16					; IN DEC.

     17					;

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

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

     20					; EQUIPMENT CORPORATION.

     21					;

     22					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF

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

     24					;

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

     26					; VERSION 25

     27					;                                                                               ;**-1

     28					; D. N. CUTLER/C. MONIA	21-JAN-74

     29					;

     30					; MODIFICATIONS:

     31					;

     32					; NO.		DATE		PROGRAMMER

     33					; ---		----		----------

     34					;

     35					; 043		23-SEP-75	C. MONIA

     36					; 044		21-JAN-76	C. MONIA

     37					; 048		11-FEB-76	C. MONIA

     38					; 051		02-MAR-76	C. MONIA

     39					; 052		24-MAR-76	C. MONIA

     40					; 054		27-MAR-76	C. MONIA

     41					; 059		08-APR-76	C. MONIA

     42					; 065		30-JUL-76	C. MONIA

     43					;

     44					; GENERAL INITIALIZATION ROUTINE

     45					;

     46					; MACRO LIBRARY CALLS

     47					;

     48

     49						.MCALL	DIR$,GPRT$

     50

     51					;

     52					; LOCAL MACROS

     53					;

     54					; MACRO TO ISSUE RSX-11D 'READ EVENT FLAG' DIRECTIVE

     55					;

     56					; RDEF$S	FLAG

     57					;

INITL	MACRO M1110  22-AUG-78 01:44  PAGE 3-1





     58					; WHERE:

     59					;

     60					;	FLAG=EVENT FLAG NUMBER (1 TO 64.)

     61					;

     62

     63						.MACRO	RDEF$S	FLAG

     64						MOV	FLAG,-(SP)

     65						MOV	#<2*400!37.>,-(SP)

     66						DIR$

     67						.ENDM

     68

     69					;+

     70					; **-$INITL-GENERAL INITIALIZATION ROUTINE

     71					;

     72					; THIS ROUTINE IS CALLED AT THE START OF EACH TASK BUILD TO

     73					; INITIALIZE STORAGE.

     74					;

     75					; INPUTS:

     76					;

     77					;	NONE.

     78					;

     79					; OUTPUTS:

     80					;

     81					;	INITIAL STATE OF STORAGE IS SET UP.

     82					;-

     83

     84	000000				$INITL::			;

     85	000000					CALL	$FINIT		; INITIALIZE FCS STORAGE

     86	000004	012700 	000000G			MOV	#$CLRBG,R0	; GET START OF AREA TO CLEAR

     87	000010	012701 	000000G			MOV	#C$LRSZ,R1	; GET NUMBER OF WORDS TO CLEAR

     88	000014				2$:				;

     89	000014	005020 				CLR	(R0)+		; INITIALIZE MEMORY

     90	000016					SOB	R1,2$		; ...

     91	000022	016767 	000000G	000000G		MOV	$DFSWT,$SWTCH	; SET DEFAULT SWITCH WORD

     92	000030	005067 	000000G			CLR	$LIBNM		; CLEAR SYSTEM LIBRARY NAMEBLOCK ADDRESS

     93	000034	016700 	000000G			MOV	$INIPT,R0	; GET INPUT REDORD BLOCK POINTER

     94	000040	005070 	000000G			CLR	@R$NMBK(R0)	; NO NAME BLOCK TO SETUP

     95	000044					CALL	$STRCB		; SETUP FCS STORAGE

     96	000050	005067 	000000G			CLR	$ERRCT		; CLEAR ERROR COUNT

     97	000054	012700 	000000G			MOV	#$FRHD,R0	; GET ADDRESS OF FREE POOL LISTHEAD

     98	000060	012701 	000000G			MOV	#$FRSZ1,R1	; GET CORE POOL ADDRESS

     99	000064	010110 				MOV	R1,(R0)		; SET LINK TO CORE POOL

    100	000066	012702 	000000C			MOV	#<<$FRSZ2-$FRSZ1>&^C3>,R2 ; GET SIZE OF CORE POOL

    101	000072	001404 				BEQ	3$		; IF EQ NONE

    102	000074	005021 				CLR	(R1)+		; CLEAR LINK TO NEXT

    103	000076	010211 				MOV	R2,(R1)		; SET POOL SIZE

    104	000100	010267 	000000G			MOV	R2,$FRSIZ	; RECORD INITIAL SIZE OF POOL

    105	000104				3$:				;

    106	000104	012701 	177776 			MOV	#177776,R1	; SET TOP ADDRESS TO MAX

    107	000110					RDEF$S	#1		; EXECUTE NON RSX-11M DIRECTIVE

    108	000122	016767 	000000G	000000G		MOV	$DSW,$RSXSY	; RESULT IDENTIFIES SYSTEM

    109	000130	103011 				BCC	4$		; IF C/C RUNNING UNDER RSX-11D

    110	000132					CALL	$INIDM		; INITIALIZE DYNAMIC MEMORY

    111	000136	010267 	000000G			MOV	R2,$FRSIZ	; RECORD INITIAL POOL SIZE

    112

    113						.IF DF	R$$11M

    114

INITL	MACRO M1110  22-AUG-78 01:44  PAGE 3-2





    115	000142	005700 				TST	R0		; SYSTEM MAPPED?

    116	000144	001003 				BNE	4$		; IF NE NO

    117	000146	052767 	000000G	000000G		BIS	#MP$SY,$SWTCH	; SET DEFAULT TO MAPPED SYSTEM

    118

    119						.ENDC

    120

    121	000154				4$:				;

    122	000154	052767 	000000G	000000G		BIS	#AB$RT,$SWTCH	; FORCE ABORT ON ANY ERROR

    123	000162					CALL	$INIVM		; INITIALIZE WORKFILE SYSTEM

    124	000166	103513 				BCS	10$		; IF C/S WORKFILE OPEN FAILURE

    125	000170	012767 	000100 	000000G		MOV	#64.,$PHYBD	; SET PHYSICAL ADDRESS BOUND

    126	000176	005067 	000000G			CLR	$SYMHD		; CLEAR SYMBOL TABLE LISTHEAD

    127	000202	012767 	177774G	000000G		MOV	#S$ZSEG-4,$SZSEG ; SET SIZE OF RESIDENT SEGMENT DESCRIPTOR

    128	000210	012767 	020000 	000000G		MOV	#20000,$VRTBD	; SET VIRTUAL ADDRESS BOUND

    129	000216	012767 	000000G	000000G		MOV	#D$FAPR,$PRVAP	; SET DEFAULT PRIVILEGED APR

    130	000224	012701 	000000G			MOV	#C$SLGH,R1	; GET LENGTH OF SECTION ENTRY

    131	000230	010146 				MOV	R1,-(SP)	; SAVE LENGTH

    132	000232					CALL	$ALVRT		; ALLOCATE VIRTUAL MEMORY

    133	000236	010167 	000000G			MOV	R1,$ASCT	; SAVE VIRTUAL ADDRESS OF ABS

    134	000242	012701 	000000G			MOV	#$ABSCT,R1	; GET ADDRESS OF PROTOTYPE ABS SECTION

    135	000246	012602 				MOV	(SP)+,R2	; RETRIEVE LENGTH

    136	000250				5$:				;

    137	000250	112120 				MOVB	(R1)+,(R0)+	; COPY ENTRY

    138	000252					SOB	R2,5$		;

    139	000256	012701 	000000G			MOV	#W$NLGH,R1	; GET SIZE OF WINDOW BLOCK

    140	000262					CALL	$ALVRT		; ALLOCATE WINDOW BLOCK

    141	000266	010167 	000000G			MOV	R1,$RTWDP	; MARK ADDRESS OF ROOT WINDOW DESCR.

    142	000272					CALL	$ALSGD		;ALLOCATE ROOT SEGMENT DESCRIPTOR

    143	000276	112760 	000000C	000000G		MOVB	#<SG$DES!SG$LOD>,S$GSTS(R0) ; SET STATUS TO IN-CORE, LOADED

    144	000304	016760 	000000G	000000G		MOV	$RTWDP,S$GWDP(R0) ; SET WINDOW BLOCK ADDRESS

    145	000312	010167 	000000G			MOV	R1,$RTSEG	; SET VIRTUAL ADDRESS OF DESCRIPTOR

    146	000316	010167 	000000G			MOV	R1,$CRVSG	; SET VIRTUAL ADDRESS OF CURRENT SEGMENT

    147	000322	010067 	000000G			MOV	R0,$CRSEG	;SET CURRENT SEG POINTER

    148	000326	062701 	000000C			ADD	#S$GCST/2,R1	; POINT TO SECTION TABLE

    149	000332	010100 				MOV	R1,R0		; COPY LISTHEAD ADDRESS

    150	000334	016701 	000000G			MOV	$ASCT,R1	; GET ADDRESS OF ABS SECTION

    151	000340					CALL	$SRCHI		;SEARCH FOR INSERT

    152	000344					CALL	$ISYM		;INSERT SECTION ENTRY IN TABLE

    153	000350	005067 	000000G			CLR	$SCTHD		; CLEAR SECTION EXTENSION LISTHEAD

    154	000354	042767 	000000G	000000G		BIC	#AB$RT,$SWTCH	; CLEAR ABORT FLAG

    155	000362	012767 	000001 	000000G		MOV	#1,$XFRAD	;SET DEFAULT TRANSFER ADDRESSES

    156	000370	012767 	000001 	000000G		MOV	#1,$ODTAD	;FOR TASK AND ODT

    157	000376	005067 	000000G			CLR	$IDENT		;CLEAR PROGRAM IDENTIFICATION

    158	000402	005067 	000002G			CLR	$IDENT+2	;

    159	000406	012767 	000000G	000000G		MOV	#$RTSEG,$PATH	; INITIALIZE PATH LIST

    160	000414					RETURN			;

    161	000416				10$:				;

    162	000416	012701 	000000C			MOV	#<S$V2*400!E$R75>,R1 ; UNABLE TO OPEN WORK FILE

    163	000422	005002 				CLR	R2		; SET DUMMY PARAMETER BLOCK ADDRESS

    164	000424					CALL	$ERMSG		; FATAL-NO RETURN

    165

    166		000001 				.END

INITL	MACRO M1110  22-AUG-78 01:44  PAGE 3-3

SYMBOL TABLE



AB$RT = ****** GX	FD.PSE= 010000   	F.EOBB= 000032   	NB.STP= 000020   	$ALVRT= ****** GX

B.BBFS= 000010   	FD.RAH= 000001   	F.ERR = 000052   	NB.SVR= 000010   	$ASCT = ****** GX

B.BFST= 000015   	FD.RAN= 000002   	F.FACC= 000043   	NB.TYP= 000002   	$CLRBG= ****** GX

B.NXBD= 000012   	FD.REC= 000001   	F.FFBY= 000014   	NB.VER= 000001   	$CRSEG= ****** GX

B.VBN = 000004   	FD.RWM= 000001   	F.FNAM= 000110   	N.DID = 000024   	$CRVSG= ****** GX

CH.AND= 000001   	FD.SDI= 000020   	F.FNB = 000102   	N.DVNM= 000032   	$DFSWT= ****** GX

CR    = 000015   	FD.SQD= 000040   	F.FTYP= 000116   	N.FID = 000000   	$DSW  = ****** GX

C$LRSZ= ****** GX	FD.TTY= 000004   	F.FVER= 000120   	N.FNAM= 000006   	$ERMSG= ****** GX

C$SLGH= ****** GX	FD.WBH= 000002   	F.HIBK= 000004   	N.FTYP= 000014   	$ERRCT= ****** GX

D$FAPR= ****** GX	FF    = 000014   	F.LUN = 000042   	N.FVER= 000016   	$FINIT= ****** GX

E$R75 = ****** GX	FF.CHR= 000005   	F.MBCT= 000054   	N.NEXT= 000022   	$FRHD = ****** GX

FA.APD= 000100   	FF.NV = 000003   	F.MBC1= 000055   	N.STAT= 000020   	$FRSIZ= ****** GX

FA.CRE= 000010   	FF.POE= 000002   	F.MBFG= 000056   	N.UNIT= 000034   	$FRSZ1= ****** GX

FA.DLK= 001000   	FF.RWD= 000001   	F.NRBD= 000024   	R$NMBK= ****** GX	$FRSZ2= ****** GX

FA.ENB= 100000   	FF.RWF= 000006   	F.NREC= 000030   	R$$11M= 000000   	$IDENT= ****** GX

FA.EXC= 002000   	FF.SPC= 000004   	F.OVBS= 000030   	R.FIX = 000001   	$INIDM= ****** GX

FA.EXT= 000004   	FO.APD= 000106   	F.RACC= 000016   	R.SEQ = 000003   	$INIPT= ****** GX

FA.NSP= 000100   	FO.MFY= 000002   	F.RATT= 000001   	R.VAR = 000002   	$INITL  000000RG

FA.POS= 010000   	FO.RD = 000001   	F.RCNM= 000034   	SG$DES= ****** GX	$INIVM= ****** GX

FA.RD = 000001   	FO.UPD= 000006   	F.RCTL= 000017   	SG$LOD= ****** GX	$ISYM = ****** GX

FA.RWD= 004000   	FO.WRT= 000016   	F.RSIZ= 000002   	SPA   = 000040   	$LIBNM= ****** GX

FA.SEQ= 040000   	F.ACTL= 000076   	F.RTYP= 000000   	S$GCST= ****** GX	$ODTAD= ****** GX

FA.SHR= 000040   	F.ALOC= 000040   	F.SEQN= 000100   	S$GSTS= ****** GX	$PATH = ****** GX

FA.TMP= 000020   	F.BBFS= 000062   	F.SPDV= 000072   	S$GWDP= ****** GX	$PHYBD= ****** GX

FA.WCK= 020000   	F.BDB = 000070   	F.SPUN= 000074   	S$V2  = ****** GX	$PRVAP= ****** GX

FA.WRT= 000002   	F.BGBC= 000057   	F.STBK= 000036   	S$ZSEG= ****** GX	$RSXSY= ****** GX

FD.BLK= 000010   	F.BKDN= 000026   	F.UNIT= 000136   	S.BFHD= 000020   	$RTSEG= ****** GX

FD.CCL= 000002   	F.BKDS= 000020   	F.URBD= 000020   	S.FATT= 000016   	$RTWDP= ****** GX

FD.COM= 020000   	F.BKEF= 000050   	F.VBN = 000064   	S.FDB = 000140   	$SCTHD= ****** GX

FD.CR = 000002   	F.BKP1= 000051   	F.VBSZ= 000060   	S.FNAM= 000006   	$SRCHI= ****** GX

FD.DIR= 000010   	F.BKST= 000024   	HT    = 000011   	S.FNB = 000036   	$STRCB= ****** GX

FD.FTN= 000001   	F.BKVB= 000064   	LF    = 000012   	S.FNBW= 000017   	$SWTCH= ****** GX

FD.F11= 040000   	F.CHR = 000075   	MP$SY = ****** GX	S.FNTY= 000004   	$SYMHD= ****** GX

FD.INS= 000010   	F.CNTG= 000034   	NB.DEV= 000200   	S.FTYP= 000002   	$SZSEG= ****** GX

FD.ISP= 002000   	F.DFNB= 000046   	NB.DIR= 000100   	S.NFEN= 000020   	$VRTBD= ****** GX

FD.MNT= 100000   	F.DSPT= 000044   	NB.NAM= 000004   	VT    = 000013   	$XFRAD= ****** GX

FD.OSP= 004000   	F.DVNM= 000134   	NB.SD1= 000400   	W$NLGH= ****** GX	$$    = 000001

FD.PLC= 000004   	F.EFBK= 000010   	NB.SD2= 001000   	$ABSCT= ****** GX	...GBL= 000000

FD.PRN= 000004   	F.EFN = 000050   	NB.SNM= 000040   	$ALSGD= ****** GX	...TPC= 000140



. ABS.	000000	   000

      	000430	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2454 WORDS  ( 10 PAGES)

DYNAMIC MEMORY:  3828 WORDS  ( 14 PAGES)

ELAPSED TIME:  00:00:17

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

