SNGSG	MACRO M1110  22-AUG-78 01:59  PAGE 3





      1						.TITLE	SNGSG

      2						.IDENT	/11/

      3					                                                                                ;**-1

      4					;

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

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

      7					;                                                                               ;**-2

      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 11

     21					;                                                                               ;**-1

     22					;                                                                               ;**NEW**

     23					; MODIFICATIONS:                                                                ;**NEW**

     24					;                                                                               ;**NEW**

     25					; NO.		DATE		PROGRAMMER                                      ;**NEW**

     26					; ---		----		----------                                      ;**NEW**

     27					;                                                                               ;**NEW**

     28					; 031		03-JAN-75	C. MONIA                                        ;**NEW**

     29					; 054		27-MAR-76	C. MONIA

     30					; 059		09-APR-76	C. MONIA

     31					;

     32					;+                                                                              ;**-1

     33					; **-$SNGSG-CREATE SINGLE SEGMENT DESCRIPTION

     34					;

     35					; THIS ROUTINE IS CALLED TO CREATE A SINGLE SEGMENT TASK

     36					; DESCRIPTION.

     37					;

     38					; INPUTS:

     39					;

     40					;	R5=ADDRESS OF TEMP BUFFER AREA.

     41					;	$INPPT RECORD BLOCK.

     42					;

     43					; OUTPUTS:

     44					;

     45					;	A SINGLE SEGMENT TASK DESCRIPTION IS CREATED.

     46					;-

     47

     48	000000				$SNGSG::			;

     49	000000	016701 	000000G			MOV	$LBMOD,R1	; GET ADDRESS OF MODULE NAME LIST

     50	000004	001404 				BEQ	3$		; IF EQ NONE

     51	000006					CALL	$CVRL		; CONVERT TO REAL

     52	000012	012046 				MOV	(R0)+,-(SP)	; SAVE NAME OF FIRST MODULE

     53	000014	011046 				MOV	(R0),-(SP)	; ...

     54	000016				3$:				;

     55	000016					CALL	PRFND		; PARSE-FIND FILE

     56	000022	012701 				MOV	(PC)+,R1	;ASSUME PARSE-FIND FAILURE

     57	000024	   000G	   000G			.BYTE	E$R57,S$V2	;FATAL-NO RETURN

SNGSG	MACRO M1110  22-AUG-78 01:59  PAGE 3-1





     58	000026	103477 				BCS	30$		;IF CS YES

     59	000030	016701 	000000G			MOV	$RTSEG,R1	;GET ADDRESS OF ROOT SEGMENT

     60	000034					CALL	$CVRL		; CONVERT TO REAL ADDRESS

     61	000040					CALL	$WRMPG		; WRITE MARK PAGE

     62	000044	016701 	000000G			MOV	$INIPT,R1	; GET INPUT FILE RECORD BLOCK

     63	000050	062700 	000000G			ADD	#S$GNME,R0	; POINT TO SEGMENT NAME

     64	000054	016120 	000110 			MOV	F.FNB+N.FNAM(R1),(R0)+ ; SET FIRST PART OF NAME

     65	000060	016110 	000112 			MOV	F.FNB+N.FNAM+2(R1),(R0) ; SET SECOND HALF OF NAME

     66	000064	005767 	000000G			TST	$LBMOD		; MODULE NAME LIST SPECIFIED?

     67	000070	001402 				BEQ	10$		; IF EQ NO

     68	000072	012610 				MOV	(SP)+,(R0)	; RESET SEGMENT NAME

     69	000074	012640 				MOV	(SP)+,-(R0)	; ...

     70	000076				10$:	CALL	$ALELD		;ALLOCATE AN ELEMENT DESCRIPTOR

     71	000102	032760 	000000G	000000G		BIT	#SW$DL,E$LSWT(R0) ; DEFAULT LIBRARY ELEMENT SPECIFIED?

     72	000110	001416 				BEQ	14$		; IF EQ NO

     73	000112	005767 	000000G			TST	$LIBNM		; ALREADY HAVE ONE?

     74	000116	001405 				BEQ	12$		; IF EQ NO

     75	000120	012702 	000000G			MOV	#$LNDES,R2	; GET ADDRESS OF COMMAND LINE BUFFER

     76	000124	012701 	000000C			MOV	#<S$V2*400!E$R1>,R1 ; GET ERROR/SEVERITY

     77	000130	000440 				BR	35$		;

     78	000132				12$:				;

     79	000132	010167 	000000G			MOV	R1,$LIBNM	; SET ADDRESS OF LIBRARY NAME BLOCK

     80	000136	016760 	000000G	000000G		MOV	$LBSWT,E$LSWT(R0) ; SET SWITCHES

     81	000144	000415 				BR	25$		;

     82	000146				14$:				;

     83	000146	016760 	000000G	000002G		MOV	$LBMOD,E$LIDT+2(R0) ; SET VIRTUAL ADDRESS OF MODULE NAME LIST

     84	000154	016700 	000000G			MOV	$RTSEG,R0	; GET ADDRESS OF ROOT SEGMENT

     85	000160	062700 	000000C			ADD	#<S$GELT/2>,R0	; POINT TO VIRTUAL ADDRESS OF LISTHEAD

     86	000164	012702 	000000G			MOV	#E$LNXT,R2	; SET LINK-NEXT OFFSET

     87	000170					CALL	$LNKVM		; LINK DESCRIPTOR TO LIST

     88	000174				20$:				;++031                                          ;**NEW**

     89	000174	016700 	000000G			MOV	$INIPT,R0	; GET INPUT FILE RECORD BLOCK

     90	000200				25$:				;

     91	000200	016760 	000000G	000000G		MOV	$DFINP,R$SWTH(R0) ; SET DEFAULT INPUT FILE SWITCHES

     92	000206					CALL	$NXTFL		;++031 GET NEXT INPUT FILE                      ;**NEW**

     93	000212	103412 				BCS	40$		;IF CS LOGICAL EOF                              ;**-1

     94	000214					CALL	PRFND		; PARSE-FIND FILE

     95	000220	103326 				BCC	10$		;IF CC OKAY

     96	000222	012701 				MOV	(PC)+,R1	;PARSE-FIND FAILURE

     97	000224	   000G	   000G			.BYTE	E$R57,S$V1	;DIAGNOSTIC

     98	000226	016002 	000000G		30$:	MOV	R$NAME(R0),R2	;GET ADDRESS OF NAME STRING

     99	000232				35$:				;

    100	000232					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    101	000236	000756 				BR	20$		;TRY FOR ANOTHER FILE

    102	000240				40$:	RETURN			;

    103

    104					;

    105					; ESTABLISH DEFAULT FOR LIBRARY FILE (IF REQUESTED), PARSE/FIND

    106					; THE FILE.

    107					;

    108

    109	000242				PRFND:				;

    110	000242	016700 	000000G			MOV	$INIPT,R0	; GET INPUT FILE RECORD BLOCK

    111	000246	016046 	000046 			MOV	F.DFNB(R0),-(SP) ; SAVE DEFAULT NAMEBLOCK

    112	000252	032760 	000000G	000000G		BIT	#SW$LB,R$SWTH(R0) ; LIBRARY FILE?

    113	000260	001403 				BEQ	10$		; IF EQ NO

    114	000262	012760 	000000G	000046 		MOV	#$LIBNB,F.DFNB(R0) ; REPLACE NAMEBLOCK POINTER

SNGSG	MACRO M1110  22-AUG-78 01:59  PAGE 3-2





    115	000270				10$:				;

    116	000270					CALL	$PRFND		; PARSE-FIND THE FILE

    117	000274	012660 	000046 			MOV	(SP)+,F.DFNB(R0) ; REPLACE NAMEBLOCK

    118	000300					RETURN			;

    119

    120

    121		000001 				.END

SNGSG	MACRO M1110  22-AUG-78 01:59  PAGE 3-3

SYMBOL TABLE



B.BBFS= 000010   	FD.MNT= 100000   	F.BKVB= 000064   	F.UNIT= 000136   	SW$LB = ****** GX

B.BFST= 000015   	FD.OSP= 004000   	F.CHR = 000075   	F.URBD= 000020   	S$GELT= ****** GX

B.NXBD= 000012   	FD.PLC= 000004   	F.CNTG= 000034   	F.VBN = 000064   	S$GNME= ****** GX

B.VBN = 000004   	FD.PRN= 000004   	F.DFNB= 000046   	F.VBSZ= 000060   	S$V1  = ****** GX

CH.AND= 000001   	FD.PSE= 010000   	F.DSPT= 000044   	HT    = 000011   	S$V2  = ****** GX

CR    = 000015   	FD.RAH= 000001   	F.DVNM= 000134   	LF    = 000012   	S.BFHD= 000020

E$LIDT= ****** GX	FD.RAN= 000002   	F.EFBK= 000010   	NB.DEV= 000200   	S.FATT= 000016

E$LNXT= ****** GX	FD.REC= 000001   	F.EFN = 000050   	NB.DIR= 000100   	S.FDB = 000140

E$LSWT= ****** GX	FD.RWM= 000001   	F.EOBB= 000032   	NB.NAM= 000004   	S.FNAM= 000006

E$R1  = ****** GX	FD.SDI= 000020   	F.ERR = 000052   	NB.SD1= 000400   	S.FNB = 000036

E$R57 = ****** GX	FD.SQD= 000040   	F.FACC= 000043   	NB.SD2= 001000   	S.FNBW= 000017

FA.APD= 000100   	FD.TTY= 000004   	F.FFBY= 000014   	NB.SNM= 000040   	S.FNTY= 000004

FA.CRE= 000010   	FD.WBH= 000002   	F.FNAM= 000110   	NB.STP= 000020   	S.FTYP= 000002

FA.DLK= 001000   	FF    = 000014   	F.FNB = 000102   	NB.SVR= 000010   	S.NFEN= 000020

FA.ENB= 100000   	FF.CHR= 000005   	F.FTYP= 000116   	NB.TYP= 000002   	VT    = 000013

FA.EXC= 002000   	FF.NV = 000003   	F.FVER= 000120   	NB.VER= 000001   	$ALELD= ****** GX

FA.EXT= 000004   	FF.POE= 000002   	F.HIBK= 000004   	N.DID = 000024   	$CVRL = ****** GX

FA.NSP= 000100   	FF.RWD= 000001   	F.LUN = 000042   	N.DVNM= 000032   	$DFINP= ****** GX

FA.POS= 010000   	FF.RWF= 000006   	F.MBCT= 000054   	N.FID = 000000   	$ERMSG= ****** GX

FA.RD = 000001   	FF.SPC= 000004   	F.MBC1= 000055   	N.FNAM= 000006   	$INIPT= ****** GX

FA.RWD= 004000   	FO.APD= 000106   	F.MBFG= 000056   	N.FTYP= 000014   	$LBMOD= ****** GX

FA.SEQ= 040000   	FO.MFY= 000002   	F.NRBD= 000024   	N.FVER= 000016   	$LBSWT= ****** GX

FA.SHR= 000040   	FO.RD = 000001   	F.NREC= 000030   	N.NEXT= 000022   	$LIBNB= ****** GX

FA.TMP= 000020   	FO.UPD= 000006   	F.OVBS= 000030   	N.STAT= 000020   	$LIBNM= ****** GX

FA.WCK= 020000   	FO.WRT= 000016   	F.RACC= 000016   	N.UNIT= 000034   	$LNDES= ****** GX

FA.WRT= 000002   	F.ACTL= 000076   	F.RATT= 000001   	PRFND   000242R  	$LNKVM= ****** GX

FD.BLK= 000010   	F.ALOC= 000040   	F.RCNM= 000034   	R$NAME= ****** GX	$NXTFL= ****** GX

FD.CCL= 000002   	F.BBFS= 000062   	F.RCTL= 000017   	R$SWTH= ****** GX	$PRFND= ****** GX

FD.COM= 020000   	F.BDB = 000070   	F.RSIZ= 000002   	R$$11M= 000000   	$RTSEG= ****** GX

FD.CR = 000002   	F.BGBC= 000057   	F.RTYP= 000000   	R.FIX = 000001   	$SNGSG  000000RG

FD.DIR= 000010   	F.BKDN= 000026   	F.SEQN= 000100   	R.SEQ = 000003   	$WRMPG= ****** GX

FD.FTN= 000001   	F.BKDS= 000020   	F.SPDV= 000072   	R.VAR = 000002   	$$    = 000001

FD.F11= 040000   	F.BKEF= 000050   	F.SPUN= 000074   	SPA   = 000040   	...GBL= 000000

FD.INS= 000010   	F.BKP1= 000051   	F.STBK= 000036   	SW$DL = ****** GX	...TPC= 000140

FD.ISP= 002000   	F.BKST= 000024



. ABS.	000000	   000

      	000302	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2339 WORDS  ( 10 PAGES)

DYNAMIC MEMORY:  3828 WORDS  ( 14 PAGES)

ELAPSED TIME:  00:00:14

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

