

; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 1

; Digital Equipment Corporation

;

;00100  0001	MODULE LNK_SYMTBLOUT (	! LINKER GLOBAL SYMBOL OUTPUT ROUTINES

;00200  0002			IDENT = 'X01.09'

;00300  0003			) =

;00400  0004	BEGIN

;00500  0005	

;00600  0006	!

;00700  0007	! COPYRIGHT (C) 1977, 1978

;00800  0008	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;00900  0009	!

;01000  0010	! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

;01100  0011	! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

;01200  0012	! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

;01300  0013	! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

;01400  0014	! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

;01500  0015	! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

;01600  0016	! REMAIN IN DEC.

;01700  0017	!

;01800  0018	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

;01900  0019	! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

;02000  0020	! CORPORATION.

;02100  0021	!

;02200  0022	! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

;02300  0023	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

;02400  0024	!

;02500  0025	

;02600  0026	!++

;02700  0027	! FACILITY:	LINKER

;02800  0028	!

;02900  0029	! ABSTRACT:	THIS MODULE CONTAINS ALL LOGIC TO OUTPUT THE GLOBAL

;03000  0030	!		SYMBOLS OF THE LINK TO SYMBOL TABLE FILE AND/OR IMAGE FILE

;03100  0031	!

;03200  0032	!

;03300  0033	! ENVIRONMENT:	VMS NATIVE MODE

;03400  0034	!

;03500  0035	! AUTHOR:	T.J. PORTER, CREATION DATE: 14-JUL-77

;03600  0036	!

;03700  0037	! MODIFICATIONS:

;03800  0038	! NO.	DATE		PROGRAMMER	PURPOSE

;03900  0039	! ---	----		----------	-------

;04000  0040	! 001	11-OCT-77	T.J. PORTER	CHANGE IMAGE HEADER FORMAT

;04100  0041	! 002	21-OCT-77	T.J. PORTER	CORRECT ACCESS VIOLATION ON NO IMAGE AND

;04200  0042	!						MAXIMIZE ERROR CODE ON FAILURES

;04300  0043	! 003	10-JAN-78	T.J. PORTER	SET ALLOCATION AND DEFAULT EXTEND 

;04400  0044	!						FOR PUTS TO STB FILE

;04500  0045	!						AND ADD TRACEBACK

;04600  0046	! 004	09-MAR-78	T.J. PORTER	CORRECT > BUG IN NAMED DIRECTORIES

;04650  0047	! 005	21-APR-78	T.J. PORTER	REQUIRE FILE CLEAN UP

;04675  0048	! 006	25-APR-78	T.J. PORTER	NO GLOBALS IN IMAGE IF JUST TRACE BACK AND

;04680  0049	!						LEAVE IMAGE FILE OPEN UNLESS ERROR

;04690  0050	! 007	09-MAY-78	T.J. PORTER	RE-DEFINITION OF SYMBOLS

;04695  0051	! 008	10-MAY-78	T.J. PORTER	SET FLAG SHRIMG IN SYMBOL TABLE OR SHAREABLE IMAGE

;04697  0052	!						AND OMIT SUCH SYMBOLS FROM OUTPUT

;04698  0053	! 009	28-JUL-78	T.J. PORTER	PUT $OWN$ P-SECTION BACK

;04700  0054	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2

; Digital Equipment Corporation

;

;04800  0055	     

;04900  0056	!

;05000  0057	! TABLE OF CONTENTS:

;05100  0058	!

;05200  0059	

;05300  0060	FORWARD ROUTINE

;05400  0061		EOMRECOUT,					! OUTPUT END OF MODULE

;05500  0062		HDRECSOUT,					! OUTPUT HEADER RECORDS

;05600  0063		PSECTRECOUT,					! OUTPUT P-SECT RECORDS

;05700  0064		SYMRECOUT,					! OUTPUT SYMBOL RECORDS

;05800  0065		LNK$CLOSYMOUT : NOVALUE,			! CLOSE SYMBOL TABLES

;05900  0066		OUTPUTREC;					! WRITE THE RECORDS

;06000  0067	

;06100  0068	!

;06200  0069	! INCLUDE FILES:

;06300  0070	!

;06400  0071	LIBRARY

;06500  0072		'SYS$LIBRARY:LIB.L32';				! SYSTEM STRUCTURES

;06800  0073	REQUIRE

;06900  0074		'PREFIX';			! USEFUL MACROS ETC.

;07000  0266	REQUIRE

;07100  0267		'DATBAS';			! DATA BASE DEFINITIONS

;07200  0499	REQUIRE

;07300  0500		'OBJFMT';			! OBJECT LANGUAGE FORMATS

;07600  0790	REQUIRE

;07700  0791		'SYMFMT';			! SYMBOL TABLE FORMAT

;07800  0876	!

;07900  0877	! MACROS:

;08000  0878	!

;08100  0879	

;08200  0880	!

;08300  0881	! EQUATED SYMBOLS:

;08400  0882	!

;08500  0883	

;08600  0884	!

;08700  0885	! EXTERNAL REFERENCES:

;08800  0886	!

;08900  0887	EXTERNAL LITERAL

;09000  0888		ERM$C_CLOSERR : BYTLIT,				! CLOSE FAILURE

;09100  0889		ERM$C_CRE8ERR : BYTLIT,				! CREATE FAILURE

;09200  0890		ERM$C_FAOBUG : BYTLIT,				! FAO FAILURE

;09300  0891		ERM$C_OPIDERR : BYTLIT,				! OPEN FAILURE

;09400  0892		ERM$C_UNMCOD : BYTLIT,				! USER'S NAME

;09500  0893		ERM$C_WRTERR : BYTLIT,				! WRITE FAILURE

;09600  0894		LNK$C_OBJMBC : SHORT,				! MULTI-BLOCK COUNT

;09700  0895		LNK$M_DBG : BYTLIT,				! DEBUGGER LINKED

;09900  0896		LNK$M_IMAGE : SHORT,				! IMAGE EXISTS

;10000  0897		LNK$M_SYMTBL : WORDLIT,				! SYMBOL TABLE FILE

;10010  0898		LNK$S_PICIMG : SHORT,				! IMAGE IS PIC

;10100  0899		OBJ$C_MAXRECSIZ : WORDLIT,			! MAXIMUM RECORD

;10200  0900		OBJ$C_STRLVL : SHORT,				! LANGUAGE STRUCTURE LEVEL

;10300  0901		OBJ$B_RECTYP : SHORT,				! OFFSET TO RECORD TYPE

;10400  0902		OBJ$B_SUBTYP : SHORT,				! OFFSET TO RECORD SUBTYPE

;10500  0903		OBJ$B_EOM_LNGCD : SHORT,			! OFFSET TO  COMPLETION CODE

;10600  0904		OBJ$T_PSC_NAME : SHORT,				! OFFSET TO  P-SECT NAME



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-1

; Digital Equipment Corporation

;

;10700  0905		OBJ$T_SDF_NAME : SHORT,				! OFFSET TO  SYMBOL NAME

;10800  0906		OBJ$C_HDR : SHORT,				! HEADER TYPE CODE

;10900  0907		OBJ$C_HDR_MHD : SHORT,				! MAIN MODULE HEADER

;11000  0908		OBJ$C_HDR_LNM : SHORT,				! CREATOR NAME RECORD

;11100  0909		OBJ$C_GSD : SHORT,				! GSD TYPE CODE

;11200  0910		OBJ$C_GSD_PSC : SHORT,				! P-SECTION DEF.

;11300  0911		OBJ$C_GSD_SYM : SHORT,				! SYMBOL DEF.

;11400  0912		OBJ$C_GSD_EPM : SHORT,				! ENTRY POINT DEF.

;11500  0913		OBJ$C_EOM : SHORT,				! END OF MODULE RECORD TYPE

;11600  0914		SEV$C_INFOR : SHORT,				! INFORMATION MESSAGE

;11700  0915		SEV$C_DIAG : SHORT;				! DIAGNOSTIC MESSAGE

;11800  0916	!

;11900  0917	EXTERNAL

;12000  0918		LNK$AL_IMGRAB : BLOCK[,BYTE],			! OPEN IMAGE FILE RAB

;12100  0919		LNK$AL_RAB : BLOCK[,BYTE],			! OBJECT RAB

;12200  0920		LNK$GB_MAXERCOD : BYTE,				! MAXIMUM ERROR CODE

;12300  0921		LNK$GB_PASS : BYTE,				! PASS NUMBER

;12400  0922		LNK$GL_CTLMSK,					! CONTROL MASK

;12500  0923		LNK$GL_IMGFIL : REF BLOCK[,BYTE],		! IMAGE FILE D.B.

;12700  0924		LNK$GL_SYMFIL : REF BLOCK[,BYTE],		! SYMBOL TABLE FILE

;12800  0925		LNK$GW_IMGIFI : WORD,				! IMAGE FILE IFI

;12850  0926		LNK$GL_MAPLST,					! LISTHEAD FOR USEFUL P-SECTIONS

;12860  0927		LNK$GL_MINVA,					! LOWEST VIRTUAL ADDRESS ALLOCATED

;12900  0928		LNK$GW_NSYMBOLS : WORD,				! NUMBER OF GLOBAL SYMBOLS

;13000  0929		LNK$GQ_STARTIM,					! START TIME/DATE

;13200  0930		LNK$AW_VERSION : BLOCK[,BYTE];			! LINKER VERSION

;13300  0931	EXTERNAL ROUTINE

;13400  0932		LNK$CLOSIMGFIL,					! CLOSES IMAGE FILE

;13600  0933		LNK$ERRMSG;					! ERROR MESSAGE OUTPUT

;14000  0934	!

;14100  0935	! MODULE OWN STORAGE:

;14200  0936	!

;14300  0937	GLOBAL

;14400  0938		LNK$GW_GSTRECS: WORD,				! COUNT OF RECORDS WRITTEN TO IMAGE GST

;14450  0939		LNK$GW_SYMRECS: WORD;				! COUNT OF RECORDS WRITTEN STB FILE

;14500  0940	OWN

;14600  0941		STBAUXFNB : REF BLOCK [,BYTE],			! POINTER TO AUX. FNB. OF SYMBOL TABLE FILE

;14700  0942		STBRAB : $RAB(RAC=SEQ,MBC=LNK$C_OBJMBC),	! RECORD ACCESS BLOCK OF SYMBOL TABLE FILE

;14800  0943		STBFILEIFI,					! INTERNAL FILE ID OF SYMBOL TABLE FILE

;14833  0944		SYMASK : WORD INITIAL(SYM$M_SUPRES),

;14866  0945		SYMATCH,

;14900  0946		IMGAUXFNB : REF BLOCK[,BYTE],			! POINTER TO AUX, FNB, OF OPEN IMAGE FILE

;15000  0947		GSDRECLNG : WORD,				! LENGTH OF CURRENT GSD RECORD

;15100  0948		CURPSECTNUM : BYTE,				! NUMBER OF CURRENT P-SECTION

;15200  0949		OBJRECORD : REF VECTOR [,BYTE];			! POINTER TO OBJECT RECORD

;15300  0950	!

;15400  0951	PSECT OWN = $LNK_RO_DATA$ (NOWRITE);			! DEFINE READ ONLY OWN STORAGE

;15500  0952	OWN ABSPSECT : BLOCK[PSC$C_SIZE,BYTE]			! FOR THE GENERATED ABSOLUTE P-SECTION

;15600  0953			INITIAL (0,0,0,0,0,0,

;15700  0954				 BYTE (0),

;15800  0955			WORD ( PSC$M_PIC OR			! IT IS POSITION INDEPENDENT

;15900  0956				PSC$M_RD OR			! READABLE

;16000  0957				PSC$M_LIB),			! AND A "LIBRARY" P-SECTION

;16100  0958			COUNTEDSTRING('.$$ABS$$.'));		! NAMED ".$$ABS$$."

;16200  0959	!



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-2

; Digital Equipment Corporation

;

;16210  0960	PSECT	OWN = $OWN$;

;16220  0961	!

;16300  0962	GLOBAL ROUTINE LNK$SYMTBLOUT : NOVALUE =

;16400  0963	BEGIN

;16500  0964	!++

;16600  0965	! FUNCTIONAL DESCRIPTION:

;16700  0966	!

;16800  0967	!	THIS ROUTINE OUTPUTS THE GLOBAL SYMBOLS OF THE LINK.

;16900  0968	!	THERE ARE THREE REASONS FOR GLOBAL SYMBOL OUTPUT:

;17000  0969	

;17100  0970	!	1.  THE DEBUGGER HAS BEEN LINKED INTO AN EXECUTABLE 

;17200  0971	!	    IMAGE.

;17300  0972	

;17400  0973	!	2.  THE IMAGE IS A SHAREABLE IMAGE.

;17500  0974	

;17600  0975	!	3.  A SEPARATE OUTPUT FILE OF GLOBAL SYMBOLS WAS

;17700  0976	!	    REQUESTED BY THE LINK COMMAND.

;17800  0977	

;17900  0978	!	1 AND 2 ARE MUTUALLY EXCLUSIVE, WHEREAS THE THIRD

;18000  0979	!	MAY ACCOMPANY EITHER. IN CASES 1 AND 2 THE GLOBAL SYMBOLS

;18100  0980	!	ARE OUTPUT TO THE END OF THE IMAGE FILE. IN ALL CASES,

;18200  0981	!	THE SYMBOL TABLE OUTPUT CONFORMS TO THE OBJECT LANGUAGE

;18300  0982	!	FORMAT. I.E. VARIABLE LENGTH RECORDS.

;18400  0983	!	THERE IS SOME FILTERING OF SYMBOLS AND P-SECTIONS

;18500  0984	!	ARE OUTPUT:

;18600  0985	

;18700  0986	!	1.  NO WEAKLY DEFINED SYMBOLS 

;18800  0987	

;18900  0988	!	2.  SYMBOLS FROM THE DEBUGGER ITSELF AND FROM SYSTEM

;19000  0989	!	    LIBRARIES ARE SUPPRESSED IN ACCORDANCE WITH

;19100  0990	!	    THE LINK COMMAND GIVEN.

;19200  0991	!

;19300  0992	! FORMAL PARAMETERS:

;19400  0993	!

;19500  0994	!	NONE

;19600  0995	!

;19700  0996	! IMPLICIT INPUTS:

;19800  0997	!

;19900  0998	!	THE IMAGE FILE IS OPEN AND DESCRIPTORS OF IMAGE FILE

;20000  0999	!	AND SYMBOL TABLE FILE ARE IN DYNAMIC MEMORY.

;20100  1000	!

;20200  1001	! IMPLICIT OUTPUTS:

;20300  1002	!

;20400  1003	!	SYMBOLS AND P-SECTIONS (AS REQUIRED) ARE WRITTEN TO

;20500  1004	!	THE (APPROPRIATE) FILE(S) AND IF TO AN IMAGE,

;20600  1005	!	THE IMAGE HEADER IS UPDATED WITH A POINTER TO

;20700  1006	!	THE SYMBOL TABLE PATITION OF THE FILE.

;20800  1007	!

;20900  1008	! ROUTINE VALUE:

;21000  1009	!

;21100  1010	! COMPLETION CODES:

;21200  1011	!

;21300  1012	!	NONE

;21400  1013	!

;21500  1014	! SIDE EFFECTS:



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-3

; Digital Equipment Corporation

;

;21600  1015	!

;21700  1016	!	NONE

;21800  1017	!

;21900  1018	!--

;22000  1019	LOCAL

;22100  1020		FABLOCK : BLOCK[FAB$C_BLN,BYTE],			! FILE ACCESS BLOCK

;22200  1021		RMSERROR,						! RMS ERROR CODE RETURNED

;22300  1022		PSECTDESC : REF BLOCK[,BYTE],				! POINTER TO P-SECT DESCRIPTOR

;22400  1023		SYMDESC : REF BLOCK[,BYTE],				! POINTER TO SYMBOL DESCRIPTOR

;22500  1024		PSECTMASK;						! P-SECTION MASK/INDICATOR

;22600  1025	!

;22700  1026	IF (.LNK$GL_CTLMSK AND (LNK$M_SHR OR LNK$M_DBG OR		! IF A SHAREABLE IMAGE

;22800  1027				LNK$M_SYMTBL))EQL 0			! OR DEBUGGER WITH EXECUTABLE IMAGE

;22900  1028	THEN RETURN;							! OR A SYMBOL TABLE FILE WAS REQUESTED

;23000  1029	OBJRECORD = .LNK$AL_RAB[RAB$L_UBF];				! INITIALIZE OUTPUT BUFFER TO BE THE

;23100  1030									! ONE USED FOR INPUT RECORDS CROSSING BLOCKS

;23200  1031	CH$FILL(0,FAB$C_BLN,FABLOCK);					! CREATE THE FILE AS A 

;23300  1032	FABLOCK[FAB$B_BLN] = FAB$C_BLN;					! VARIABLE LENGTH SEQUENTIAL

;23400  1033	FABLOCK[FAB$B_BID] = FAB$C_BID;					! FILE WITH VARIABLE LENGTH

;23500  1034	FABLOCK[FAB$V_PUT] = TRUE;					! RECORDS (UP TO AN OBJECT

;23600  1035	FABLOCK[FAB$B_RFM] = FAB$C_VAR;					! LANGUAGE SPECIFIED MAXIMUM

;23700  1036	FABLOCK[FAB$W_MRS] = OBJ$C_MAXRECSIZ;				! SIZE).

;23800  1037	FABLOCK[FAB$V_NIL] = TRUE;					! SINGLE ACCESS

;23900  1038	IF (.LNK$GL_CTLMSK AND LNK$M_SYMTBL) NEQ 0				! 

;24000  1039	THEN BEGIN								! IF A SYMBOL TABLE, BUILD

;24100  1040		STBAUXFNB = LNK$GL_SYMFIL[FDB$AL_AUXFNB];			! A FILE ACCESS BLOCK TO

;24200  1041		FABLOCK[FAB$L_FNA] = .(LNK$GL_SYMFIL[FDB$Q_USRNAMDSC]+4);	! WITH USER SPECIFIED OR

;24300  1042		FABLOCK[FAB$B_FNS] = .LNK$GL_SYMFIL[FDB$Q_USRNAMDSC];		! COMMAND LANGUAGE DEFAULTED

;24400  1043		FABLOCK[FAB$B_DNS] = %CHARCOUNT('.STB');			! NAME AND DEFAULT FILE

;24500  1044		FABLOCK[FAB$L_DNA] = UPLIT (BYTE('.STB'));			! TYPE OF .STB

;24600  1045		FABLOCK[FAB$L_NAM] = .STBAUXFNB;				!

;24700  1046		FABLOCK[FAB$L_ALQ] = .LNK$GW_NSYMBOLS/20;			! SET INITIAL ALLOCATION

;24800  1047		STBRAB[RAB$L_FAB] = FABLOCK;					!

;24900  1048		IF NOT (RMSERROR = $CREATE(FAB=FABLOCK))			! GO CREATE AND CONNECT

;25000  1049		OR NOT (RMSERROR = $CONNECT(RAB=STBRAB))			! RECORD STREAM AND

;25100  1050		THEN BEGIN							! IF ANY FAILURE REPORT

;25200  1051			LNK$ERRMSG(ERM$C_CRE8ERR,SEV$C_DIAG,			! IT WITH THE NAME AS

;25300  1052				  .STBAUXFNB[NAM$B_ESL],.STBAUXFNB[NAM$L_ESA]);	! FAR AS RMS WENT

;25400  1053			LNK$ERRMSG(ERM$C_UNMCOD,SEV$C_INFOR,			! THEN WITH USER'S NAME

;25500  1054				LNK$GL_SYMFIL[FDB$Q_USRNAMDSC],.RMSERROR);	! AND RMS ERROR CODE

;25510  1055			LNK$ERRMSG(.RMSERROR AND NOT 7,SEV$C_INFOR,

;25520  1056				.FABLOCK[FAB$L_STV]);

;25600  1057			LNK$GB_MAXERCOD<7,1,0> = TRUE;				! FLAG BAD OUTPUT FILE

;25700  1058			IF (.LNK$GL_CTLMSK AND (LNK$M_SHR OR LNK$M_DBG OR	! THEN IF THERE IS

;25800  1059					LNK$M_IMAGE)) EQL 0			! NOTHING ELSE TO DO

;25900  1060			THEN RETURN;						! EXIT NOW.

;26000  1061		     END

;26100  1062		ELSE BEGIN

;26200  1063			STBFILEIFI = .FABLOCK[FAB$W_IFI];			! SAVE IFI IF CREATED OK

;26300  1064			STBRAB[RAB$L_RBF] = .OBJRECORD;				! SET RECORD BUFFER ADDRESS

;26400  1065		     END;

;26500  1066	     END;

;26600  1067	!

;26700  1068	! IF A SHAREABLE IMAGE OR A DEBUGGER HAS BEEN LINKED IN, AND THE 

;26800  1069	! IMAGE FILE EXISTS (I.E. IT IS STILL OPEN), CHANGE ITS ATTRIBUTES



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-4

; Digital Equipment Corporation

;

;26900  1070	! SO THAT VARIABLE LENGTH RECORDS MAY BE WRITTEN TO THE END OF

;27000  1071	! IT.

;27100  1072	!

;27200  1073	IF (.LNK$GL_CTLMSK AND (LNK$M_SHR OR LNK$M_DBG)) NEQ 0			! SHAREABLE OR DEBUGGABLE

;27300  1074	AND (.LNK$GL_CTLMSK AND LNK$M_IMAGE) NEQ 0				! IMAGE WHICH HAS BEEN

;27400  1075	THEN BEGIN								! CREATED SUCCESSFULLY

;27500  1076		IMGAUXFNB = LNK$GL_IMGFIL[FDB$AL_AUXFNB];			! (AND IS STILL OPEN). JAM

;27600  1077		FABLOCK[FAB$W_IFI] = .LNK$GW_IMGIFI;				! IFI, SET FOR BOTH BLOCK

;27700  1078		FABLOCK[FAB$V_BRO] = TRUE;					! AND RECORD I/O

;27800  1079		FABLOCK[FAB$V_ESC] = TRUE;					! AND FOR VARIABLE

;27900  1080		FABLOCK[FAB$L_CTX] = RME$C_SETRFM;				! LENGTH RECORDS

;28000  1081		LNK$AL_IMGRAB[RAB$L_FAB] = FABLOCK;				! SET FAB POINTER IN RAB

;28100  1082		LNK$AL_IMGRAB[RAB$L_ROP] = .LNK$AL_IMGRAB[RAB$L_ROP] OR RAB$M_EOF;	! AND END OF FILE OPTION

;28200  1083		IF NOT (RMSERROR = $MODIFY(FAB = FABLOCK))			! AND TELL RMS ABOUT IT

;28300  1084		OR NOT (RMSERROR = $CONNECT(RAB=LNK$AL_IMGRAB))

;28400  1085		THEN BEGIN

;28500  1086			LNK$ERRMSG(ERM$C_OPIDERR,SEV$C_DIAG,.LNK$GB_PASS,	! OUTPUT ANY ERROR

;28600  1087				.IMGAUXFNB[NAM$B_RSL],.IMGAUXFNB[NAM$L_RSA]);	! AS DIAGNOSTIC -

;28700  1088			LNK$ERRMSG(ERM$C_UNMCOD,SEV$C_INFOR,			! WITH USER'S FILE NAME

;28800  1089				LNK$GL_IMGFIL[FDB$Q_USRNAMDSC],.RMSERROR);	! TOO

;28900  1090			LNK$CLOSYMOUT(.IMGAUXFNB,.RMSERROR);			! THEN CLOSE THE FILE

;29000  1091			LNK$GB_MAXERCOD<7,1,0> = TRUE;				! FLAG BAD OUTPUT FILE

;29100  1092			IF .STBFILEIFI EQL 0					! IF NO OTHER SYMBOL

;29200  1093			THEN RETURN;						! TABLE FILE, EXIT

;29300  1094		     END							! HERE NOW

;29400  1095		ELSE BEGIN

;29500  1096			LNK$AL_IMGRAB[RAB$B_MBC] = LNK$C_OBJMBC;		! SET MULTI-BLOCK COUNT

;29600  1097			LNK$AL_IMGRAB[RAB$L_RBF] = .OBJRECORD;			! SET RECORD BUFFER ADDRESS

;29700  1098		     END;

;29800  1099	     END

;29900  1100	ELSE IF .STBFILEIFI EQL 0 THEN RETURN;					! GIVE UP IF NOTHING TO DO

;30000  1101	!									! ADDRESS (USING OBJ INPUT BUFFER)

;30100  1102	IF NOT HDRECSOUT()							! OUTPUT HEADER RECORDS

;30200  1103	THEN RETURN;								! AND GIVE UP ON FAILURE

;30300  1104	!

;30400  1105	IF NOT PSECTRECOUT(ABSPSECT)						! OUTPUT THE ABSOLUTE P-SECTION

;30500  1106	THEN RETURN;								! GIVING UP ON FAILURE

;30600  1107	!

;30700  1108	! THE SYMBOLS IN THE SYMBOL TABLE ARE ALL LINKED ON A (SINGLY THREADED) LIST FROM

;30800  1109	! THE PROGRAM SECTIONS WITHIN WHICH THE SYMBOLS WERE DEFINED. THEREFORE TO FIND

;30900  1110	! ALL SYMBOLS, WE SCAN DOWN THE LINKED LIST OF P-SECTION DESCRIPTORS, THEN DOWN

;31000  1111	! THE LIST OF SYMBOLS STRUNG OFF EACH P-SECTION DESCRIPTOR.

;31100  1112	!

;31110  1113	PSECTDESC = LNK$GL_MAPLST;					! START AT TOP OF P-SECTION LIST

;31120  1114	IF NOT .LNK$GL_CTLMSK<LNK$S_SHR,1,0>

;31130  1115	THEN SYMASK = .SYMASK OR SYM$M_WEAK				! IF NOT SHAREABLE, EXCLUDE WEAK SYMBOLS

;31132  1116	ELSE BEGIN

;31135  1117		SYMATCH = SYM$M_UNI;					! IF SHAREABLE, SYMBOLS MUST BE UNIVERSAL

;31137  1118		SYMASK = .SYMASK OR SYM$M_UNI;

;31139  1119	    END;

;31140  1120	WHILE (PSECTDESC = .PSECTDESC[PSC$L_NXTPSC]) NEQ 0			! PROCEED DOWN THE LIST

;31150  1121	DO BEGIN

;31160  1122		IF .LNK$GL_CTLMSK<LNK$S_SHR,1,0>				! IF SHAREABLE

;31170  1123		AND (.PSECTDESC[PSC$W_FLAGS] AND (PSC$M_REL OR PSC$M_GBL OR	! AND THIS P-SECTION IS RELOCATABLE,

;31180  1124			PSC$M_OVR)) EQL (PSC$M_REL OR PSC$M_GBL OR		! GLOBAL AND OVERLAYED



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-5

; Digital Equipment Corporation

;

;31190  1125						PSC$M_OVR)

;31200  1126		THEN BEGIN

;31210  1127			CURPSECTNUM = .CURPSECTNUM + 1;				! INCREMENT P-SECTION NUMBER

;31220  1128			IF .LNK$GL_CTLMSK<LNK$S_PICIMG,1,0>			! IF A PIC IMAGE

;31230  1129			THEN PSECTDESC[PSC$L_LENGTH] = .PSECTDESC[PSC$L_BASE] -	! THEN RECORD RELATIVE ADDRESS

;31240  1130						.LNK$GL_MINVA			! AS P-SECTION LENGTH

;31250  1131			ELSE PSECTDESC[PSC$L_LENGTH] = .PSECTDESC[PSC$L_BASE];	! OTHERWISE ACTUAL ADDRESS

;31260  1132			IF NOT PSECTRECOUT(.PSECTDESC)				! AND OUTPUT THE P-SECTION

;31270  1133			THEN RETURN;						! RETURNING ON ERROR

;31280  1134		     END;

;31290  1135		IF (SYMDESC = .PSECTDESC[PSC$L_SYMLST]) NEQ 0			! IF THERE ARE SYMBOLS

;31300  1136		THEN DO IF (.SYMDESC[SYM$W_FLAGS] AND .SYMASK) EQL .SYMATCH	! THAT QUALIFY FOR OUTPUT

;31310  1137			THEN BEGIN

;33310  1138				IF (.SYMDESC[SYM$W_FLAGS] AND SYM$M_REDEF) NEQ 0	! IF FLAGGED FOR RE-DEFINITION

;33320  1139				THEN SYMDESC[SYM$L_VALUE] = .SYMDESC[SYM$L_NEWVAL];	! THEN RE-DEFINE VALUE

;33330  1140				IF .LNK$GL_CTLMSK<LNK$S_PICIMG,1,0>			! IF A PIC IMAGE

;33340  1141				AND .LNK$GL_CTLMSK<LNK$S_SHR,1,0>			! AND A SHAREABLE IMAGE

;33341  1142				AND (.SYMDESC[SYM$W_FLAGS] AND SYM$M_REL) NEQ 0		! AND SYMBOL IS RELOCATABLE

;33343  1143				THEN SYMDESC[SYM$L_VALUE] = .SYMDESC[SYM$L_VALUE] -	! MAKE IT IMAGE

;33346  1144							.LNK$GL_MINVA			! RELATIVE

;33350  1145				ELSE SYMDESC[SYM$W_FLAGS] = .SYMDESC[SYM$W_FLAGS] AND 	! THEN SYMBOL IS ABSOLUTE

;33360  1146						NOT SYM$M_REL;

;33700  1147				IF NOT SYMRECOUT(.SYMDESC)			! 

;33800  1148				THEN RETURN;					! OUTPUT A RECORD. GIVE UP

;33810  1149			     END

;33900  1150			UNTIL ( SYMDESC = .SYMDESC[SYM$L_PSCLST]) EQL 0		! ON FAILURE. OTHERWISE CONTINUE

;34100  1151	   END;									! GO TO NEXT P-SECTION WHEN DONE

;34200  1152	!

;34300  1153	! ALL SYMBOLS AND P-SECTIONS ARE PROCESSED. WRITE AN

;34400  1154	! END OF MODULE RECORD THEN CLOSE THE FILE(S).

;34500  1155	!

;34600  1156	IF NOT EOMRECOUT()							! GIVE UP ON EOM RECORD

;34700  1157	THEN RETURN;								! OUTPUT ERROR

;35400  1158	LNK$CLOSYMOUT(0);							! AND CLOSE FILE(S)

;35500  1159	RETURN;

;35600  1160	END;									! AND ALL DONE





							    .TITLE  LNK_SYMTBLOUT

							    .IDENT  \X01.09\



							    .PSECT  $LNK_RO_DATA$,NOWRT,NOEXE,2



					      00000 ABSPSECT:

							    .LONG   0, 0, 0, 0, 0, 0					      ;

					      00018 	    .BYTE   0							      ;

					      00019 	    .WORD   131							      ;

					      0001B 	    .BYTE   9							      ;

					      0001C 	    .ASCII  \.$$ABS$$.\						      ;

					      00025	    .BLKB   6



							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .ASCII  \.STB\						      ;





; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-6

; Digital Equipment Corporation

;

							    .PSECT  $OWN$,NOEXE,2



					      00000 STBAUXFNB:

							    .BLKB   4

					      00004 STBRAB: .BYTE   1							      ;

					      00005 	    .BYTE   68							      ;

					      00006 	    .WORD   0							      ;

					      00008 	    .LONG   0							      ;

					      0000C 	    .LONG   0							      ;

					      00010 	    .LONG   0							      ;

					      00014 	    .WORD   0, 0, 0						      ;

					      0001A 	    .WORD   0							      ;

					      0001C 	    .LONG   0							      ;

					      00020 	    .WORD   0							      ;

					      00022 	    .BYTE   0							      ;

					      00023 	    .BYTE   0							      ;

					      00024 	    .WORD   0							      ;

					      00026 	    .WORD   0							      ;

					      00028 	    .LONG   0							      ;

					      0002C 	    .LONG   0							      ;

					      00030 	    .LONG   0							      ;

					      00034 	    .LONG   0							      ;

					      00038 	    .BYTE   0							      ;

					      00039 	    .BYTE   0							      ;

					      0003A 	    .BYTE   0							      ;

					      0003B 	    .BYTE    LNK$C_OBJMBC					      ;

					      0003C 	    .LONG   0							      ;

					      00040 	    .LONG   0							      ;

					      00044 	    .LONG   0							      ;

					      00048 STBFILEIFI:

							    .BLKB   4

					      0004C SYMASK: .WORD   8192						      ;

					      0004E	    .BLKB   2

					      00050 SYMATCH:.BLKB   4

					      00054 IMGAUXFNB:

							    .BLKB   4

					      00058 GSDRECLNG:

							    .BLKB   2

					      0005A CURPSECTNUM:

							    .BLKB   1

					      0005B	    .BLKB   1

					      0005C OBJRECORD:

							    .BLKB   4



							    .PSECT  $GLOBAL$,NOEXE,2



					      00000 LNK$GW_GSTRECS::

							    .BLKB   2

					      00002 LNK$GW_SYMRECS::

							    .BLKB   2



						    SYM$C_MAXLNG==	15

						    FDB$C_SIZE==	75

						    LNK$S_NEWUDF==	0

						    LNK$S_LIBR==	1



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-7

; Digital Equipment Corporation

;

						    LNK$S_SHR==		2

						    LNK$S_SELSER==	3

						    LNK$S_OPTION==	4

						    LNK$S_DEBUGER==	5

						    LNK$S_LIBEXTR==	6

						    LNK$S_LIBSRCH==	7

						    LNK$M_NEWUDF==	1

						    LNK$M_LIBR==	2

						    LNK$M_SHR==		4

						    LNK$M_SELSER==	8

						    LNK$M_OPTION==	16

						    LNK$M_DEBUGER==	32

						    LNK$M_LIBEXTR==	64

						    LNK$M_LIBSRCH==	128

						    PMT$L_PSCDES==	0

						    PMT$L_MODCON==	1

						    PMT$L_SYMLST==	1

						    PMT$C_SIZE==	8

						    OMD$C_SIZE==	2080

						    OMD$M_NOPSCT==	1

						    OMD$S_NOPSCT==	0

						    OMD$M_NOBIN==	2

						    OMD$S_NOBIN==	1

						    OMD$M_SHRIMG==	4

						    OMD$S_SHRIMG==	2

						    OMD$M_SELSER==	8

						    OMD$S_SELSER==	3

						    OMD$M_MAPMOD==	16

						    OMD$S_MAPMOD==	4

						    OMD$M_DEBUGER==	32

						    OMD$S_DEBUGER==	5

						    PSC$C_SIZE==	43

						    MPC$C_SIZE==	17

						    LID$C_SIZE==	4

						    CLU$C_SIZE==	55

						    CLU$S_BASED==	0

						    CLU$S_SYMBAS==	1

						    CLU$S_SHRIMG==	2

						    CLU$S_PIC==		3

						    CLU$S_COPY==	4

						    CLU$S_OPEN==	5

						    CLU$S_PENDING==	6

						    FVM$C_SIZE==	12

						    OBJ$C_MAXRECTYP==	5

						    GPS$C_SIZE==	24

						    PSC$M_PIC==		1

						    PSC$M_LIB==		2

						    PSC$M_OVR==		4

						    PSC$M_REL==		8

						    PSC$M_GBL==		16

						    PSC$M_SHR==		32

						    PSC$M_EXE==		64

						    PSC$M_RD==		128

						    PSC$M_WRT==		256

						    PSC$M_SUPRES==	32768



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-8

; Digital Equipment Corporation

;

						    GSY$C_SIZE==	4

						    SYM$S_WEAK==	0

						    SYM$S_DEF==		1

						    SYM$S_UNI==		2

						    SYM$S_REL==		3

						    SYM$S_SHRIMG==	11

						    SYM$S_REDEF==	12

						    SYM$S_SUPRES==	13

						    SYM$S_GSTMISS==	14

						    SYM$S_ENTMSK==	15

						    SYM$M_WEAK==	1

						    SYM$M_DEF==		2

						    SYM$M_UNI==		4

						    SYM$M_REL==		8

						    SYM$M_SHRIMG==	2048

						    SYM$M_REDEF==	4096

						    SYM$M_SUPRES==	8192

						    SYM$M_GSTMISS==	16384

						    SYM$M_ENTMSK==	32768

						    SRF$C_SIZE==	20

						    SDF$C_SIZE==	25

						    EPM$C_SIZE==	27

						    PRO$C_SIZE==	27

						    FML$C_SIZE==	2

						    ARG$C_SIZE==	2

						    ARG$K_UNKNOWN==	0

						    ARG$K_VALUE==	1

						    ARG$K_REF==		2

						    ARG$K_DESC==	3

						    MHD$C_SIZE==	20

						    EOM$C_SIZE==	7

						    OBJ$C_EOMMIN==	2

						    OBJ$C_EOMMAX==	7

						    TIR$C_STA_GBL==	0

						    TIR$C_STA_SB==	1

						    TIR$C_STA_SW==	2

						    TIR$C_STA_LW==	3

						    TIR$C_STA_PB==	4

						    TIR$C_STA_PW==	5

						    TIR$C_STA_PL==	6

						    TIR$C_STA_UB==	7

						    TIR$C_STA_UW==	8

						    TIR$C_STA_BFI==	9

						    TIR$C_STA_WFI==	10

						    TIR$C_STA_LFI==	11

						    TIR$C_STA_EPM==	12

						    TIR$C_STA_CKARG==	13

						    TIR$C_MAXSTACOD==	13

						    TIR$C_MINSTOCOD==	20

						    TIR$C_STO_SB==	20

						    TIR$C_STO_SW==	21

						    TIR$C_STO_L==	22

						    TIR$C_STO_BD==	23

						    TIR$C_STO_WD==	24

						    TIR$C_STO_LD==	25



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-9

; Digital Equipment Corporation

;

						    TIR$C_STO_LI==	26

						    TIR$C_STO_PIDR==	27

						    TIR$C_STO_PICR==	28

						    TIR$C_STO_RSB==	29

						    TIR$C_STO_RSW==	30

						    TIR$C_STO_RL==	31

						    TIR$C_STO_VPS==	32

						    TIR$C_STO_USB==	33

						    TIR$C_STO_USW==	34

						    TIR$C_STO_RUB==	35

						    TIR$C_STO_RUW==	36

						    TIR$C_STO_B==	37

						    TIR$C_STO_W==	38

						    TIR$C_STO_RB==	39

						    TIR$C_STO_RW==	40

						    TIR$C_MAXSTOCOD==	40

						    TIR$C_MINOPRCOD==	50

						    TIR$C_OPR_NOP==	50

						    TIR$C_OPR_ADD==	51

						    TIR$C_OPR_SUB==	52

						    TIR$C_OPR_MUL==	53

						    TIR$C_OPR_DIV==	54

						    TIR$C_OPR_AND==	55

						    TIR$C_OPR_IOR==	56

						    TIR$C_OPR_EOR==	57

						    TIR$C_OPR_NEG==	58

						    TIR$C_OPR_COM==	59

						    TIR$C_OPR_INSV==	60

						    TIR$C_OPR_ASH==	61

						    TIR$C_OPR_USH==	62

						    TIR$C_OPR_ROT==	63

						    TIR$C_OPR_SEL==	64

						    TIR$C_OPR_REDEF==	65

						    TIR$C_MAXOPRCOD==	65

						    TIR$C_MINCTLCOD==	80

						    TIR$C_CTL_SETRB==	80

						    TIR$C_CTL_AUGRB==	81

						    TIR$C_MAXCTLCOD==	81

						    SYM$C_TBLSIZ==	128

						    SYM$C_SIZE==	42

							    .GLOBL  ERM$C_CLOSERR, ERM$C_CRE8ERR, ERM$C_FAOBUG, ERM$C_OPIDERR

							    .GLOBL  ERM$C_UNMCOD, ERM$C_WRTERR, LNK$C_OBJMBC, LNK$M_DBG

							    .GLOBL  LNK$M_IMAGE, LNK$M_SYMTBL, LNK$S_PICIMG, OBJ$C_MAXRECSIZ

							    .GLOBL  OBJ$C_STRLVL, OBJ$B_RECTYP, OBJ$B_SUBTYP, OBJ$B_EOM_LNGCD

							    .GLOBL  OBJ$T_PSC_NAME, OBJ$T_SDF_NAME, OBJ$C_HDR, OBJ$C_HDR_MHD

							    .GLOBL  OBJ$C_HDR_LNM, OBJ$C_GSD, OBJ$C_GSD_PSC, OBJ$C_GSD_SYM

							    .GLOBL  OBJ$C_GSD_EPM, OBJ$C_EOM, SEV$C_INFOR, SEV$C_DIAG

							    .GLOBL  LNK$AL_IMGRAB, LNK$AL_RAB, LNK$GB_MAXERCOD, LNK$GB_PASS

							    .GLOBL  LNK$GL_CTLMSK, LNK$GL_IMGFIL, LNK$GL_SYMFIL, LNK$GW_IMGIFI

							    .GLOBL  LNK$GL_MAPLST, LNK$GL_MINVA, LNK$GW_NSYMBOLS, LNK$GQ_STARTIM

							    .GLOBL  LNK$AW_VERSION, LNK$CLOSIMGFIL, LNK$ERRMSG, SYS$CREATE

							    .GLOBL  SYS$CONNECT, SYS$MODIFY



							    .PSECT  $CODE$,NOWRT,2





; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-10

; Digital Equipment Corporation

;

					 0FFC 00000 	    .ENTRY  LNK$SYMTBLOUT, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11       ; 0962

		         56 00000000G  9F  9E 00002 	    MOVAB   @#SYS$CONNECT, R6					      ;

		         57	0000G  CF  9E 00009 	    MOVAB   LNK$AL_IMGRAB+60, R7				      ;

		         58	0000G  CF  9E 0000E 	    MOVAB   LNK$ERRMSG, R8					      ;

		         59	       00  D0 00013 	    MOVL    #SEV$C_INFOR, R9					      ;

		         5A	0000G  CF  9E 00016 	    MOVAB   LNK$GL_CTLMSK, R10					      ;

		         5B	0000'  CF  9E 0001B 	    MOVAB   OBJRECORD, R11					      ;

		         5E	  B0   AE  9E 00020 	    MOVAB   -80(SP), SP						      ;

	      00000000*  8F	       6A  D3 00024 	    BITL    LNK$GL_CTLMSK, #<<LNK$M_DBG!4>!LNK$M_SYMTBL>	      ; 1027

				       01  12 0002B 	    BNEQ    1$							      ;

					   04 0002D 	    RET     							      ;

		         6B	0000G  CF  D0 0002E 1$:     MOVL    LNK$AL_RAB+36, OBJRECORD				      ; 1029

	   00	         6E	       00  2C 00033 	    MOVC5   #0, (SP), #0, #80, FABLOCK				      ; 1031

		         6E	0050   8F     00037									      ;

		         6E	5003   8F  B0 0003B 	    MOVW    #20483, FABLOCK					      ; 1033

		    16   AE	       01  88 00040 	    BISB2   #1, FABLOCK+22					      ; 1034

		    1F   AE	       02  90 00044 	    MOVB    #2, FABLOCK+31					      ; 1035

		    36   AE	0000G  8F  B0 00048 	    MOVW    #OBJ$C_MAXRECSIZ, FABLOCK+54			      ; 1036

		    17   AE	       20  88 0004E 	    BISB2   #32, FABLOCK+23					      ; 1037

	      00000000G  8F	       6A  D3 00052 	    BITL    LNK$GL_CTLMSK, #LNK$M_SYMTBL			      ; 1038

				       03  12 00059 	    BNEQ    2$							      ;

				     009B  31 0005B 	    BRW     5$							      ;

      A4   AB	  0000G  CF	       13  C1 0005E 2$:     ADDL3   #19, LNK$GL_SYMFIL, STBAUXFNB			      ; 1040

		         50	0000G  CF  D0 00065 	    MOVL    LNK$GL_SYMFIL, R0					      ; 1041

		    2C   AE	  0F   A0  D0 0006A 	    MOVL    15(R0), FABLOCK+44					      ;

		    34   AE	  0B   A0  90 0006F 	    MOVB    11(R0), FABLOCK+52					      ; 1042

		    35   AE	       04  90 00074 	    MOVB    #4, FABLOCK+53					      ; 1043

		    30   AE	0000'  CF  9E 00078 	    MOVAB   P.AAA, FABLOCK+48					      ; 1044

		    28   AE	  A4   AB  D0 0007E 	    MOVL    STBAUXFNB, FABLOCK+40				      ; 1045

		         50	0000G  CF  3C 00083 	    MOVZWL  LNK$GW_NSYMBOLS, R0					      ; 1046

      10   AE	         50	       14  C7 00088 	    DIVL3   #20, R0, FABLOCK+16					      ;

		    E4   AB	       6E  9E 0008D 	    MOVAB   FABLOCK, STBRAB+60					      ; 1047

				       5E  DD 00091 	    PUSHL   SP							      ; 1048

	      00000000G  9F	       01  FB 00093 	    CALLS   #1, @#SYS$CREATE					      ;

		         52	       50  D0 0009A 	    MOVL    R0, RMSERROR					      ;

		         0C	       52  E9 0009D 	    BLBC    RMSERROR, 3$					      ;

				  A8   AB  9F 000A0 	    PUSHAB  STBRAB						      ; 1049

		         66	       01  FB 000A3 	    CALLS   #1, SYS$CONNECT					      ;

		         52	       50  D0 000A6 	    MOVL    R0, RMSERROR					      ;

		         44	       52  E8 000A9 	    BLBS    RMSERROR, 4$					      ;

		         50	  A4   AB  D0 000AC 3$:     MOVL    STBAUXFNB, R0					      ; 1052

				  0C   A0  DD 000B0 	    PUSHL   12(R0)						      ; 1051

		         7E	  0B   A0  9A 000B3 	    MOVZBL  11(R0), -(SP)					      ;

		         7E	       00  9A 000B7 	    MOVZBL  #SEV$C_DIAG, -(SP)					      ;

		         7E	  00G  8F  9A 000BA 	    MOVZBL  #ERM$C_CRE8ERR, -(SP)				      ;

		         68	       04  FB 000BE 	    CALLS   #4, LNK$ERRMSG					      ;

				       52  DD 000C1 	    PUSHL   RMSERROR						      ; 1053

	   7E	  0000G  CF	       0B  C1 000C3 	    ADDL3   #11, LNK$GL_SYMFIL, -(SP)				      ; 1054

		         7E	       59  9A 000C9 	    MOVZBL  R9, -(SP)						      ; 1053

		         7E	  00G  8F  9A 000CC 	    MOVZBL  #ERM$C_UNMCOD, -(SP)				      ;

		         68	       04  FB 000D0 	    CALLS   #4, LNK$ERRMSG					      ;

				  0C   AE  DD 000D3 	    PUSHL   FABLOCK+12						      ; 1055

		         7E	       59  9A 000D6 	    MOVZBL  R9, -(SP)						      ;

	   7E	         52	       07  CB 000D9 	    BICL3   #7, RMSERROR, -(SP)					      ;

		         68	       03  FB 000DD 	    CALLS   #3, LNK$ERRMSG					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-11

; Digital Equipment Corporation

;

		  0000G  CF	  80   8F  88 000E0 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1057

	      00000000*  8F	       6A  D3 000E6 	    BITL    LNK$GL_CTLMSK, #<<LNK$M_DBG!4>!LNK$M_IMAGE>		      ; 1059

				       0A  12 000ED 	    BNEQ    5$							      ;

					   04 000EF 	    RET     							      ; 1060

		    EC   AB	  02   AE  3C 000F0 4$:     MOVZWL  FABLOCK+2, STBFILEIFI				      ; 1063

		    D0   AB	       6B  D0 000F5 	    MOVL    OBJRECORD, STBRAB+40				      ; 1064

	      00000000*  8F	       6A  D3 000F9 5$:     BITL    LNK$GL_CTLMSK, #<LNK$M_DBG!4>			      ; 1073

				       7D  13 00100 	    BEQL    7$							      ;

		         00	       6A  D3 00102 	    BITL    LNK$GL_CTLMSK, #LNK$M_IMAGE				      ; 1074

				       78  13 00105 	    BEQL    7$							      ;

      F8   AB	  0000G  CF	       13  C1 00107 	    ADDL3   #19, LNK$GL_IMGFIL, IMGAUXFNB			      ; 1076

		    02   AE	0000G  CF  B0 0010E 	    MOVW    LNK$GW_IMGIFI, FABLOCK+2				      ; 1077

		    16   AE	  40   8F  88 00114 	    BISB2   #64, FABLOCK+22					      ; 1078

		    07   AE	       08  88 00119 	    BISB2   #8, FABLOCK+4					      ; 1079

		    18   AE	       01  D0 0011D 	    MOVL    #1, FABLOCK+24					      ; 1080

		         67	       6E  9E 00121 	    MOVAB   FABLOCK, LNK$AL_IMGRAB+60				      ; 1081

		    C9   A7	       01  88 00124 	    BISB2   #1, LNK$AL_IMGRAB+5					      ; 1082

				       5E  DD 00128 	    PUSHL   SP							      ; 1083

	      00000000G  9F	       01  FB 0012A 	    CALLS   #1, @#SYS$MODIFY					      ;

		         52	       50  D0 00131 	    MOVL    R0, RMSERROR					      ;

		         0C	       52  E9 00134 	    BLBC    RMSERROR, 6$					      ;

				  C4   A7  9F 00137 	    PUSHAB  LNK$AL_IMGRAB					      ; 1084

		         66	       01  FB 0013A 	    CALLS   #1, SYS$CONNECT					      ;

		         52	       50  D0 0013D 	    MOVL    R0, RMSERROR					      ;

		         3E	       52  E8 00140 	    BLBS    RMSERROR, 8$					      ;

		         50	  F8   AB  D0 00143 6$:     MOVL    IMGAUXFNB, R0					      ; 1087

				  04   A0  DD 00147 	    PUSHL   4(R0)						      ; 1086

		         7E	  03   A0  9A 0014A 	    MOVZBL  3(R0), -(SP)					      ;

		         7E	0000G  CF  9A 0014E 	    MOVZBL  LNK$GB_PASS, -(SP)					      ;

		         7E	       00  9A 00153 	    MOVZBL  #SEV$C_DIAG, -(SP)					      ;

		         7E	  00G  8F  9A 00156 	    MOVZBL  #ERM$C_OPIDERR, -(SP)				      ;

		         68	       05  FB 0015A 	    CALLS   #5, LNK$ERRMSG					      ;

				       52  DD 0015D 	    PUSHL   RMSERROR						      ; 1088

	   7E	  0000G  CF	       0B  C1 0015F 	    ADDL3   #11, LNK$GL_IMGFIL, -(SP)				      ; 1089

		         7E	       59  9A 00165 	    MOVZBL  R9, -(SP)						      ; 1088

		         7E	  00G  8F  9A 00168 	    MOVZBL  #ERM$C_UNMCOD, -(SP)				      ;

		         68	       04  FB 0016C 	    CALLS   #4, LNK$ERRMSG					      ;

				       52  DD 0016F 	    PUSHL   RMSERROR						      ; 1090

				  F8   AB  DD 00171 	    PUSHL   IMGAUXFNB						      ;

		  0000V  CF	       02  FB 00174 	    CALLS   #2, LNK$CLOSYMOUT					      ;

		  0000G  CF	  80   8F  88 00179 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1091

				       0A  11 0017F 7$:     BRB     9$							      ; 1092

		    FB   A7	       00  90 00181 8$:     MOVB    #LNK$C_OBJMBC, LNK$AL_IMGRAB+55			      ; 1096

		    EC   A7	       6B  D0 00185 	    MOVL    OBJRECORD, LNK$AL_IMGRAB+40				      ; 1097

				       06  11 00189 	    BRB     10$							      ; 1073

				  EC   AB  D5 0018B 9$:     TSTL    STBFILEIFI						      ; 1100

				       01  12 0018E 	    BNEQ    10$							      ;

					   04 00190 	    RET     							      ;

		  0000V  CF	       00  FB 00191 10$:    CALLS   #0, HDRECSOUT					      ; 1102

		         5C	       50  E9 00196 	    BLBC    R0, 16$						      ;

				0000'  CF  9F 00199 	    PUSHAB  ABSPSECT						      ; 1105

		  0000V  CF	       01  FB 0019D 	    CALLS   #1, PSECTRECOUT					      ;

		         50	       50  E9 001A2 	    BLBC    R0, 16$						      ;

		         53	0000G  CF  9E 001A5 	    MOVAB   LNK$GL_MAPLST, PSECTDESC				      ; 1113

	   06	         6A	       02  E0 001AA 	    BBS     #2, LNK$GL_CTLMSK, 11$				      ; 1114



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-12

; Digital Equipment Corporation

;

		    F0   AB	       01  88 001AE 	    BISB2   #1, SYMASK						      ; 1115

				       08  11 001B2 	    BRB     12$							      ; 1114

		    F4   AB	       04  D0 001B4 11$:    MOVL    #4, SYMATCH						      ; 1117

		    F0   AB	       04  88 001B8 	    BISB2   #4, SYMASK						      ; 1118

		         53	       63  D0 001BC 12$:    MOVL    (PSECTDESC), PSECTDESC				      ; 1120

				       03  12 001BF 	    BNEQ    13$							      ;

				     0082  31 001C1 	    BRW     23$							      ;

	   30	         6A	       02  E1 001C4 13$:    BBC     #2, LNK$GL_CTLMSK, 17$				      ; 1122

		         50	  19   A3  3C 001C8 	    MOVZWL  25(PSECTDESC), R0					      ; 1123

		         50 FFFFFFE3   8F  CA 001CC 	    BICL2   #-29, R0						      ;

		         1C	       50  D1 001D3 	    CMPL    R0, #28						      ; 1124

				       20  12 001D6 	    BNEQ    17$							      ;

				  FE   AB  96 001D8 	    INCB    CURPSECTNUM						      ; 1127

	   0A	         6A	       00  E1 001DB 	    BBC     #LNK$S_PICIMG, LNK$GL_CTLMSK, 14$			      ; 1128

      10   A3	    0C   A3	0000G  CF  C3 001DF 	    SUBL3   LNK$GL_MINVA, 12(PSECTDESC), 16(PSECTDESC)		      ; 1129

				       05  11 001E7 	    BRB     15$							      ; 1128

		    10   A3	  0C   A3  D0 001E9 14$:    MOVL    12(PSECTDESC), 16(PSECTDESC)			      ; 1131

				       53  DD 001EE 15$:    PUSHL   PSECTDESC						      ; 1132

		  0000V  CF	       01  FB 001F0 	    CALLS   #1, PSECTRECOUT					      ;

		         5D	       50  E9 001F5 16$:    BLBC    R0, 24$						      ;

		         52	  08   A3  D0 001F8 17$:    MOVL    8(PSECTDESC), SYMDESC				      ; 1135

				       BE  13 001FC 	    BEQL    12$							      ;

		         50	  1E   A2  9E 001FE 18$:    MOVAB   30(SYMDESC), R0					      ; 1136

		         51	       60  3C 00202 	    MOVZWL  (R0), R1						      ;

		         54	  F0   AB  3C 00205 	    MOVZWL  SYMASK, R4						      ;

		         54	       54  D2 00209 	    MCOML   R4, R4						      ;

		         51	       54  CA 0020C 	    BICL2   R4, R1						      ;

		    F4   AB	       51  D1 0020F 	    CMPL    R1, SYMATCH						      ;

				       28  12 00213 	    BNEQ    22$							      ;

	   04	         60	       0C  E1 00215 	    BBC     #12, (R0), 19$					      ; 1138

		         62	  22   A2  D0 00219 	    MOVL    34(SYMDESC), (SYMDESC)				      ; 1139

	   0F	         6A	       00  E1 0021D 19$:    BBC     #LNK$S_PICIMG, LNK$GL_CTLMSK, 20$			      ; 1140

	   0B	         6A	       02  E1 00221 	    BBC     #2, LNK$GL_CTLMSK, 20$				      ; 1141

	   07	         60	       03  E1 00225 	    BBC     #3, (R0), 20$					      ; 1142

		         62	0000G  CF  C2 00229 	    SUBL2   LNK$GL_MINVA, (SYMDESC)				      ; 1143

				       03  11 0022E 	    BRB     21$							      ; 1140

		         60	       08  8A 00230 20$:    BICB2   #8, (R0)						      ; 1145

				       52  DD 00233 21$:    PUSHL   SYMDESC						      ; 1147

		  0000V  CF	       01  FB 00235 	    CALLS   #1, SYMRECOUT					      ;

		         18	       50  E9 0023A 	    BLBC    R0, 24$						      ;

		         52	  04   A2  D0 0023D 22$:    MOVL    4(SYMDESC), SYMDESC					      ; 1150

				       BB  12 00241 	    BNEQ    18$							      ;

				     FF76  31 00243 	    BRW     12$							      ; 1120

		  0000V  CF	       00  FB 00246 23$:    CALLS   #0, EOMRECOUT					      ; 1156

		         07	       50  E9 0024B 	    BLBC    R0, 24$						      ;

				       7E  D4 0024E 	    CLRL    -(SP)						      ; 1158

		  0000V  CF	       01  FB 00250 	    CALLS   #1, LNK$CLOSYMOUT					      ;

					   04 00255 24$:    RET     							      ; 0962



; Routine Size:  598 bytes





;35700  1161	ROUTINE HDRECSOUT =

;35800  1162	BEGIN

;35900  1163	!



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-13

; Digital Equipment Corporation

;

;36000  1164	! THIS ROUTINE OUTPUTS MODULE HEADER RECORDS TO THE

;36100  1165	! SYMBOL TABLE FILE.

;36200  1166	!

;36300  1167	BIND 	MHDREC = OBJRECORD[OBJ$B_SUBTYP] : BLOCK[,BYTE];

;36400  1168	OWN	DATECNTRL : DESCRIPTOR('!17%D!17%D'),

;36500  1169		LINKNAMEVER : DESCRIPTOR ('LINK-32 X!AD.!AD');

;36600  1170	LITERAL	FILENAMELEN = 9,

;36700  1171		DATEFIELDLEN = 17,

;36800  1172		MAJ_IDENT_LNG = 2,

;36900  1173		MIN_IDENT_LNG = 2;

;37000  1174	LOCAL	MODULENAME,

;37100  1175		FILENAME : REF BLOCK[,BYTE],

;37200  1176		FILEIDENT,

;37300  1177		MODHEADFIELD : REF VECTOR[,BYTE],

;37400  1178		DATEFIELD : VECTOR [2],

;37500  1179		RECLNG : WORD;

;37600  1180	BIND	BUFFERDESC = DATEFIELD : VECTOR;

;37700  1181	!

;37800  1182	OBJRECORD[OBJ$B_RECTYP] = OBJ$C_HDR;					! SET RECORD TYPE

;37900  1183	MHDREC[MHD$B_HDRTYP] = OBJ$C_HDR_MHD;					! AND HEADER SUB-TYPE

;38000  1184	MHDREC[MHD$B_STRLVL] = OBJ$C_STRLVL;					! SET STRUCTURE LEVEL

;38100  1185	MHDREC[MHD$W_RECSIZ] = OBJ$C_MAXRECSIZ;					! MAXIMUM IS MAX ALLOWED

;38200  1186	IF (FILENAME = .IMGAUXFNB) EQL 0					! USE IMAGE FILENAME AS MODULE

;38300  1187	THEN FILENAME = .STBAUXFNB;						! NAME. IF NONE USE STB FILENAME

;38400  1188	IF (MODULENAME = 1 + CH$FIND_CH(.FILENAME[NAM$B_RSL],.FILENAME[NAM$L_RSA],	! STRIP OFF DEVICE AND

;38500  1189								%C']') ) EQL 1		! DIRECTORY

;38600  1190	THEN MODULENAME = 1 + CH$FIND_CH(.FILENAME[NAM$B_RSL],.FILENAME[NAM$L_RSA],	! STRIP OFF DEVICE AND

;38700  1191								%C'>');		! DIRECTORY FOR ] OR >

;38800  1192	FILEIDENT = CH$FIND_CH(FILENAMELEN+1,.MODULENAME,%C'.');		! POINT TO FILE TYPE

;38900  1193	MHDREC[MHD$B_NAMLNG]=CH$DIFF(.FILEIDENT,.MODULENAME);			! SET MODULE NAME LENGTH

;39000  1194	MODHEADFIELD = CH$MOVE(.MHDREC[MHD$B_NAMLNG],.MODULENAME,		! AND COPY THE NAME, SETTING

;39100  1195					MHDREC[MHD$T_NAME]);			! POINTER TO NEXT FIELD

;39200  1196	MODHEADFIELD[0] = .FILENAME[NAM$B_RSL]-CH$DIFF(.FILEIDENT,		! SET LENGTH OF IDENT

;39300  1197						.FILENAME[NAM$L_RSA]);		! FIELD AND COPY FILE

;39400  1198	DATEFIELD[1] = CH$MOVE(.MODHEADFIELD[0],.FILEIDENT,MODHEADFIELD[1]);	! TYPE AND VERSION FOR IDENT

;39500  1199	DATEFIELD[0] = 2 * DATEFIELDLEN;					! SET UP DESCRIPTOR FOR DATE

;39600  1200	IF NOT $FAO (DATECNTRL,RECLNG,DATEFIELD,				! FIELDS AND CALL FAO TO

;39700P 1201			LNK$GQ_STARTIM,LNK$GQ_STARTIM)				! CONVERT AND MOVE IN DATE

;39800  1202	THEN BEGIN

;39900  1203		LNK$ERRMSG(ERM$C_FAOBUG,SEV$C_DIAG);				! AND TIME (TWICE)

;40000  1204		RETURN FALSE;							! GIVE UP WITH MESSAGE

;40100  1205	     END;								! IF AN ERROR.

;40200  1206	RECLNG = .RECLNG + .MODHEADFIELD[0] + .MHDREC[MHD$B_NAMLNG] + 2 +	! COMPUTE TOTAL RECORD

;40300  1207			OBJRECORD[OBJ$B_RECTYP] - MHDREC[MHD$B_NAMLNG];		! LENGTH

;40400  1208	IF NOT OUTPUTREC (.RECLNG)						! AND OUTPUT THE

;40500  1209	THEN RETURN FALSE;							! RECORD

;40600  1210	!

;40700  1211	! NOW BUILD THE RECORD WITH LINKER'S NAME AND VERSION.

;40800  1212	!

;40900  1213	OBJRECORD[OBJ$B_SUBTYP] = OBJ$C_HDR_LNM;				! CREATOR ID HEADER

;41000  1214	BUFFERDESC[0] = OBJ$C_MAXRECSIZ;					! SET LENGTH AND

;41100  1215	BUFFERDESC[1] = OBJRECORD[OBJ$B_SUBTYP]+1;				! ADDRESS AND FAO

;41200  1216	IF NOT $FAO (LINKNAMEVER,RECLNG,BUFFERDESC,MAJ_IDENT_LNG,		! FILLS IN THE RECORD.

;41300P 1217			LNK$AW_VERSION[LID$W_MAJOR],MIN_IDENT_LNG,		! WITH MAJOR AND MINOR

;41400P 1218			LNK$AW_VERSION[LID$W_MINOR])				! LINKER IDENT



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-14

; Digital Equipment Corporation

;

;41500  1219	THEN BEGIN								! REPORT FAO ERROR

;41600  1220		LNK$ERRMSG(ERM$C_FAOBUG,SEV$C_DIAG);

;41700  1221		RETURN FALSE;							! AND GIVE UP

;41800  1222	     END;

;41900  1223	RECLNG = .RECLNG+.BUFFERDESC[1]-OBJRECORD[OBJ$B_RECTYP];		! COMPUTE RECORD LENGTH

;42000  1224	RETURN OUTPUTREC(.RECLNG);					! OUTPUT THE RECORD AND RETURN STATUS CODE

;42100  1225	END;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00004 P.AAB:  .ASCII  \!17%D!17%D\<0><0>					      ;

					      00010 P.AAC:  .ASCII  \LINK-32 X!AD.!AD\					      ;



							    .PSECT  $OWN$,NOEXE,2



					      00060 DATECNTRL:

							    .LONG   10							      ;

					      00064 	    .ADDRESS  P.AAB						      ;

					      00068 LINKNAMEVER:

							    .LONG   16							      ;

					      0006C 	    .ADDRESS  P.AAC						      ;



							    .GLOBL  SYS$FAO



							    .PSECT  $CODE$,NOWRT,2



					 0FFC 00256 HDRECSOUT:

							    .WORD   Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11		      ; 1161

		         5A	       00  D0 00258 	    MOVL    #OBJ$B_RECTYP, R10					      ;

		         5B	0000'  CF  9E 0025B 	    MOVAB   OBJRECORD, R11					      ;

		         5E	       0C  C2 00260 	    SUBL2   #12, SP						      ;

	   57	         6B	       00  C1 00263 	    ADDL3   #OBJ$B_SUBTYP, OBJRECORD, R7			      ; 1167

	   50	         6B	       5A  C1 00267 	    ADDL3   R10, OBJRECORD, R0					      ; 1182

		         60	       00  90 0026B 	    MOVB    #OBJ$C_HDR, (R0)					      ;

		         67	       00  90 0026E 	    MOVB    #OBJ$C_HDR_MHD, (R7)				      ; 1183

		    01   A7	       00  90 00271 	    MOVB    #OBJ$C_STRLVL, 1(R7)				      ; 1184

		    02   A7	0000G  8F  B0 00275 	    MOVW    #OBJ$C_MAXRECSIZ, 2(R7)				      ; 1185

		         56	  F8   AB  D0 0027B 	    MOVL    IMGAUXFNB, FILENAME					      ; 1186

				       04  12 0027F 	    BNEQ    1$							      ;

		         56	  A4   AB  D0 00281 	    MOVL    STBAUXFNB, FILENAME					      ; 1187

		         50	  03   A6  9A 00285 1$:     MOVZBL  3(FILENAME), R0					      ; 1188

      04   B6	         50	  5D   8F  3A 00289 	    LOCC    #93, R0, @4(FILENAME)				      ;

				       02  12 0028F 	    BNEQ    2$							      ;

				       51  D4 00291 	    CLRL    R1							      ;

	   52	         51	       01  C1 00293 2$:     ADDL3   #1, R1, MODULENAME					      ;

		         01	       52  D1 00297 	    CMPL    MODULENAME, #1					      ; 1189

				       11  12 0029A 	    BNEQ    4$							      ;

		         50	  03   A6  9A 0029C 	    MOVZBL  3(FILENAME), R0					      ; 1190

      04   B6	         50	       3E  3A 002A0 	    LOCC    #62, R0, @4(FILENAME)				      ;

				       02  12 002A5 	    BNEQ    3$							      ;

				       51  D4 002A7 	    CLRL    R1							      ;

	   52	         51	       01  C1 002A9 3$:     ADDL3   #1, R1, MODULENAME					      ;

	   62	         0A	       2E  3A 002AD 4$:     LOCC    #46, #10, (MODULENAME)				      ; 1192



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-15

; Digital Equipment Corporation

;

				       02  12 002B1 	    BNEQ    5$							      ;

				       51  D4 002B3 	    CLRL    R1							      ;

		         59	       51  D0 002B5 5$:     MOVL    R1, FILEIDENT					      ;

      04   A7	         59	       52  83 002B8 	    SUBB3   MODULENAME, FILEIDENT, 4(R7)			      ; 1193

		         50	  04   A7  9A 002BD 	    MOVZBL  4(R7), R0						      ; 1194

      05   A7	         62	       50  28 002C1 	    MOVC3   R0, (MODULENAME), 5(R7)				      ;

		         58	       53  D0 002C6 	    MOVL    R3, MODHEADFIELD					      ;

	   50	    04   A6	       59  C3 002C9 	    SUBL3   FILEIDENT, 4(FILENAME), R0				      ; 1197

	   68	         50	  03   A6  81 002CE 	    ADDB3   3(FILENAME), R0, (MODHEADFIELD)			      ; 1196

		         50	       68  9A 002D3 	    MOVZBL  (MODHEADFIELD), R0					      ; 1198

      01   A8	         69	       50  28 002D6 	    MOVC3   R0, (FILEIDENT), 1(MODHEADFIELD)			      ;

		    08   AE	       53  D0 002DB 	    MOVL    R3, DATEFIELD+4					      ;

		    04   AE	       22  D0 002DF 	    MOVL    #34, DATEFIELD					      ; 1199

				0000G  CF  9F 002E3 	    PUSHAB  LNK$GQ_STARTIM					      ; 1201

				0000G  CF  9F 002E7 	    PUSHAB  LNK$GQ_STARTIM					      ;

				  0C   AE  9F 002EB 	    PUSHAB  DATEFIELD						      ;

				  0C   AE  9F 002EE 	    PUSHAB  RECLNG						      ;

				  04   AB  9F 002F1 	    PUSHAB  DATECNTRL						      ;

	      00000000G  9F	       05  FB 002F4 	    CALLS   #5, @#SYS$FAO					      ;

		         5E	       50  E9 002FB 	    BLBC    R0, 6$						      ;

		         50	       6E  3C 002FE 	    MOVZWL  RECLNG, R0						      ; 1206

		         51	       68  9A 00301 	    MOVZBL  (MODHEADFIELD), R1					      ;

		         50	       51  C0 00304 	    ADDL2   R1, R0						      ;

		         52	  04   A7  9A 00307 	    MOVZBL  4(R7), R2						      ;

		         50	       52  C0 0030B 	    ADDL2   R2, R0						      ;

	   51	         6B	       5A  C1 0030E 	    ADDL3   R10, OBJRECORD, R1					      ; 1207

		         50	       51  C0 00312 	    ADDL2   R1, R0						      ; 1206

		         51	  04   A7  9E 00315 	    MOVAB   4(R7), R1						      ; 1207

		         50	       51  C2 00319 	    SUBL2   R1, R0						      ;

	   6E	         50	       02  A1 0031C 	    ADDW3   #2, R0, RECLNG					      ;

		         7E	       6E  3C 00320 	    MOVZWL  RECLNG, -(SP)					      ; 1208

		  0000V  CF	       01  FB 00323 	    CALLS   #1, OUTPUTREC					      ;

		         57	       50  E9 00328 	    BLBC    R0, 8$						      ;

	   50	         6B	       00  C1 0032B 	    ADDL3   #OBJ$B_SUBTYP, OBJRECORD, R0			      ; 1213

		         60	       00  90 0032F 	    MOVB    #OBJ$C_HDR_LNM, (R0)				      ;

		    04   AE	0000G  8F  3C 00332 	    MOVZWL  #OBJ$C_MAXRECSIZ, BUFFERDESC			      ; 1214

      08   AE	         50	       01  C1 00338 	    ADDL3   #1, R0, BUFFERDESC+4				      ; 1215

				0000G  CF  9F 0033D 	    PUSHAB  LNK$AW_VERSION+2					      ; 1218

				       02  DD 00341 	    PUSHL   #2							      ;

				0000G  CF  9F 00343 	    PUSHAB  LNK$AW_VERSION					      ;

				       02  DD 00347 	    PUSHL   #2							      ;

				  14   AE  9F 00349 	    PUSHAB  BUFFERDESC						      ; 1161

				  14   AE  9F 0034C 	    PUSHAB  RECLNG						      ; 1218

				  0C   AB  9F 0034F 	    PUSHAB  LINKNAMEVER						      ;

	      00000000G  9F	       07  FB 00352 	    CALLS   #7, @#SYS$FAO					      ;

		         0E	       50  E8 00359 	    BLBS    R0, 7$						      ;

		         7E	       00  9A 0035C 6$:     MOVZBL  #SEV$C_DIAG, -(SP)					      ; 1220

		         7E	  00G  8F  9A 0035F 	    MOVZBL  #ERM$C_FAOBUG, -(SP)				      ;

		  0000G  CF	       02  FB 00363 	    CALLS   #2, LNK$ERRMSG					      ;

				       18  11 00368 	    BRB     8$							      ; 1221

		         51	       6E  3C 0036A 7$:     MOVZWL  RECLNG, R1						      ; 1223

		         51	  08   AE  C0 0036D 	    ADDL2   BUFFERDESC+4, R1					      ;

	   50	         6B	       5A  C1 00371 	    ADDL3   R10, OBJRECORD, R0					      ;

	   6E	         51	       50  A3 00375 	    SUBW3   R0, R1, RECLNG					      ;

		         7E	       6E  3C 00379 	    MOVZWL  RECLNG, -(SP)					      ; 1224



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-16

; Digital Equipment Corporation

;

		  0000V  CF	       01  FB 0037C 	    CALLS   #1, OUTPUTREC					      ;

					   04 00381 	    RET     							      ;

				       50  D4 00382 8$:     CLRL    R0							      ; 1161

					   04 00384 	    RET     							      ;



; Routine Size:  303 bytes





;42200  1226	ROUTINE EOMRECOUT =

;42300  1227	BEGIN

;42400  1228	!

;42500  1229	! THIS ROUTINE BUILDS AND OUTPUTS AN END OF MODULE RECORD

;42600  1230	!

;42700  1231	IF NOT OUTPUTREC(.GSDRECLNG)						! FLUSH LAST GSD

;42800  1232	THEN RETURN FALSE;							! RECORD BEING BUILT

;42900  1233	OBJRECORD[OBJ$B_RECTYP] = OBJ$C_EOM;					! SET RECORD TYPE

;43000  1234	OBJRECORD[OBJ$B_EOM_LNGCD] = MINU(1,.LNK$GB_MAXERCOD);			! INSERT ERROR CODE

;43100  1235	RETURN OUTPUTREC(OBJ$C_EOMMIN);						! AND OUTPUT IT

;43200  1236	END;











					 0000 00385 EOMRECOUT:

							    .WORD   Save nothing					      ; 1226

		         7E	0000'  CF  3C 00387 	    MOVZWL  GSDRECLNG, -(SP)					      ; 1231

		  0000V  CF	       01  FB 0038C 	    CALLS   #1, OUTPUTREC					      ;

		         27	       50  E9 00391 	    BLBC    R0, 2$						      ;

	   50	  0000'  CF	       00  C1 00394 	    ADDL3   #OBJ$B_RECTYP, OBJRECORD, R0			      ; 1233

		         60	       00  90 0039A 	    MOVB    #OBJ$C_EOM, (R0)					      ;

	   51	  0000'  CF	       00  C1 0039D 	    ADDL3   #OBJ$B_EOM_LNGCD, OBJRECORD, R1			      ; 1234

		         50	0000G  CF  9A 003A3 	    MOVZBL  LNK$GB_MAXERCOD, R0					      ;

		         01	       50  91 003A8 	    CMPB    R0, #1						      ;

				       03  1B 003AB 	    BLEQU   1$							      ;

		         50	       01  D0 003AD 	    MOVL    #1, R0						      ;

		         61	       50  90 003B0 1$:     MOVB    R0, (R1)						      ;

				       02  DD 003B3 	    PUSHL   #2							      ; 1235

		  0000V  CF	       01  FB 003B5 	    CALLS   #1, OUTPUTREC					      ;

					   04 003BA 	    RET     							      ;

				       50  D4 003BB 2$:     CLRL    R0							      ; 1226

					   04 003BD 	    RET     							      ;



; Routine Size:  57 bytes





;43300  1237	ROUTINE PSECTRECOUT(PSECTDESC) =

;43400  1238	BEGIN

;43500  1239	!

;43600  1240	! THIS ROUTINE OUTPUTS A P-SECTION DEFINITION RECORD. IT ASSUMES THAT GSD

;43700  1241	! RECORDS ARE BEING WRITTEN AND BLOCKED UP. IF ANOTHER P-SECTION DEFINITION

;43800  1242	! RECORD WILL NOT FIT IN THE CURRENT GSD RECORD, THE RECORD IS WRITTEN

;43900  1243	! AND ANOTHER BEGUN.

;44000  1244	!

;44100  1245	MAP PSECTDESC : REF BLOCK[,BYTE];					! BLOCK POINTER



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-17

; Digital Equipment Corporation

;

;44200  1246	LOCAL PSECTDEFREC : REF BLOCK[,BYTE];					! POINTER TO CURRENT P-SECT

;44300  1247										! DEFINITION BLOCK

;44400  1248	IF (.GSDRECLNG+.PSECTDESC[PSC$B_NAMLNG]+OBJ$T_PSC_NAME) GTRU		! IF CURRENT RECORD DOES

;44500  1249					OBJ$C_MAXRECSIZ				! NOT HAVE ENOUGH SPACE.

;44600  1250	THEN BEGIN

;44700  1251		IF NOT OUTPUTREC (.GSDRECLNG)					! WRITE IT OUT

;44800  1252		THEN RETURN;							! AND ZERO THE LENGTH

;44900  1253		GSDRECLNG = 0;

;45000  1254	     END;

;45100  1255	IF .GSDRECLNG EQL 0							! IF BEGINNING A NEW

;45200  1256	THEN BEGIN								! GSD RECORD, SET

;45300  1257		OBJRECORD[OBJ$B_RECTYP]=OBJ$C_GSD;				! RECORD TYPE AND INITIALIZE

;45400  1258		GSDRECLNG = 1;							! THE LENGTH

;45500  1259	     END;

;45600  1260	PSECTDEFREC = OBJRECORD[.GSDRECLNG];					! POINT TO P-SECTION

;45700  1261										! PART OF THE RECORD

;45800  1262	PSECTDEFREC[GPS$B_GSDTYP] = OBJ$C_GSD_PSC;				! SET TYPE OF GSD 

;45900  1263	PSECTDEFREC[GPS$B_ALIGN] = .PSECTDESC[PSC$B_ALIGN];			! COPY ALIGNMENT

;46000  1264	PSECTDEFREC[GPS$W_FLAGS] = .PSECTDESC[PSC$W_FLAGS];			! COPY FLAGS

;46100  1265	PSECTDEFREC[GPS$L_ALLOC] = .PSECTDESC[PSC$L_LENGTH];			! COPY ITS LENGTH

;46200  1266	PSECTDEFREC[GPS$B_NAMLNG] = .PSECTDESC[PSC$B_NAMLNG];			! SET LENGTH OF NAME

;46300  1267	GSDRECLNG = .GSDRECLNG+CH$MOVE(.PSECTDESC[PSC$B_NAMLNG],			! COPY THE P-SECTION

;46400  1268				PSECTDESC[PSC$T_NAME],				! NAME AND UPDATE THE

;46500  1269				PSECTDEFREC[GPS$T_NAME])-.PSECTDEFREC;		! RECORD LENGTH

;46600  1270	RETURN TRUE;								! AND ALL DONE.

;46700  1271	END;











					 08FC 003BE PSECTRECOUT:

							    .WORD   Save R2,R3,R4,R5,R6,R7,R11				      ; 1237

		         5B	0000'  CF  9E 003C0 	    MOVAB   GSDRECLNG, R11					      ;

		         52	  04   AC  D0 003C5 	    MOVL    PSECTDESC, R2					      ; 1248

		         50	       6B  3C 003C9 	    MOVZWL  GSDRECLNG, R0					      ;

		         51	  1B   A2  9A 003CC 	    MOVZBL  27(R2), R1						      ;

		         50	       51  C0 003D0 	    ADDL2   R1, R0						      ;

		         50	       00  C0 003D3 	    ADDL2   #OBJ$T_PSC_NAME, R0					      ;

	      00000000G  8F	       50  D1 003D6 	    CMPL    R0, #OBJ$C_MAXRECSIZ				      ;

				       0D  1B 003DD 	    BLEQU   1$							      ;

		         7E	       6B  3C 003DF 	    MOVZWL  GSDRECLNG, -(SP)					      ; 1251

		  0000V  CF	       01  FB 003E2 	    CALLS   #1, OUTPUTREC					      ;

		         47	       50  E9 003E7 	    BLBC    R0, 3$						      ;

				       6B  B4 003EA 	    CLRW    GSDRECLNG						      ; 1253

				       6B  B5 003EC 1$:     TSTW    GSDRECLNG						      ; 1255

				       0B  12 003EE 	    BNEQ    2$							      ;

	   50	    04   AB	       00  C1 003F0 	    ADDL3   #OBJ$B_RECTYP, OBJRECORD, R0			      ; 1257

		         60	       00  90 003F5 	    MOVB    #OBJ$C_GSD, (R0)					      ;

		         6B	       01  B0 003F8 	    MOVW    #1, GSDRECLNG					      ; 1258

		         56	       6B  3C 003FB 2$:     MOVZWL  GSDRECLNG, PSECTDEFREC				      ; 1260

		         56	  04   AB  C0 003FE 	    ADDL2   OBJRECORD, PSECTDEFREC				      ;

		         66	       00  90 00402 	    MOVB    #OBJ$C_GSD_PSC, (PSECTDEFREC)			      ; 1262

		    01   A6	  18   A2  90 00405 	    MOVB    24(R2), 1(PSECTDEFREC)				      ; 1263

		    02   A6	  19   A2  B0 0040A 	    MOVW    25(R2), 2(PSECTDEFREC)				      ; 1264



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-18

; Digital Equipment Corporation

;

		    04   A6	  10   A2  D0 0040F 	    MOVL    16(R2), 4(PSECTDEFREC)				      ; 1265

		    08   A6	  1B   A2  90 00414 	    MOVB    27(R2), 8(PSECTDEFREC)				      ; 1266

		         50	  1B   A2  9A 00419 	    MOVZBL  27(R2), R0						      ; 1267

      09   A6	    1C   A2	       50  28 0041D 	    MOVC3   R0, 28(R2), 9(PSECTDEFREC)				      ;

		         57	       6B  3C 00423 	    MOVZWL  GSDRECLNG, R7					      ;

		         53	       57  C0 00426 	    ADDL2   R7, R3						      ;

	   6B	         53	       56  A3 00429 	    SUBW3   PSECTDEFREC, R3, GSDRECLNG				      ; 1269

		         50	       01  D0 0042D 	    MOVL    #1, R0						      ; 1270

					   04 00430 	    RET     							      ;

				       50  D4 00431 3$:     CLRL    R0							      ; 1237

					   04 00433 	    RET     							      ;



; Routine Size:  118 bytes





;46800  1272	ROUTINE SYMRECOUT (SYMDESC) =

;46900  1273	BEGIN

;47000  1274	!

;47100  1275	! THIS ROUTINE BLOCKS SYMBOL DEFINITION RECORDS INTO GSD RECORDS

;47200  1276	! AND OUTPUTS THEM TO THE SYMBOL TABLE.

;47300  1277	!

;47400  1278	MAP SYMDESC : REF BLOCK[,BYTE];

;47500  1279	LOCAL	SYMDEFREC : REF BLOCK[,BYTE],

;47600  1280		SYMBOLSTRING : REF VECTOR[,BYTE],

;47700  1281		MASKLENGTH;

;47800  1282	IF (.SYMDESC[SYM$W_FLAGS] AND SYM$M_ENTMSK) NEQ 0			! IF THERE IS AN ENTRY

;47900  1283	THEN MASKLENGTH = 2							! MASK, SET THE EXTRA

;48000  1284	ELSE MASKLENGTH = 0;							! LENGTH

;48100  1285	IF (.GSDRECLNG+.MASKLENGTH+.SYMDESC[SYM$B_NAMLNG]+				! IF THIS SYMBOL WOULD

;48200  1286			OBJ$T_SDF_NAME) GTRU OBJ$C_MAXRECSIZ			! OVERFLOW THE CURRENT

;48300  1287	THEN BEGIN								! RECORD, THEN OUTPUT

;48400  1288		IF NOT OUTPUTREC(.GSDRECLNG)					! CURRENT RECORD AND

;48500  1289		THEN RETURN FALSE;						! EXIT ON ERROR

;48600  1290		GSDRECLNG = 0;							! RESET RECORD LENGTH

;48700  1291	     END;

;48800  1292	IF .GSDRECLNG EQL 0							! SET NEW RECORD AS A

;48900  1293	THEN BEGIN

;49000  1294		OBJRECORD[OBJ$B_RECTYP] = OBJ$C_GSD;				! GSD RECORD

;49100  1295		GSDRECLNG = 1;

;49200  1296	     END;

;49300  1297	SYMDEFREC = OBJRECORD[.GSDRECLNG];					! SET POINTER TO SYMBOL

;49400  1298	IF .MASKLENGTH NEQ 0							! DEFINITION RECORD AND

;49500  1299	THEN BEGIN								! TO SYMBOL NAME

;49600  1300		SYMDEFREC[EPM$W_MASK]=.SYMDESC[SYM$W_ENTMSK];			! STRING AND IF AN

;49700  1301		SYMBOLSTRING = SYMDEFREC[EPM$B_NAMLNG];				! ENTRY POINT DEFINITION

;49800  1302		SYMDEFREC[EPM$B_GSDTYP] = OBJ$C_GSD_EPM				! SET THE GSD TYPE

;49900  1303	     END								! ALSO COPY THE ENTRY

;50000  1304	ELSE BEGIN								! POINT MASK

;50100  1305		SYMBOLSTRING = SYMDEFREC[SDF$B_NAMLNG];				! DO LIKEWISE FOR

;50200  1306		SYMDEFREC[SDF$B_GSDTYP] = OBJ$C_GSD_SYM;			! ORDINARY SYMBOL

;50300  1307	     END;								! DEFINITION

;50400  1308	SYMDEFREC[SDF$B_DATYP] = .SYMDESC[SYM$B_DATYP];				! COPY DATA TYPE

;50500  1309	SYMDEFREC[SDF$W_FLAGS] = .SYMDESC[SYM$W_FLAGS] AND			! AND FLAGS WITHOUT THE

;50600  1310				 NOT (SYM$M_ENTMSK OR SYM$M_REDEF);		! INTERNAL BITS

;50610  1311	IF (.SYMDESC[SYM$W_FLAGS] AND SYM$M_REL) EQL 0				! IF ABSOLUTE P-SECTION



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-19

; Digital Equipment Corporation

;

;50620  1312	THEN SYMDEFREC[SDF$B_PSINDX] = 0					! SET OWNING P-SECT NUMBER = 0

;50700  1313	ELSE SYMDEFREC[SDF$B_PSINDX] = .CURPSECTNUM;				! SET OWNING P-SECT

;50800  1314	SYMDEFREC[SDF$L_VALUE] = .SYMDESC[SYM$L_VALUE];				! SYMBOL VALUE

;50900  1315	GSDRECLNG = .GSDRECLNG+CH$MOVE(.SYMDESC[SYM$B_NAMLNG]+1,		! COPY THE SYMBOL

;51000  1316				SYMDESC[SYM$B_NAMLNG],SYMBOLSTRING[0])-		! NAME (COUNTED STRING)

;51100  1317				.SYMDEFREC;					! AND UPDATE LENGTH

;51200  1318	RETURN TRUE;								! AND IT IS ALL

;51300  1319	END;									! DONE.











					 08FC 00434 SYMRECOUT:

							    .WORD   Save R2,R3,R4,R5,R6,R7,R11				      ; 1272

		         5B	0000'  CF  9E 00436 	    MOVAB   GSDRECLNG, R11					      ;

		         52	  04   AC  D0 0043B 	    MOVL    SYMDESC, R2						      ; 1282

	   05	    1E   A2	       0F  E1 0043F 	    BBC     #15, 30(R2), 1$					      ;

		         53	       02  D0 00444 	    MOVL    #2, MASKLENGTH					      ; 1283

				       02  11 00447 	    BRB     2$							      ; 1282

				       53  D4 00449 1$:     CLRL    MASKLENGTH						      ; 1284

		         50	       6B  3C 0044B 2$:     MOVZWL  GSDRECLNG, R0					      ; 1285

		         50	       53  C0 0044E 	    ADDL2   MASKLENGTH, R0					      ;

		         51	  08   A2  9A 00451 	    MOVZBL  8(R2), R1						      ;

		         50	       51  C0 00455 	    ADDL2   R1, R0						      ;

		         50	       00  C0 00458 	    ADDL2   #OBJ$T_SDF_NAME, R0					      ;

	      00000000G  8F	       50  D1 0045B 	    CMPL    R0, #OBJ$C_MAXRECSIZ				      ; 1286

				       0D  1B 00462 	    BLEQU   3$							      ;

		         7E	       6B  3C 00464 	    MOVZWL  GSDRECLNG, -(SP)					      ; 1288

		  0000V  CF	       01  FB 00467 	    CALLS   #1, OUTPUTREC					      ;

		         6A	       50  E9 0046C 	    BLBC    R0, 9$						      ;

				       6B  B4 0046F 	    CLRW    GSDRECLNG						      ; 1290

				       6B  B5 00471 3$:     TSTW    GSDRECLNG						      ; 1292

				       0B  12 00473 	    BNEQ    4$							      ;

	   50	    04   AB	       00  C1 00475 	    ADDL3   #OBJ$B_RECTYP, OBJRECORD, R0			      ; 1294

		         60	       00  90 0047A 	    MOVB    #OBJ$C_GSD, (R0)					      ;

		         6B	       01  B0 0047D 	    MOVW    #1, GSDRECLNG					      ; 1295

		         56	       6B  3C 00480 4$:     MOVZWL  GSDRECLNG, SYMDEFREC				      ; 1297

		         56	  04   AB  C0 00483 	    ADDL2   OBJRECORD, SYMDEFREC				      ;

				       53  D5 00487 	    TSTL    MASKLENGTH						      ; 1298

				       0E  13 00489 	    BEQL    5$							      ;

		    09   A6	  1C   A2  B0 0048B 	    MOVW    28(R2), 9(SYMDEFREC)				      ; 1300

	   51	         56	       0B  C1 00490 	    ADDL3   #11, SYMDEFREC, SYMBOLSTRING			      ; 1301

		         66	       00  90 00494 	    MOVB    #OBJ$C_GSD_EPM, (SYMDEFREC)				      ; 1302

				       07  11 00497 	    BRB     6$							      ; 1298

		         51	  09   A6  9E 00499 5$:     MOVAB   9(SYMDEFREC), SYMBOLSTRING				      ; 1305

		         66	       00  90 0049D 	    MOVB    #OBJ$C_GSD_SYM, (SYMDEFREC)				      ; 1306

		    01   A6	  20   A2  90 004A0 6$:     MOVB    32(R2), 1(SYMDEFREC)				      ; 1308

      02   A6	    1E   A2	9000   8F  AB 004A5 	    BICW3   #36864, 30(R2), 2(SYMDEFREC)			      ; 1309

	   05	    1E   A2	       03  E0 004AD 	    BBS     #3, 30(R2), 7$					      ; 1311

				  04   A6  94 004B2 	    CLRB    4(SYMDEFREC)					      ; 1312

				       05  11 004B5 	    BRB     8$							      ; 1311

		    04   A6	  02   AB  90 004B7 7$:     MOVB    CURPSECTNUM, 4(SYMDEFREC)				      ; 1313

		    05   A6	       62  D0 004BC 8$:     MOVL    (R2), 5(SYMDEFREC)					      ; 1314

		         50	  08   A2  9A 004C0 	    MOVZBL  8(R2), R0						      ; 1315



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-20

; Digital Equipment Corporation

;

				       50  D6 004C4 	    INCL    R0							      ;

	   61	    08   A2	       50  28 004C6 	    MOVC3   R0, 8(R2), (SYMBOLSTRING)				      ;

		         57	       6B  3C 004CB 	    MOVZWL  GSDRECLNG, R7					      ;

		         53	       57  C0 004CE 	    ADDL2   R7, R3						      ;

	   6B	         53	       56  A3 004D1 	    SUBW3   SYMDEFREC, R3, GSDRECLNG				      ; 1316

		         50	       01  D0 004D5 	    MOVL    #1, R0						      ; 1318

					   04 004D8 	    RET     							      ;

				       50  D4 004D9 9$:     CLRL    R0							      ; 1272

					   04 004DB 	    RET     							      ;



; Routine Size:  168 bytes





;51400  1320	ROUTINE OUTPUTREC(RECLNG) =

;51500  1321	BEGIN

;51600  1322	!

;51700  1323	!	THIS ROUTINE HANDLES THE ACTUAL RECORD OUTPUT TO THE

;51800  1324	!	FILE(S) RECEIVING SYMBOL TABLE RECORDS. ERROR DETECTION 

;51900  1325	!	OCCURS HERE BUT THE HANDLING IS DONE IN THE FILE CLOSING

;52000  1326	!	ROUTINE.

;52100  1327	!

;52200  1328	LOCAL	RMSERROR;						! ERROR CODE RETURNED BY RMS

;52300  1329	!

;52400  1330	IF .RECLNG EQL 0 THEN RETURN TRUE;				! SUCCESSFUL RETURN IF NO RECORD

;52500  1331	IF .STBFILEIFI NEQ 0						! IF A SYMBOL TABLE FILE WAS SUCCESSFULLY

;52600  1332	THEN BEGIN							! OPENED

;52700  1333		STBRAB[RAB$W_RSZ] = .RECLNG;				! SET THE RECORD LENGTH

;52800  1334		IF NOT (RMSERROR = $PUT(RAB=STBRAB))			! THEN OUTPUT THE RECORD

;52900  1335		THEN BEGIN						! BUT IF IT FAILS

;52910  1336			LNK$ERRMSG(.RMSERROR AND NOT 7,SEV$C_INFOR,

;52920  1337				.STBRAB[RAB$L_STV]);

;53000  1338			LNK$CLOSYMOUT(.STBAUXFNB,.RMSERROR);		! GO ISSUE ERROR AND CLOSE THE FILE

;53100  1339			LNK$GB_MAXERCOD<7,1,0> = TRUE;			! FLAG BAD OUTPUT FILE

;53200  1340			IF .IMGAUXFNB EQL 0 THEN RETURN FALSE;		! AND IF NO SYMBOLS TO IMAGE ALL OVER NOW

;53300  1341		     END

;53400  1342		ELSE LNK$GW_SYMRECS = .LNK$GW_SYMRECS + 1;		! IF OK, COUNT THE RECORD.

;53500  1343	     END;

;53600  1344	!

;53700  1345	IF .IMGAUXFNB EQL 0 THEN RETURN TRUE;				! RETURN IF NO MORE TO DO (OR NOTHING)

;53800  1346	LNK$AL_IMGRAB[RAB$W_RSZ] = .RECLNG;				! SET RECORD SIZE FOR IMAGE RAB

;53900  1347	IF NOT (RMSERROR = $PUT(RAB = LNK$AL_IMGRAB))			! AND OUTPUT IT

;54000  1348	THEN BEGIN							! BUT IF IT FAILS GO HANDLE THE ERROR

;54010  1349		LNK$ERRMSG(.RMSERROR AND NOT 7,SEV$C_INFOR,

;54020  1350				.LNK$AL_IMGRAB[RAB$L_STV]);

;54100  1351		LNK$CLOSYMOUT(.IMGAUXFNB,.RMSERROR);			! AND CLOSE THE FILE

;54200  1352		LNK$GB_MAXERCOD<7,1,0> = TRUE;				! FLAG BAD OUTPUT FILE

;54300  1353		IF .STBFILEIFI EQL 0 THEN RETURN FALSE;			! IF THERE IS NO SYMBOL TABLE FILE ALL OVER NOW

;54400  1354	     END

;54800  1355	ELSE LNK$GW_GSTRECS = .LNK$GW_GSTRECS + 1;			! IF OK, COUNT THE RECORD

;55100  1356	RETURN TRUE;							! AND ALL DONE

;55200  1357	END;







							    .GLOBL  SYS$PUT



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-21

; Digital Equipment Corporation

;



					 0E0C 004DC OUTPUTREC:

							    .WORD   Save R2,R3,R9,R10,R11				      ; 1320

		         59	       00  D0 004DE 	    MOVL    #SEV$C_INFOR, R9					      ;

		         5A 00000000G  9F  9E 004E1 	    MOVAB   @#SYS$PUT, R10					      ;

		         5B	0000'  CF  9E 004E8 	    MOVAB   IMGAUXFNB, R11					      ;

		         53	  04   AC  D0 004ED 	    MOVL    RECLNG, R3						      ; 1330

				       7E  13 004F1 	    BEQL    4$							      ;

				  F4   AB  D5 004F3 	    TSTL    STBFILEIFI						      ; 1331

				       39  13 004F6 	    BEQL    2$							      ;

		    D2   AB	       53  B0 004F8 	    MOVW    R3, STBRAB+34					      ; 1333

				  B0   AB  9F 004FC 	    PUSHAB  STBRAB						      ; 1334

		         6A	       01  FB 004FF 	    CALLS   #1, SYS$PUT						      ;

		         52	       50  D0 00502 	    MOVL    R0, RMSERROR					      ;

		         25	       52  E8 00505 	    BLBS    RMSERROR, 1$					      ;

				  BC   AB  DD 00508 	    PUSHL   STBRAB+12						      ; 1336

		         7E	       59  9A 0050B 	    MOVZBL  R9, -(SP)						      ;

	   7E	         52	       07  CB 0050E 	    BICL3   #7, RMSERROR, -(SP)					      ;

		  0000G  CF	       03  FB 00512 	    CALLS   #3, LNK$ERRMSG					      ;

				       52  DD 00517 	    PUSHL   RMSERROR						      ; 1338

				  AC   AB  DD 00519 	    PUSHL   STBAUXFNB						      ;

		  0000V  CF	       02  FB 0051C 	    CALLS   #2, LNK$CLOSYMOUT					      ;

		  0000G  CF	  80   8F  88 00521 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1339

				       6B  D5 00527 	    TSTL    IMGAUXFNB						      ; 1340

				       06  12 00529 	    BNEQ    2$							      ;

				       48  11 0052B 	    BRB     5$							      ;

				0000'  CF  B6 0052D 1$:     INCW    LNK$GW_SYMRECS					      ; 1342

				       6B  D5 00531 2$:     TSTL    IMGAUXFNB						      ; 1345

				       3C  13 00533 	    BEQL    4$							      ;

		  0000G  CF	       53  B0 00535 	    MOVW    R3, LNK$AL_IMGRAB+34				      ; 1346

				0000G  CF  9F 0053A 	    PUSHAB  LNK$AL_IMGRAB					      ; 1347

		         6A	       01  FB 0053E 	    CALLS   #1, SYS$PUT						      ;

		         52	       50  D0 00541 	    MOVL    R0, RMSERROR					      ;

		         26	       52  E8 00544 	    BLBS    RMSERROR, 3$					      ;

				0000G  CF  DD 00547 	    PUSHL   LNK$AL_IMGRAB+12					      ; 1349

		         7E	       59  9A 0054B 	    MOVZBL  R9, -(SP)						      ;

	   7E	         52	       07  CB 0054E 	    BICL3   #7, RMSERROR, -(SP)					      ;

		  0000G  CF	       03  FB 00552 	    CALLS   #3, LNK$ERRMSG					      ;

				       52  DD 00557 	    PUSHL   RMSERROR						      ; 1351

				       6B  DD 00559 	    PUSHL   IMGAUXFNB						      ;

		  0000V  CF	       02  FB 0055B 	    CALLS   #2, LNK$CLOSYMOUT					      ;

		  0000G  CF	  80   8F  88 00560 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1352

				  F4   AB  D5 00566 	    TSTL    STBFILEIFI						      ; 1353

				       06  12 00569 	    BNEQ    4$							      ;

				       08  11 0056B 	    BRB     5$							      ;

				0000'  CF  B6 0056D 3$:     INCW    LNK$GW_GSTRECS					      ; 1355

		         50	       01  D0 00571 4$:     MOVL    #1, R0						      ; 1356

					   04 00574 	    RET     							      ;

				       50  D4 00575 5$:     CLRL    R0							      ; 1320

					   04 00577 	    RET     							      ;



; Routine Size:  156 bytes





;55300  1358	GLOBAL ROUTINE LNK$CLOSYMOUT(AUXFNB,ERRORCODE) : NOVALUE =



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-22

; Digital Equipment Corporation

;

;55400  1359	BEGIN

;55500  1360	!

;55600  1361	!	THIS ROUTINE HANDLES ERRORS WRITING THE SYMBOL TABLE RECORDS

;55700  1362	!	AND/OR CLOSES THE DESIRED FILE(S).

;55800  1363	!

;55900  1364	!	IF "AUXFNB" IS ZERO - BOTH FILES (IF BOTH EXIST) ARE CLOSED

;56000  1365	!	OTHERWISE "AUXFNB" IS THE ADDRESS OF THE AUXILIARY FILENAME BLOCK

;56100  1366	!	OF THE FILE ON WHICH AN ERROR OCCURRED AND ERRORCODE IS THE RMS

;56200  1367	!	ERROR CODE RETURNED. THE WRITE ERROR MESSAGE IS OUTPUT AND THE

;56300  1368	!	FILE IS CLOSED.

;56350  1369	!

;56360  1370	!	WHEN OUTPUTTING RECORDS TO THE GST OF AN IMAGE, THE IMAGE FILE

;56370  1371	!	IS NOT ACTUALLY CLOSED (EXCEPT ON ERRORS). ITS ATTRIBUTES ARE MERELY

;56380  1372	!	MODIFIED (BACK TO FIXED 512 BYTE RECORD) AND IT IS LEFT OPEN SINCE

;56390  1373	!	THE IMAGE HEADER NEEDS TO BE WRITTEN AFTER THE GST IS DONE.

;56400  1374	!

;56500  1375	MAP	AUXFNB : REF BLOCK[,BYTE];

;56600  1376	!

;56700  1377	LOCAL	FABLOCK : BLOCK[FAB$C_BLN,BYTE],			! FAB FOR CLOSE AND MODIFY OPERATIONS

;56800  1378		FILENAME : VECTOR[2],					! FILENAME DESCRIPTOR

;56900  1379		CLOSERROR;						! ERROR CODE IF CLOSE FAILS

;57000  1380	!

;57100  1381	CH$FILL(0,FAB$C_BLN,FABLOCK);					! ZERO THE FAB

;57200  1382	FABLOCK[FAB$B_BLN] = FAB$C_BLN;					! IDENTIFY IT AS A FAB

;57300  1383	FABLOCK[FAB$B_BID] = FAB$C_BID;					! WITH ID AND LENGTH

;57400  1384	IF .AUXFNB NEQ 0						! IF THE WAS AN ERROR CALL

;57500  1385	THEN BEGIN							!

;57600  1386		FILENAME[0] = .AUXFNB[NAM$B_RSL];			! SET UP THE FILENAME

;57700  1387		FILENAME[1] = .AUXFNB[NAM$L_RSA];			! DESCRIPTOR

;57800  1388		LNK$ERRMSG(ERM$C_WRTERR,SEV$C_DIAG,FILENAME[0],.ERRORCODE);! AND OUTPUT ERROR

;57900  1389	     END;

;58000  1390	IF .AUXFNB EQL 0						! IF WE ARE CLOSING BOTH FILES

;58100  1391	OR .AUXFNB EQL .STBAUXFNB					! OR THE SYMBOL TABLE FILE ONLY

;58200  1392	THEN IF (FABLOCK[FAB$W_IFI] = .STBFILEIFI) NEQ 0		! IF IT IS STILL OPEN

;58300  1393	     THEN BEGIN

;58400  1394			IF NOT (CLOSERROR = $CLOSE(FAB=FABLOCK))	! ATTEMPT TO CLOSE IT

;58500  1395			THEN BEGIN

;58600  1396				LNK$ERRMSG(ERM$C_CLOSERR,SEV$C_DIAG,	! AND OUTPUT AN ERROR IF THAT

;58700  1397				.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA],	! DOES NOT WORK

;58800  1398				.CLOSERROR);

;58900  1399				LNK$GB_MAXERCOD<7,1,0> = TRUE;		! FLAG BAD OUTPUT FILE

;59000  1400			     END;

;59100  1401			STBFILEIFI = 0;					! AND FORGET THE FILE IN ANY CASE

;59200  1402			IF .AUXFNB NEQ 0 THEN RETURN;			! RETURN IF THAT WAS ALL

;59300  1403		  END;

;59400  1404	IF .IMGAUXFNB NEQ 0						! IF SYMBOLS ARE ALSO GOING TO IMAGE

;59500  1405	THEN BEGIN							! THEN SET UP TO MODIFY THE

;59600  1406		FABLOCK[FAB$W_IFI] = .LNK$GW_IMGIFI;			! THE ATTRIBUTES OF THIS FILE

;59700  1407		FABLOCK[FAB$B_RFM] = FAB$C_FIX;				! BACK TO FIXED LENGTH

;59800  1408		FABLOCK[FAB$W_MRS] = 512;				! 512 BYTE RECORDS IN THE

;59900  1409		FABLOCK[FAB$V_ESC] = TRUE;				! RMS DATA BASE

;60000  1410		FABLOCK[FAB$L_CTX] = RME$C_SETRFM;			! SO THAT IT WILL HAVE

;60100  1411		IF (CLOSERROR = $MODIFY(FAB = FABLOCK))			! THE ATTRIBUTES OF AN IMAGE

;60200  1412		THEN BEGIN

;60400  1413			IF .AUXFNB NEQ 0				! DONT'T CLOSE IT IF MODIFIED OK



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-23

; Digital Equipment Corporation

;

;60410  1414			THEN LNK$CLOSIMGFIL();				! ONLY IF ERROR SITUATION

;60500  1415			IMGAUXFNB = 0;					!

;60600  1416			RETURN;						! AND ALL DONE

;60700  1417		     END

;60800  1418		ELSE BEGIN						! ON CLOSE FAILURE PRODUCE

;60900  1419			LNK$ERRMSG(ERM$C_CLOSERR,SEV$C_DIAG,		! AN ERROR MESSAGE

;61000  1420				.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA],	! 

;61100  1421				.CLOSERROR);				!

;61110  1422			LNK$ERRMSG(.CLOSERROR AND NOT 7,SEV$C_INFOR,

;61120  1423				.FABLOCK[FAB$L_STV]);

;61200  1424			LNK$GB_MAXERCOD<7,1,0> = TRUE;			! FLAG BAD OUTPUT FILE

;61300  1425			LNK$GW_IMGIFI = 0;				! THEN FORGET IT ANYWAY

;61400  1426			IMGAUXFNB = 0;

;61500  1427			RETURN;

;61600  1428		     END;

;61700  1429	     END;

;61800  1430	END;







							    .GLOBL  SYS$CLOSE



					 0F3C 00578 	    .ENTRY  LNK$CLOSYMOUT, Save R2,R3,R4,R5,R8,R9,R10,R11	      ; 1358

		         58 00000000G  8F  D0 0057A 	    MOVL    #ERM$C_CLOSERR, R8					      ;

		         59	0000G  CF  9E 00581 	    MOVAB   LNK$ERRMSG, R9					      ;

		         5A	0000'  CF  9E 00586 	    MOVAB   STBFILEIFI, R10					      ;

		         5B	       00  D0 0058B 	    MOVL    #SEV$C_DIAG, R11					      ;

		         5E	  A8   AE  9E 0058E 	    MOVAB   -88(SP), SP						      ;

	   00	         6E	       00  2C 00592 	    MOVC5   #0, (SP), #0, #80, FABLOCK				      ; 1381

		    08   AE	0050   8F     00596									      ;

		    08   AE	5003   8F  B0 0059B 	    MOVW    #20483, FABLOCK					      ; 1383

		         52	  04   AC  D0 005A1 	    MOVL    AUXFNB, R2						      ; 1384

				       54  D4 005A5 	    CLRL    R4							      ;

				       52  D5 005A7 	    TSTL    R2							      ;

				       1B  13 005A9 	    BEQL    1$							      ;

				       54  D6 005AB 	    INCL    R4							      ;

		         6E	  03   A2  9A 005AD 	    MOVZBL  3(R2), FILENAME					      ; 1386

		    04   AE	  04   A2  D0 005B1 	    MOVL    4(R2), FILENAME+4					      ; 1387

				  08   AC  DD 005B6 	    PUSHL   ERRORCODE						      ; 1388

				  04   AE  9F 005B9 	    PUSHAB  FILENAME						      ;

		         7E	       5B  9A 005BC 	    MOVZBL  R11, -(SP)						      ;

		         7E	  00G  8F  9A 005BF 	    MOVZBL  #ERM$C_WRTERR, -(SP)				      ;

		         69	       04  FB 005C3 	    CALLS   #4, LNK$ERRMSG					      ;

				       52  D5 005C6 1$:     TSTL    R2							      ; 1390

				       06  13 005C8 	    BEQL    2$							      ;

		    B8   AA	       52  D1 005CA 	    CMPL    R2, STBAUXFNB					      ; 1391

				       38  12 005CE 	    BNEQ    4$							      ;

		         50	       6A  D0 005D0 2$:     MOVL    STBFILEIFI, R0					      ; 1392

		    0A   AE	       50  B0 005D3 	    MOVW    R0, FABLOCK+2					      ;

				       50  D5 005D7 	    TSTL    R0							      ;

				       2D  13 005D9 	    BEQL    4$							      ;

				  08   AE  9F 005DB 	    PUSHAB  FABLOCK						      ; 1394

	      00000000G  9F	       01  FB 005DE 	    CALLS   #1, @#SYS$CLOSE					      ;

		         53	       50  D0 005E5 	    MOVL    R0, CLOSERROR					      ;

		         18	       53  E8 005E8 	    BLBS    CLOSERROR, 3$					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-24

; Digital Equipment Corporation

;

				       53  DD 005EB 	    PUSHL   CLOSERROR						      ; 1396

				  04   A2  DD 005ED 	    PUSHL   4(R2)						      ;

		         7E	  03   A2  9A 005F0 	    MOVZBL  3(R2), -(SP)					      ;

		         7E	       5B  9A 005F4 	    MOVZBL  R11, -(SP)						      ;

		         7E	       58  9A 005F7 	    MOVZBL  R8, -(SP)						      ;

		         69	       05  FB 005FA 	    CALLS   #5, LNK$ERRMSG					      ;

		  0000G  CF	  80   8F  88 005FD 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1399

				       6A  D4 00603 3$:     CLRL    STBFILEIFI						      ; 1401

		         63	       54  E8 00605 	    BLBS    R4, 7$						      ; 1402

				  0C   AA  D5 00608 4$:     TSTL    IMGAUXFNB						      ; 1404

				       5E  13 0060B 	    BEQL    7$							      ;

		    0A   AE	0000G  CF  B0 0060D 	    MOVW    LNK$GW_IMGIFI, FABLOCK+2				      ; 1406

		    27   AE	       01  90 00613 	    MOVB    #1, FABLOCK+31					      ; 1407

		    3E   AE	0200   8F  B0 00617 	    MOVW    #512, FABLOCK+54					      ; 1408

		    0F   AE	       08  88 0061D 	    BISB2   #8, FABLOCK+4					      ; 1409

		    20   AE	       01  D0 00621 	    MOVL    #1, FABLOCK+24					      ; 1410

				  08   AE  9F 00625 	    PUSHAB  FABLOCK						      ; 1411

	      00000000G  9F	       01  FB 00628 	    CALLS   #1, @#SYS$MODIFY					      ;

		         53	       50  D0 0062F 	    MOVL    R0, CLOSERROR					      ;

		         0A	       53  E9 00632 	    BLBC    CLOSERROR, 5$					      ;

		         30	       54  E9 00635 	    BLBC    R4, 6$						      ; 1413

		  0000G  CF	       00  FB 00638 	    CALLS   #0, LNK$CLOSIMGFIL					      ; 1414

				       29  11 0063D 	    BRB     6$							      ; 1415

				       53  DD 0063F 5$:     PUSHL   CLOSERROR						      ; 1419

				  04   A2  DD 00641 	    PUSHL   4(R2)						      ;

		         7E	  03   A2  9A 00644 	    MOVZBL  3(R2), -(SP)					      ;

		         7E	       5B  9A 00648 	    MOVZBL  R11, -(SP)						      ;

		         7E	       58  9A 0064B 	    MOVZBL  R8, -(SP)						      ;

		         69	       05  FB 0064E 	    CALLS   #5, LNK$ERRMSG					      ;

				  14   AE  DD 00651 	    PUSHL   FABLOCK+12						      ; 1422

		         7E	       00  9A 00654 	    MOVZBL  #SEV$C_INFOR, -(SP)					      ;

	   7E	         53	       07  CB 00657 	    BICL3   #7, CLOSERROR, -(SP)				      ;

		         69	       03  FB 0065B 	    CALLS   #3, LNK$ERRMSG					      ;

		  0000G  CF	  80   8F  88 0065E 	    BISB2   #128, LNK$GB_MAXERCOD				      ; 1424

				0000G  CF  B4 00664 	    CLRW    LNK$GW_IMGIFI					      ; 1425

				  0C   AA  D4 00668 6$:     CLRL    IMGAUXFNB						      ; 1426

					   04 0066B 7$:     RET     							      ; 1358



; Routine Size:  244 bytes





;61900  1431	END ELUDOM					! END OF MODULE













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $GLOBAL$       	     4    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $OWN$          	   112    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $LNK_RO_DATA$  	    43  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)



; Bliss-32 7.352	Saturday 22-AUG-1978 05:01:30	DBB3:[LINKER.SRC]LNKSYMOUT.B32;7				Page 2-25

; Digital Equipment Corporation

;

;  $PLIT$         	    32  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $CODE$         	  1644  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        50         0       257











; Size:		1644 code + 191 data bytes

; Run Time:	01:21.8

; Elapsed Time:	01:28.1

; Memory Used:	474 pages

; Compilation Complete

