

; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 1

; Digital Equipment Corporation

;

;00100  0001	MODULE LNK_PROCSHRIM (	! PROCESS SHAREABLE IMAGES ON PASS 1

;00200  0002			IDENT = 'X01.03'

;00300  0003			) =

;00400  0004	BEGIN

;00500  0005	!

;00600  0006	! COPYRIGHT (C) 1977, 1978

;00700  0007	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;00800  0008	!

;00900  0009	! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

;01000  0010	! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

;01100  0011	! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

;01200  0012	! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

;01300  0013	! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

;01400  0014	! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

;01500  0015	! REMAIN IN DEC.

;01600  0016	!

;01700  0017	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

;01800  0018	! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

;01900  0019	! CORPORATION.

;02000  0020	!

;02100  0021	! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

;02200  0022	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

;02300  0023	!

;02400  0024	!++

;02500  0025	! FACILITY:	LINKER

;02600  0026	!

;02700  0027	! ABSTRACT:	THIS MODULE CONTAINS THE ROUTINES TO READ SHAREABLE

;02800  0028	!			IMAGES ON PASS 1.

;02900  0029	!

;03000  0030	!

;03100  0031	! ENVIRONMENT:	VMS NATIVE MODE

;03200  0032	!

;03300  0033	! AUTHOR:	T.J. PORTER, CREATION DATE: 15-DEC-77

;03400  0034	!

;03500  0035	! MODIFICATIONS:

;03600  0036	! NO.	DATE		PROGRAMMER	PURPOSE

;03700  0037	! ---	----		----------	-------

;03710  0038	! 001	21-APR-78	T.J. PORTER	REQUIRE FILE CLEAN UP

;03720  0039	! 002	14-MAY-78	T.J. PORTER	RE-WORK TO TREAT SHAREABLE IMAGES AS

;03730  0040	!						CLUSTERS

;03740  0041	! 003	07-JUL-78	T.J. PORTER	IF MATCH CONTROL=NEVER THEN COPY THE IMAGE

;03800  0042	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2

; Digital Equipment Corporation

;

;03900  0043	     

;04000  0044	!

;04100  0045	! TABLE OF CONTENTS:

;04200  0046	!

;04300  0047	FORWARD ROUTINE

;04400  0048		READNEXTBLOCK;				! READS THE NEXT HEADER BLOCK OF IMAGE

;04500  0049	!

;04600  0050	! INCLUDE FILES:

;04700  0051	!

;04800  0052	LIBRARY

;04900  0053		'SYS$LIBRARY:LIB.L32';			! VMS SYSTEM STRUCTURE DEFINITIONS

;05200  0054	REQUIRE

;05300  0055		'PREFIX';		! USEFUL GENERAL MACROS

;05400  0247	REQUIRE

;05500  0248		'DATBAS';		! INTERNAL DATA BASE DEFINITIONS

;05600  0480	REQUIRE

;05700  0481		'ISGENC';		! IMAGE SECTION PARAMETERS

;05800  1058	!

;05900  1059	! MACROS:

;06000  1060	!

;06100  1061	!	NONE

;06200  1062	!

;06300  1063	! EQUATED SYMBOLS:

;06400  1064	!

;06500  1065	!	NONE

;06600  1066	!

;06700  1067	! EXTERNAL REFERENCES:

;06800  1068	!

;06900  1069	EXTERNAL ROUTINE

;07000  1070		LNK$ALLOBLK : NOVALUE,			! DYNAMIC MEMORY ALLOCATOR

;07005  1071		LNK$ALLOVIRMEM,				! ALLOCATE FREE USER VIRTUAL SPACE

;07100  1072		LNK$CLOSCURFIL : NOVALUE,		! CLOSE CURRENT INPUT FILE

;07150  1073		LNK$DIAG,

;07200  1074		LNK$ERRMSG : NOVALUE,			! ERROR MESSAGE HANDLER

;07300  1075		LNK$POINTOBJ : NOVALUE,			! POINTS TO NEW PLACE IN FILE

;07400  1076		LNK$PROCSOBJ;				! PROCESSES OBJECT MODULES (I.E. THE GST)

;07500  1077	EXTERNAL LITERAL

;07600  1078		ERM$C_BADIMGHDR : BYTLIT,		! BAD IMAGE HEADER ERROR MESSAGE

;07605  1079		ERM$C_CONFMEM : BYTLIT,			! CONFLICTING MEMORY REQUIREMENTS

;07700  1080		ERM$C_REDERR : BYTLIT,			! READ ERROR

;07800  1081		ERM$C_UNMCOD : BYTLIT,			! MESSAGE WITH USER FILE NAME

;07810  1082		LNK$S_PICIMG : SHORT,			! IMAGE BEING BUILT IS PIC

;07900  1083		SEV$C_FATAL : SHORT,			! FATAL ERROR SEVEIRTY CODE

;08000  1084		SEV$C_INFOR : SHORT;			! INFORMATIONAL MESSAGE SEVERITY

;08100  1085	EXTERNAL

;08200  1086		LNK$AL_RAB : BLOCK[,BYTE],		! RAB FOR OPEN IMAGE FILE

;08300  1087		LNK$GW_NISECTS : WORD,			! IMAGE SECTION ACCUMULATOR

;08400  1088		LNK$GB_PASS : BYTE,			! CURRENT PASS

;08500  1089		LNK$GL_CURFIL : REF BLOCK[,BYTE],	! CURRENT FILE POINTER

;08600  1090		LNK$GL_CURCLU : REF BLOCK[,BYTE],	! CURRENT CLUSTER DESCRIPTOR

;08610  1091		LNK$GL_CTLMSK,				! CONTROL FLAGS

;08700  1092		LNK$GL_OBJRECS;				! COUNT OF OBJECT RECORDS

;08800  1093	!

;08900  1094	! MODULE OWN STORAGE:

;09000  1095	!



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-1

; Digital Equipment Corporation

;

;09100  1096	GLOBAL

;09150  1097		LNK$GL_GSBUFDSC : VECTOR[3],		! BUFFER DESCRIPTOR FOR COPIED GLOBAL SECTIONS

;09200  1098		LNK$GL_IMGRECS;				! COUNT OF IMAGE RECORDS

;09400  1099	OWN

;09410  1100		CURISDSEQ : VECTOR[4,BYTE] INITIAL(

;09420  1101					%ASCII '_000'),	! SUFFIX TO SCLUSTER NAME GIVING GBL ISD NAME

;09500  1102		HDRBLKCNT,				! NUMBER REMAINING HEADER BLOCKS

;09600  1103		HEADERBLOCK,				! CURRENT HEADER VBN

;09700  1104		GSTVBN : BLOCK[6,BYTE];			! RFA OF IMAGE GST

;09710  1105	LITERAL

;09720  1106		FILENAMELEN = 9;			! LENGTH OF A FILE NAME

;09730  1107	!

;10100  1108	GLOBAL ROUTINE LNK$PROCSHRIM(MODRFA)  =	!

;10200  1109	BEGIN

;10300  1110	!++

;10400  1111	! FUNCTIONAL DESCRIPTION:

;10500  1112	!			THIS ROUTINE IS CALLED TO PROCESS SHAREABLE IMAGES ON PASS

;10600  1113	!	ONE OF THE LINK. IT READS AND VALIDATES EVERY BLOCK OF THE IMAGE HEADER

;10700  1114	!	BUILDING THE LIST OF IMAGE SECTION DESCRIPTORS. AFTER COMPLETING THE HEADER

;10800  1115	!	IT SETS THE RAB POINTING TO THE SYMBOL TABLE PART OF THE IMAGE FILE AND

;10900  1116	!	CALLS LNK$PROCSOBJ TO DO THE PASS ONE OBJECT MODULE PROCESSING

;11000  1117	!	OF THE SYMBOL TABLE.

;11100  1118	!			THE SYMBOL TABLE OF A SHAREABLE IMAGE CONTAINS ALL THE UNIVERSAL

;11200  1119	!	SYMBOLS DEFINED FOR THE IMAGE AND IS IN THE OBJECT MODULE FORMAT.

;11300  1120	!

;11400  1121	! FORMAL PARAMETERS:

;11500  1122	!	MODRFA IS A POINTER TO THE 6 BYTE RFA OF THE SHAREABLE IMAGE IF

;11600  1123	!	IT IS IN A LIBRARY. IF NOT A LIBRARY SHAREABLE IMAGE THE ARGUMENT

;11700  1124	!	DOES NOT EXIST.

;11800  1125	!

;11900  1126	! IMPLICIT INPUTS:

;12000  1127	!	SEE ABOVE EXTERNAL DECLARATIONS.

;12100  1128	!	IN ADDITION THE FILE CONTAINING THE IMAGE IS ALREADY OPEN

;12200  1129	!	FOR BLOCK READ OPERATIONS.

;12300  1130	!

;12400  1131	! IMPLICIT OUTPUTS:

;12500  1132	!	SEE ABOVE GLOBAL DECLARATIONS.

;12600  1133	!	IN ADDITION ALL IMAGE SECTIONS FOUND IN THIS SHAREABLE IMAGE

;12700  1134	!	ARE APPENDED TO THE LIST AND THE GST HAS BEEN PROCESSED AS AN OBJECT

;12800  1135	!	MODULE. THAT IS ALL UNIVERSAL SYMBOLS ARE IN THE LINKER SYMBOL TABLE.

;12900  1136	!

;13000  1137	! ROUTINE VALUE:

;13100  1138	!	RETURNS VALUE TRUE IF SUCCESSFULLY PROCESSED, ELSE FALSE

;13200  1139	!

;13300  1140	! SIDE EFFECTS:

;13400  1141	!	THE ROUTINE DOES NOT RETURN IF A FATAL ERROR IS DETECTED.

;13500  1142	!

;13600  1143	!--

;13700  1144	!

;13800  1145	BUILTIN	ACTUALCOUNT;						! GETS COUNT OF ARGUMENTS

;13900  1146	!

;14000  1147	LOCAL	NXTISDOFF,						! OFFSET TO NEXT ISD

;14100  1148		BLOCKOFFSET,						! OFFSET IN FILE TO FIRST HEADER BLOCK

;14110  1149		FILENAME,				! POINTER TO FILENAME

;14120  1150		ISECTIDENT,				! MAJOR AND MINOR ID FROM HEADER



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-2

; Digital Equipment Corporation

;

;14200  1151		SYMDBGDATDSC : REF BLOCK[,BYTE],			! POINTER TO SYMBOL TABLE DESCRIPTOR

;14300  1152		GSTRECS,						! NUMBER OF RECORDS IN SYMBOL TABLE

;14400  1153		CURHDRISD : REF BLOCK[,BYTE],				! POINTER TO CURRENT ISD IN HEADER

;14500  1154		CURISD : REF BLOCK[,BYTE],				! POINTER TO CURRENT ISD BEING BUILT

;14550  1155		NEWHDRISD : REF BLOCK[,BYTE],				! POINTER TO HEADER PART OF CURRENT ISD BEING BUILT

;14600  1156		SAVERECOUNT,						! SAVED RECORD COUNT WHILE IN OBJPS1

;14700  1157		MAXISDVBN;						! LAST IMAGE VBN + 1

;14800  1158	!

;14900  1159	MAP	MODRFA : REF BLOCK[,BYTE];				! POINTER TO BLOCK

;15000  1160	!

;15100  1161	BIND	AUXFNB = LNK$GL_CURFIL[FDB$AL_AUXFNB]			! AUXILIARY FILENAME BLOCK PART OF

;15200  1162				: BLOCK[,BYTE],				! OF CURRENT FILE DESCRIPTOR

;15300  1163		HEADER = LNK$AL_RAB[RAB$L_UBF] : REF BLOCK[,BYTE],	! POINTER TO BLOCK BUFFER

;15310  1164		LASTISD = LNK$GL_CURCLU[CLU$L_LSTISD] : REF BLOCK[,BYTE]; ! POINTER TO LAST ISD IN CLUSTER

;15400  1165	!

;15500  1166	IF ACTUALCOUNT() EQL 0						! IF CALLED WITH NO ARGUMENTS

;15600  1167	THEN BLOCKOFFSET = 0						! HEADER AT START OF FILE

;15700  1168	ELSE BLOCKOFFSET = .MODRFA[MODVBN] - 1;				! OTHERWISE GET OFFSET

;15800  1169	HEADERBLOCK = .BLOCKOFFSET;					! AND SET FOR FIRST BLOCK READ

;15900  1170	HDRBLKCNT = 1;							! MUST BE AT LEAST ONE BLOCK

;16000  1171	NXTISDOFF = -1;							! NEXT ISD IS ON NEXT BLOCK

;16100  1172	MAXISDVBN = 0;							! RESET LAST BLOCK OF IMAGE

;16110  1173	CH$FILL(%C'0',3,CURISDSEQ[1]);					! INITIALIZE THE ISD NAME SUFFIX

;16120  1174	IF (FILENAME = 1 + CH$FIND_CH(.AUXFNB[NAM$B_RSL],		! SET FILE NAME POINTER TO THE

;16130  1175				.AUXFNB[NAM$L_RSA],%C']')) EQL 1	! CHARACTER BEYOND THE DIRECTORY

;16140  1176	THEN FILENAME = 1 + CH$FIND_CH(.AUXFNB[NAM$B_RSL],		! STRING WHICH IS TERMINATED WITH

;16150  1177				.AUXFNB[NAM$L_RSA],%C'>');		! A ] OR >

;16160  1178	LNK$GL_CURCLU[CLU$B_NAMLNG] = CH$DIFF(CH$FIND_CH (FILENAMELEN +	! SET THE FILE NAME AS THE CLUSTER

;16170  1179						1,.FILENAME,%C'.'),	! NAME

;16180  1180						.FILENAME);

;16190  1181	CH$MOVE(.LNK$GL_CURCLU[CLU$B_NAMLNG],.FILENAME,

;16200  1182			LNK$GL_CURCLU[CLU$T_NAME]);

;16300  1183	!

;16400  1184	WHILE .NXTISDOFF EQL -1						! WHILE THERE ARE MORE

;16500  1185	DO BEGIN							! HEADER BLOCKS

;16600  1186		IF NOT READNEXTBLOCK()					! GET THE NEXT ONE

;16700  1187		THEN LNK$ERRMSG(ERM$C_BADIMGHDR,SEV$C_FATAL,		! AND IF UNSUCCESSFUL, FATAL IMAGE

;16800  1188				.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);	! HEADER ERROR

;16900  1189		IF .HEADERBLOCK EQL (.BLOCKOFFSET + 1)			! IF THE FIRST

;17000  1190		THEN BEGIN						! HAVE SOME VALIDATION TO DO

;17100  1191			IF .HEADER[IHD$B_IMGTYPE] NEQ IHD$K_SHR		! CHECK IT IS A SHAREABLE IMAGE

;17200  1192			OR .HEADER[IHD$W_MAJORID] NEQ IHD$K_MAJORID	! MAJOR HEADER ID MUST MATCH

;17300  1193			OR .HEADER[IHD$W_MINORID] GTRU IHD$K_MINORID		! MINOR ID MUST BE LESS OR EQUAL

;17400  1194			OR .HEADER[IHD$W_SIZE] NEQ MAXU((.HEADER[IHD$W_PATCHOFF] ! THE HEADER FIXED PART

;17500  1195					+ IHP$K_LENGTH),IHD$K_MAXLENGTH)	! MUST BE LESS THAN A BLOCK AND MUST

;17600  1196			OR (HDRBLKCNT = .HEADER[IHD$B_HDRBLKCNT] - 1) LSS 0	! CONTAIN PATCH AREA. 0 TO

;17700  1197			OR (SYMDBGDATDSC = .HEADER + .HEADER[IHD$W_SYMDBGOFF])	! 127 MORE BLOCKS. GET THE

;17800  1198					GEQU (.HEADER + .HEADER[IHD$W_SIZE])	! GST DESCRIPTOR WHICH MUST BE CONTAINED

;17900  1199			OR (GSTRECS = .SYMDBGDATDSC[IHS$W_GSTRECS]) LSSU 3	! IN HEADER. MUST BE AT LEAST THREE RECORDS

;18000  1200			OR (GSTVBN = .SYMDBGDATDSC[IHS$L_GSTVBN]) LEQU		! AND MUST BE BEYOND THE HEADER BLOCKS

;18100  1201					( .HDRBLKCNT + 2 )

;18200  1202			THEN LNK$ERRMSG(ERM$C_BADIMGHDR,SEV$C_FATAL,		! ANY ABOVE NOT TRUE, FATAL IMAGE

;18300  1203					.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);	! HEADER ERROR

;18310  1204			IF NOT ((LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_PIC> =	! EXTRACT THE PIC BIT

;18320  1205					.HEADER[IHD$V_PICIMG])			! AND IF NON-PIC



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-3

; Digital Equipment Corporation

;

;18330  1206			THEN LNK$GL_CTLMSK<LNK$S_PICIMG,1,0> = FALSE;		! THIS IMAGE IS ALSO NON-PIC

;18340  1207			IF ((LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_MATCHCTL> =		! EXTRACT THE GLOBAL SECTION MATCH CONTROL

;18350  1208						.HEADER[IHD$V_MATCHCTL]) EQL ISD$K_MATNEV

;18355  1209			THEN (LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_COPY> = TRUE;	! MAKING PRIVATE COPY IF MATCH NEVER

;18360  1210			ISECTIDENT = .HEADER[IHD$L_IDENT];			! NOW THE IDENT TO WHICH IT APPLIES

;18400  1211			LNK$GL_IMGRECS = .LNK$GL_IMGRECS + .HDRBLKCNT + 1;	! COUNTER HEADER BLOCKS AS RECORDS

;18500  1212			CURHDRISD = .HEADER + .HEADER[IHD$W_SIZE];		! POINT TO FIRST ISD IN HEADER

;18600  1213		     END							! ALL DONE WITH FIRST BLOCK

;18700  1214		ELSE CURHDRISD = .HEADER;					! OTHER BLOCKS ARE ALL ISD

;18800  1215		WHILE (NXTISDOFF = .(CURHDRISD[ISD$W_SIZE])<0,16,1>) GTR 0	! WHILE MORE ISD'S ON THIS BLOCK

;18900  1216		DO IF .CURHDRISD[ISD$B_TYPE] NEQ ISD$K_USRSTACK			! BEGIN LOOP THAT PROCESSES EACH

;18950  1217		THEN BEGIN							! IGNORING STACK SECTION

;19000  1218			LNK$ALLOBLK(ISD$C_SIZE,CURISD);				! ALLOCATE A DESCRIPTOR

;19400  1219			CURISD[ISD$L_NXTISD] = 0;				! CURRENT IS LAST

;19410  1220			CURISD[ISD$Q_BUFADR] = 0;				! NO BUFFER FOR IT YET

;19420  1221			CURISD[ISD$Q_BUFADR] + 4 = 0;				! ...

;19430  1222			NEWHDRISD = CURISD[ISD$AL_HDRISD];			! POINT TO PART DESTINED FOR HEADER

;19800  1223			CH$COPY(.CURHDRISD[ISD$W_SIZE],CURHDRISD[ISD$W_SIZE],	! COPY THE ISD FROM THE

;19900  1224					0,ISD$K_LENGLBL,CURISD[ISD$AL_HDRISD]);	! HEADER TO DESCRIPTOR 0 FILLED

;19905  1225			IF .LNK$GL_CURCLU[CLU$L_FSTISD] EQL 0			! IF THIS IS THE FIRST

;19910  1226			THEN LNK$GL_CURCLU[CLU$L_BASE] = .NEWHDRISD[ISD$V_VPG] ^9;	! THEN EXTRACT BASE VPN

;19915  1227			LASTISD[ISD$L_NXTISD] = .CURISD;			! PUT AT END OF LIST

;19960  1228			LASTISD = .CURISD;					! CURRENT BECOMES THE LAST

;19965  1229			IF .(LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_PIC>		! IF A PIC CLUSTER

;19970  1230			THEN NEWHDRISD[ISD$V_VPG] = .NEWHDRISD[ISD$V_VPG] -	! THEN SUBTRACT OUT THE BASE

;19975  1231						.LNK$GL_CURCLU[CLU$L_BASE] ^-9;	! FOR LATER RE-LOCATION

;19987  1232			LNK$GL_CURCLU[CLU$L_PAGES] = .LNK$GL_CURCLU[CLU$L_PAGES] ! ACCUMULATE THE PAGES

;19999  1233						+ .NEWHDRISD[ISD$W_PAGCNT];	! REQUIRED

;20000  1234			IF NOT .CURHDRISD[ISD$V_DZRO]				! PROVIDED NOT A DEMAND ZERO ISD

;20100  1235			THEN IF .CURHDRISD[ISD$L_VBN] GEQU .MAXISDVBN		! IF THIS IMAGE SECTION GOES BEYOND LAST

;20200  1236				THEN MAXISDVBN = .CURHDRISD[ISD$L_VBN] +	! BLOCK OF LAST ISECT, THEN

;20300  1237					.CURHDRISD[ISD$W_PAGCNT];		! COMPUTE NEW MAX VBN IN USE

;20310  1238			IF NOT .CURHDRISD[ISD$V_DZRO]				! IF THE SECTION IS NOT DEMAND ZERO

;20320  1239			AND NOT .CURHDRISD[ISD$V_GBL]				! AND NOT ALREADY GLOBAL

;20330  1240			THEN BEGIN

;20335  1241				NEWHDRISD[ISD$W_SIZE] = ISD$K_LENGLBL;		! SET SIZE AND 

;20340  1242				NEWHDRISD[ISD$V_GBL] = TRUE;			! MAKE IT GLOBAL NOW

;20350  1243				DECR I FROM 3 TO 1				! COMPUTE THE ISD NAME

;20360  1244				DO IF (CURISDSEQ[.I] = .CURISDSEQ[.I] + 1)	! BY INCREMENTING THE SUFFIX

;20370  1245					GTRU %C'9'

;20380  1246					THEN CURISDSEQ[.I] = %C'0'

;20390  1247					ELSE EXITLOOP;

;20490  1248				(NEWHDRISD[ISD$T_GBLNAM])<0,8,0> = .LNK$GL_CURCLU[CLU$B_NAMLNG]	! COPY THE CLUSTER

;20590  1249								+ 4;		! NAME CONCATENATED WITH

;20690  1250				CH$COPY(.LNK$GL_CURCLU[CLU$B_NAMLNG],

;20790  1251						LNK$GL_CURCLU[CLU$T_NAME],4,	! THE SEQUENTIAL NUMBER

;20890  1252						CURISDSEQ[0],0,15,		! OF THE SECTION AND ZERO

;20990  1253						NEWHDRISD[ISD$T_GBLNAM] + 1);	! FILL THEN SET MATCH CONTROL

;21090  1254				NEWHDRISD[ISD$V_MATCHCTL] = .(LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_MATCHCTL>;

;21190  1255				NEWHDRISD[ISD$L_IDENT] = .ISECTIDENT;		! AND THE MATCH CONTROL IDENT

;21290  1256			    END;

;21390  1257			IF NOT .CURHDRISD[ISD$V_DZRO]				! IF NOT DEMAND ZERO

;21490  1258			AND .(LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_COPY>		! AND SHAREABLE IMAGE TO BE COPIED

;21540  1259			AND .CURHDRISD[ISD$L_VBN] NEQ 0				! AND SECTION IS PRESENT IN THIS ONE

;21590  1260			THEN (IF .CURHDRISD[ISD$W_PAGCNT] GTRU .LNK$GL_GSBUFDSC[0]	! MAXIMIZE THE SIZE OF



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-4

; Digital Equipment Corporation

;

;21690  1261				THEN LNK$GL_GSBUFDSC[0] = .CURHDRISD[ISD$W_PAGCNT];)	! THE BUFFER WE WILL NEED

;21790  1262			ELSE NEWHDRISD[ISD$L_VBN] = 0;				! OTHERWISE ZERO THE VBN.

;22000  1263			IF (CURHDRISD = .CURHDRISD + .NXTISDOFF) GTRU 		! CHECK IT WAS COMPLETELY

;22100  1264					(.HEADER + 510)				! CONTAINED BY THE CURRENT BLOCK

;22200  1265			THEN LNK$ERRMSG(ERM$C_BADIMGHDR,SEV$C_FATAL,		! IF NOT TRUE, FATAL IMAGE

;22300  1266					.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);	! HEADER ERROR

;22400  1267			LNK$GW_NISECTS = .LNK$GW_NISECTS + 1;			! COUNT THAT IMAGE SECTION

;22500  1268		   END;								! END OF ISECTION LOOP

;22600  1269	   END;									! END OF BLOCK LOOP

;22700  1270	IF .MAXISDVBN GTRU .GSTVBN						! AND THIS SHOULD ALSO POINT TO GST

;22800  1271	OR .HDRBLKCNT NEQ 0							! AND NO HEADER BLOCKS REMAIN

;22900  1272	THEN LNK$ERRMSG(ERM$C_BADIMGHDR,SEV$C_FATAL,				! IF EITHER ABOVE NOT TRUE, FATAL IMAGE

;23000  1273			.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);			! HEADER ERROR

;23100  1274	GSTVBN = .GSTVBN + .BLOCKOFFSET;					! RELOCATE DOWN FILE IF NECESSARY

;23200  1275	SAVERECOUNT = .LNK$GL_OBJRECS;						! SAVE CURRENT RECORD COUNT

;23300  1276	LNK$POINTOBJ(GSTVBN);							! POINT TO GST

;23400  1277	IF NOT LNK$PROCSOBJ(GSTVBN)						! AND GO PROCESS IT LIKE AN

;23500  1278	THEN RETURN FALSE;							! OBJECT RETURNING IF ERROR

;23600  1279	SAVERECOUNT = .LNK$GL_OBJRECS - .SAVERECOUNT;				! GET NUMBER PROCESSED

;23700  1280	IF .SAVERECOUNT NEQ .GSTRECS						! AND IF NOT CORRECT NUMBER

;23800  1281	THEN LNK$ERRMSG(ERM$C_BADIMGHDR,SEV$C_FATAL,				! FATAL IMAGE

;23900  1282			.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);			! HEADER ERROR

;24000  1283	LNK$GL_IMGRECS = .LNK$GL_IMGRECS + .SAVERECOUNT;			! ACCUMULATE RECORD COUNT

;24100  1284	IF .(LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_PIC>				! IF A PIC CLUSTER

;24200  1285	THEN LNK$GL_CURCLU[CLU$L_BASE] = 0					! SET BASE TO ZERO

;24300  1286	ELSE BEGIN

;24500  1287		IF NOT LNK$ALLOVIRMEM(.LNK$GL_CURCLU[CLU$L_BASE],		! ATTEMPT TO ALLOCATE

;24600  1288				.LNK$GL_CURCLU[CLU$L_PAGES])			! THE SPACE

;24700  1289		THEN LNK$ERRMSG(ERM$C_CONFMEM,SEV$C_FATAL,			! AND REPORT FAILURE

;24800  1290			.LNK$GL_CURCLU[CLU$L_BASE],.AUXFNB[NAM$B_RSL],		! AS FATAL

;24900  1291			.AUXFNB[NAM$L_RSA]);

;25000  1292		(LNK$GL_CURCLU[CLU$W_FLAGS])<CLU$V_BASED> = TRUE;		! AND FLAG FIXED IN ADDRESS SPACE

;25100  1293	     END;

;25200  1294	RETURN TRUE;					! ALL DONE SO RETURN SUCCESS

;25300  1295	END;			! End of LNK$PROCSHRIM





							    .TITLE  LNK_PROCSHRIM

							    .IDENT  \X01.03\



							    .PSECT  $OWN$,NOEXE,2



					      00000 CURISDSEQ:

							    .ASCII  \_000\						      ;

					      00004 HDRBLKCNT:

							    .BLKB   4

					      00008 HEADERBLOCK:

							    .BLKB   4

					      0000C GSTVBN: .BLKB   6



							    .PSECT  $GLOBAL$,NOEXE,2



					      00000 LNK$GL_GSBUFDSC::

							    .BLKB   12

					      0000C LNK$GL_IMGRECS::



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-5

; Digital Equipment Corporation

;

							    .BLKB   4



						    SYM$C_MAXLNG==	15

						    FDB$C_SIZE==	75

						    LNK$S_NEWUDF==	0

						    LNK$S_LIBR==	1

						    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



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-6

; Digital Equipment Corporation

;

						    PSC$M_GBL==		16

						    PSC$M_SHR==		32

						    PSC$M_EXE==		64

						    PSC$M_RD==		128

						    PSC$M_WRT==		256

						    PSC$M_SUPRES==	32768

						    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



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-7

; Digital Equipment Corporation

;

						    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

						    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

						    ISC$C_SIZE==	13

						    ISD$C_SIZE==	48

						    IHD$K_SHR==		2

						    IHD$K_ACTIVOFF==	40

						    IHD$K_SYMDBGOFF==	56

						    IHD$K_IMGIDOFF==	68

						    IHD$K_PATCHOFF==	124

						    IHD$K_MAXLENGTH==	124

						    HDR$K_FILLCHR==	255

						    HDR$K_MINFILL==	2

							    .GLOBL  LNK$ALLOBLK, LNK$ALLOVIRMEM, LNK$CLOSCURFIL, LNK$DIAG



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-8

; Digital Equipment Corporation

;

							    .GLOBL  LNK$ERRMSG, LNK$POINTOBJ, LNK$PROCSOBJ, ERM$C_BADIMGHDR

							    .GLOBL  ERM$C_CONFMEM, ERM$C_REDERR, ERM$C_UNMCOD, LNK$S_PICIMG

							    .GLOBL  SEV$C_FATAL, SEV$C_INFOR, LNK$AL_RAB, LNK$GW_NISECTS

							    .GLOBL  LNK$GB_PASS, LNK$GL_CURFIL, LNK$GL_CURCLU, LNK$GL_CTLMSK

							    .GLOBL  LNK$GL_OBJRECS



							    .PSECT  $CODE$,NOWRT,2



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

		         5E	       2C  C2 00002 	    SUBL2   #44, SP						      ;

	   57	  0000G  CF	       13  C1 00005 	    ADDL3   #19, LNK$GL_CURFIL, R7				      ; 1161

		         56	0000G  CF  D0 0000B 	    MOVL    LNK$GL_CURCLU, R6					      ; 1164

      0C   AE	         56	       18  C1 00010 	    ADDL3   #24, R6, 12(SP)					      ;

				       6C  95 00015 	    TSTB    (AP)						      ; 1166

				       04  12 00017 	    BNEQ    1$							      ;

				       5B  D4 00019 	    CLRL    BLOCKOFFSET						      ; 1167

				       05  11 0001B 	    BRB     2$							      ; 1166

	   5B	    04   BC	       01  C3 0001D 1$:     SUBL3   #1, @MODRFA, BLOCKOFFSET				      ; 1168

		  0000'  CF	       5B  D0 00022 2$:     MOVL    BLOCKOFFSET, HEADERBLOCK				      ; 1169

		  0000'  CF	       01  D0 00027 	    MOVL    #1, HDRBLKCNT					      ; 1170

		    08   AE	       01  CE 0002C 	    MNEGL   #1, NXTISDOFF					      ; 1171

				  18   AE  D4 00030 	    CLRL    MAXISDVBN						      ; 1172

	   30	         6E	       00  2C 00033 	    MOVC5   #0, (SP), #48, #3, CURISDSEQ+1			      ; 1173

		  0000'  CF	       03     00037									      ;

		    10   AE	  03   A7  9E 0003B 	    MOVAB   3(R7), 16(SP)					      ; 1174

		         50	  10   BE  9A 00040 	    MOVZBL  @16(SP), R0						      ;

		    14   AE	  04   A7  D0 00044 	    MOVL    4(R7), 20(SP)					      ; 1175

      14   BE	         50	  5D   8F  3A 00049 	    LOCC    #93, R0, @20(SP)					      ; 1174

				       02  12 0004F 	    BNEQ    3$							      ;

				       51  D4 00051 	    CLRL    R1							      ;

	   52	         51	       01  C1 00053 3$:     ADDL3   #1, R1, FILENAME					      ;

		         01	       52  D1 00057 	    CMPL    FILENAME, #1					      ; 1175

				       11  12 0005A 	    BNEQ    5$							      ;

		         50	  10   BE  9A 0005C 	    MOVZBL  @16(SP), R0						      ; 1176

      14   BE	         50	       3E  3A 00060 	    LOCC    #62, R0, @20(SP)					      ;

				       02  12 00065 	    BNEQ    4$							      ;

				       51  D4 00067 	    CLRL    R1							      ;

	   52	         51	       01  C1 00069 4$:     ADDL3   #1, R1, FILENAME					      ;

	   62	         0A	       2E  3A 0006D 5$:     LOCC    #46, #10, (FILENAME)				      ; 1178

				       02  12 00071 	    BNEQ    6$							      ;

				       51  D4 00073 	    CLRL    R1							      ;

      27   A6	         51	       52  83 00075 6$:     SUBB3   FILENAME, R1, 39(R6)				      ; 1180

		         50	  27   A6  9A 0007A 	    MOVZBL  39(R6), R0						      ; 1181

      28   A6	         62	       50  28 0007E 	    MOVC3   R0, (FILENAME), 40(R6)				      ;

	      FFFFFFFF   8F	  08   AE  D1 00083 7$:     CMPL    NXTISDOFF, #-1					      ; 1184

				       03  13 0008B 	    BEQL    8$							      ;

				     0243  31 0008D 	    BRW     29$							      ;

		  0000V  CF	       00  FB 00090 8$:     CALLS   #0, READNEXTBLOCK					      ; 1186

		         13	       50  E8 00095 	    BLBS    R0, 9$						      ;

				  14   AE  DD 00098 	    PUSHL   20(SP)						      ; 1187

		         7E	  14   BE  9A 0009B 	    MOVZBL  @20(SP), -(SP)					      ;

		         7E	       00  9A 0009F 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

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

		  0000G  CF	       04  FB 000A6 	    CALLS   #4, LNK$ERRMSG					      ;

		         50	0000G  CF  D0 000AB 9$:     MOVL    HEADER, R0						      ; 1191



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-9

; Digital Equipment Corporation

;

		    24   AE	  01   AB  9E 000B0 	    MOVAB   1(BLOCKOFFSET), 36(SP)				      ; 1189

		    24   AE	0000'  CF  D1 000B5 	    CMPL    HEADERBLOCK, 36(SP)					      ;

				       03  13 000BB 	    BEQL    10$							      ;

				     00D0  31 000BD 	    BRW     16$							      ;

		         02	  11   A0  91 000C0 10$:    CMPB    17(R0), #2						      ; 1191

				       68  12 000C4 	    BNEQ    12$							      ;

		  3230   8F	  0C   A0  B1 000C6 	    CMPW    12(R0), #12848					      ; 1192

				       60  12 000CC 	    BNEQ    12$							      ;

		  3130   8F	  0E   A0  B1 000CE 	    CMPW    14(R0), #12592					      ; 1193

				       58  1A 000D4 	    BGTRU   12$							      ;

		         51	  08   A0  3C 000D6 	    MOVZWL  8(R0), R1						      ; 1194

		         51	       2C  C0 000DA 	    ADDL2   #44, R1						      ;

	      0000007C   8F	       51  D1 000DD 	    CMPL    R1, #124						      ;

				       04  1E 000E4 	    BGEQU   11$							      ;

		         51	  7C   8F  9A 000E6 	    MOVZBL  #124, R1						      ;

	   60	         10	       00  ED 000EA 11$:    CMPZV   #0, #16, (R0), R1					      ;

				       51     000EE									      ;

				       3D  12 000EF 	    BNEQ    12$							      ;

		  0000'  CF	  10   A0  9A 000F1 	    MOVZBL  16(R0), HDRBLKCNT					      ; 1196

				0000'  CF  D7 000F7 	    DECL    HDRBLKCNT						      ;

				       31  19 000FB 	    BLSS    12$							      ;

		         5A	  04   A0  3C 000FD 	    MOVZWL  4(R0), SYMDBGDATDSC					      ; 1197

		         5A	       50  C0 00101 	    ADDL2   R0, SYMDBGDATDSC					      ;

		         51	       60  3C 00104 	    MOVZWL  (R0), R1						      ; 1198

		         50	       51  C0 00107 	    ADDL2   R1, R0						      ;

		         50	       5A  D1 0010A 	    CMPL    SYMDBGDATDSC, R0					      ;

				       1F  1E 0010D 	    BGEQU   12$							      ;

		    1C   AE	  0A   AA  3C 0010F 	    MOVZWL  10(SYMDBGDATDSC), GSTRECS				      ; 1199

		         03	  1C   AE  D1 00114 	    CMPL    GSTRECS, #3						      ;

				       14  1F 00118 	    BLSSU   12$							      ;

		         50	  04   AA  D0 0011A 	    MOVL    4(SYMDBGDATDSC), R0					      ; 1200

		  0000'  CF	       50  D0 0011E 	    MOVL    R0, GSTVBN						      ;

	   51	  0000'  CF	       02  C1 00123 	    ADDL3   #2, HDRBLKCNT, R1					      ; 1201

		         51	       50  D1 00129 	    CMPL    R0, R1						      ; 1200

				       13  1A 0012C 	    BGTRU   13$							      ;

				  14   AE  DD 0012E 12$:    PUSHL   20(SP)						      ; 1202

		         7E	  14   BE  9A 00131 	    MOVZBL  @20(SP), -(SP)					      ;

		         7E	       00  9A 00135 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

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

		  0000G  CF	       04  FB 0013C 	    CALLS   #4, LNK$ERRMSG					      ;

		         50	0000G  CF  D0 00141 13$:    MOVL    LNK$GL_CURCLU, R0					      ; 1204

		         51	0000G  CF  D0 00146 	    MOVL    HEADER, R1						      ; 1205

      20   A1	         01	       03  EF 0014B 	    EXTZV   #3, #1, 32(R1), R2					      ; 1204

				       52     00150									      ;

	   01	         03	       52  F0 00151 	    INSV    R2, #3, #1, 36(R0)					      ;

				  24   A0     00155									      ;

		         06	       52  E8 00157 	    BLBS    R2, 14$						      ;

	   00	  0000G  CF	       00  E5 0015A 	    BBCC    #LNK$S_PICIMG, LNK$GL_CTLMSK, 14$			      ; 1206

      23   A1	         03	       00  EF 00160 14$:    EXTZV   #0, #3, 35(R1), R2					      ; 1207

				       52     00165									      ;

	   03	         00	       52  F0 00166 	    INSV    R2, #0, #3, 37(R0)					      ;

				  25   A0     0016A									      ;

		         03	       52  D1 0016C 	    CMPL    R2, #3						      ; 1208

				       04  12 0016F 	    BNEQ    15$							      ;

		    24   A0	       10  88 00171 	    BISB2   #16, 36(R0)						      ; 1209



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-10

; Digital Equipment Corporation

;

		    20   AE	  24   A1  D0 00175 15$:    MOVL    36(R1), ISECTIDENT					      ; 1210

	   50	  0000'  CF	0000'  CF  C1 0017A 	    ADDL3   HDRBLKCNT, LNK$GL_IMGRECS, R0			      ; 1211

    0000'  CF	         50	       01  C1 00182 	    ADDL3   #1, R0, LNK$GL_IMGRECS				      ;

		         58	       61  3C 00188 	    MOVZWL  (R1), CURHDRISD					      ; 1212

		         58	       51  C0 0018B 	    ADDL2   R1, CURHDRISD					      ;

				       03  11 0018E 	    BRB     17$							      ; 1189

		         58	       50  D0 00190 16$:    MOVL    R0, CURHDRISD					      ; 1214

		    08   AE	       68  32 00193 17$:    CVTWL   (CURHDRISD), NXTISDOFF				      ; 1215

				       03  14 00197 	    BGTR    18$							      ;

				     FEE7  31 00199 	    BRW     7$							      ;

		    FD   8F	  0B   A8  91 0019C 18$:    CMPB    11(CURHDRISD), #253					      ; 1216

				       F0  13 001A1 	    BEQL    17$							      ;

				  28   AE  9F 001A3 	    PUSHAB  CURISD						      ; 1218

				       30  DD 001A6 	    PUSHL   #48							      ;

		  0000G  CF	       02  FB 001A8 	    CALLS   #2, LNK$ALLOBLK					      ;

		         59	  28   AE  D0 001AD 	    MOVL    CURISD, R9						      ; 1219

				       69  D4 001B1 	    CLRL    (R9)						      ;

		         50	  04   A9  9E 001B3 	    MOVAB   4(R9), R0						      ; 1220

				       60  7C 001B7 	    CLRQ    (R0)						      ;

	   50	         59	       0C  C1 001B9 	    ADDL3   #12, R9, R0						      ; 1222

		         57	       50  D0 001BD 	    MOVL    R0, NEWHDRISD					      ;

	   00	         68	       68  2C 001C0 	    MOVC5   (CURHDRISD), (CURHDRISD), #0, #36, (R0)		      ; 1223

		         60	       24     001C4									      ;

		         56	0000G  CF  D0 001C6 	    MOVL    LNK$GL_CURCLU, R6					      ; 1225

				  14   A6  D5 001CB 	    TSTL    20(R6)						      ;

				       0B  12 001CE 	    BNEQ    19$							      ;

      04   A7	         17	       00  EF 001D0 	    EXTZV   #0, #23, 4(NEWHDRISD), R0				      ; 1226

				       50     001D5									      ;

      1C   A6	         50	       09  78 001D6 	    ASHL    #9, R0, 28(R6)					      ;

		         50	  0C   BE  D0 001DB 19$:    MOVL    @12(SP), R0						      ; 1227

		         60	       59  D0 001DF 	    MOVL    R9, (R0)						      ;

		    0C   BE	       59  D0 001E2 	    MOVL    R9, @12(SP)						      ; 1228

	   15	    24   A6	       03  E1 001E6 	    BBC     #3, 36(R6), 20$					      ; 1229

	   50	    1C   A6	  F7   8F  78 001EB 	    ASHL    #-9, 28(R6), R0					      ; 1231

      04   A7	         17	       00  EF 001F1 	    EXTZV   #0, #23, 4(NEWHDRISD), R1				      ; 1230

				       51     001F6									      ;

		         51	       50  C2 001F7 	    SUBL2   R0, R1						      ;

	   17	         00	       51  F0 001FA 	    INSV    R1, #0, #23, 4(NEWHDRISD)				      ;

				  04   A7     001FE									      ;

		         50	  02   A7  3C 00200 20$:    MOVZWL  2(NEWHDRISD), R0					      ; 1233

		    20   A6	       50  C0 00204 	    ADDL2   R0, 32(R6)						      ;

	   75	    08   A8	       02  E0 00208 	    BBS     #2, 8(CURHDRISD), 25$				      ; 1234

		    18   AE	  0C   A8  D1 0020D 	    CMPL    12(CURHDRISD), MAXISDVBN				      ; 1235

				       0A  1F 00212 	    BLSSU   21$							      ;

		         50	  02   A8  3C 00214 	    MOVZWL  2(CURHDRISD), R0					      ; 1236

      18   AE	    0C   A8	       50  C1 00218 	    ADDL3   R0, 12(CURHDRISD), MAXISDVBN			      ;

	   5F	    08   A8	       02  E0 0021E 21$:    BBS     #2, 8(CURHDRISD), 25$				      ; 1238

		         5B	  08   A8  E8 00223 	    BLBS    8(CURHDRISD), 25$					      ; 1239

		         67	       24  B0 00227 	    MOVW    #36, (NEWHDRISD)					      ; 1241

		    08   A7	       01  88 0022A 	    BISB2   #1, 8(NEWHDRISD)					      ; 1242

		         50	       03  D0 0022E 	    MOVL    #3, I						      ; 1243

		         51	0000'CF40  9E 00231 22$:    MOVAB   CURISDSEQ[I], R1					      ; 1244

		         52	       61  9A 00237 	    MOVZBL  (R1), R2						      ;

				       52  D6 0023A 	    INCL    R2							      ;

		         61	       52  90 0023C 	    MOVB    R2, (R1)						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-11

; Digital Equipment Corporation

;

		         39	       52  D1 0023F 	    CMPL    R2, #57						      ; 1245

				       06  1B 00242 	    BLEQU   23$							      ;

		         61	       30  90 00244 	    MOVB    #48, (R1)						      ; 1246

		         E7	       50  F5 00247 	    SOBGTR  I, 22$						      ; 1243

      14   A7	    27   A6	       04  81 0024A 23$:    ADDB3   #4, 39(R6), 20(NEWHDRISD)				      ; 1249

		    04   AE	  27   A6  9A 00250 	    MOVZBL  39(R6), 4(SP)					      ; 1250

		         6E	       0F  D0 00255 	    MOVL    #15, (SP)						      ;

		         59	  15   A7  9E 00258 	    MOVAB   21(NEWHDRISD), R9					      ; 1253

	   00	    28   A6	  04   AE  2C 0025C 	    MOVC5   4(SP), 40(R6), #0, (SP), (R9)			      ; 1250

		         69	       6E     00262									      ;

				       10  18 00264 	    BGEQ    24$							      ;

		         59	  04   AE  C0 00266 	    ADDL2   4(SP), R9						      ;

		         6E	  04   AE  C2 0026A 	    SUBL2   4(SP), (SP)						      ;

	   00	  0000'  CF	       04  2C 0026E 	    MOVC5   #4, CURISDSEQ, #0, (SP), (R9)			      ;

		         69	       6E     00274									      ;

	   03	         04	  25   A6  F0 00276 24$:    INSV    37(R6), #4, #3, 8(NEWHDRISD)			      ; 1254

				  08   A7     0027B									      ;

		    10   A7	  20   AE  D0 0027D 	    MOVL    ISECTIDENT, 16(NEWHDRISD)				      ; 1255

	   1C	    08   A8	       02  E0 00282 25$:    BBS     #2, 8(CURHDRISD), 26$				      ; 1257

	   17	    24   A6	       04  E1 00287 	    BBC     #4, 36(R6), 26$					      ; 1258

				  0C   A8  D5 0028C 	    TSTL    12(CURHDRISD)					      ; 1259

				       12  13 0028F 	    BEQL    26$							      ;

      02   A8	         10	       00  ED 00291 	    CMPZV   #0, #16, 2(CURHDRISD), LNK$GL_GSBUFDSC		      ; 1260

				0000'  CF     00296									      ;

				       0B  1B 00299 	    BLEQU   27$							      ;

		  0000'  CF	  02   A8  3C 0029B 	    MOVZWL  2(CURHDRISD), LNK$GL_GSBUFDSC			      ; 1261

				       03  11 002A1 	    BRB     27$							      ; 1257

				  0C   A7  D4 002A3 26$:    CLRL    12(NEWHDRISD)					      ; 1262

		         58	  08   AE  C0 002A6 27$:    ADDL2   NXTISDOFF, CURHDRISD				      ; 1263

	   50	  0000G  CF 000001FE   8F  C1 002AA 	    ADDL3   #510, HEADER, R0					      ; 1264

		         50	       58  D1 002B4 	    CMPL    CURHDRISD, R0					      ; 1263

				       13  1B 002B7 	    BLEQU   28$							      ;

				  14   AE  DD 002B9 	    PUSHL   20(SP)						      ; 1265

		         7E	  14   BE  9A 002BC 	    MOVZBL  @20(SP), -(SP)					      ;

		         7E	       00  9A 002C0 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

		         7E	  00G  8F  9A 002C3 	    MOVZBL  #ERM$C_BADIMGHDR, -(SP)				      ;

		  0000G  CF	       04  FB 002C7 	    CALLS   #4, LNK$ERRMSG					      ;

				0000G  CF  B6 002CC 28$:    INCW    LNK$GW_NISECTS					      ; 1267

				     FEC0  31 002D0 	    BRW     17$							      ; 1215

		  0000'  CF	  18   AE  D1 002D3 29$:    CMPL    MAXISDVBN, GSTVBN					      ; 1270

				       06  1A 002D9 	    BGTRU   30$							      ;

				0000'  CF  D5 002DB 	    TSTL    HDRBLKCNT						      ; 1271

				       13  13 002DF 	    BEQL    31$							      ;

				  14   AE  DD 002E1 30$:    PUSHL   20(SP)						      ; 1272

		         7E	  14   BE  9A 002E4 	    MOVZBL  @20(SP), -(SP)					      ;

		         7E	       00  9A 002E8 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

		         7E	  00G  8F  9A 002EB 	    MOVZBL  #ERM$C_BADIMGHDR, -(SP)				      ;

		  0000G  CF	       04  FB 002EF 	    CALLS   #4, LNK$ERRMSG					      ;

		  0000'  CF	       5B  C0 002F4 31$:    ADDL2   BLOCKOFFSET, GSTVBN					      ; 1274

		         52	0000G  CF  D0 002F9 	    MOVL    LNK$GL_OBJRECS, SAVERECOUNT				      ; 1275

				0000'  CF  9F 002FE 	    PUSHAB  GSTVBN						      ; 1276

		  0000G  CF	       01  FB 00302 	    CALLS   #1, LNK$POINTOBJ					      ;

				0000'  CF  9F 00307 	    PUSHAB  GSTVBN						      ; 1277

		  0000G  CF	       01  FB 0030B 	    CALLS   #1, LNK$PROCSOBJ					      ;

		         67	       50  E9 00310 	    BLBC    R0, 36$						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-12

; Digital Equipment Corporation

;

	   52	  0000G  CF	       52  C3 00313 	    SUBL3   SAVERECOUNT, LNK$GL_OBJRECS, SAVERECOUNT		      ; 1279

		    1C   AE	       52  D1 00319 	    CMPL    SAVERECOUNT, GSTRECS				      ; 1280

				       13  13 0031D 	    BEQL    32$							      ;

				  14   AE  DD 0031F 	    PUSHL   20(SP)						      ; 1281

		         7E	  14   BE  9A 00322 	    MOVZBL  @20(SP), -(SP)					      ;

		         7E	       00  9A 00326 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

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

		  0000G  CF	       04  FB 0032D 	    CALLS   #4, LNK$ERRMSG					      ;

		  0000'  CF	       52  C0 00332 32$:    ADDL2   SAVERECOUNT, LNK$GL_IMGRECS				      ; 1283

		         50	0000G  CF  D0 00337 	    MOVL    LNK$GL_CURCLU, R0					      ; 1284

	   05	    24   A0	       03  E1 0033C 	    BBC     #3, 36(R0), 33$					      ;

				  1C   A0  D4 00341 	    CLRL    28(R0)						      ; 1285

				       30  11 00344 	    BRB     35$							      ; 1284

		         7E	  1C   A0  7D 00346 33$:    MOVQ    28(R0), -(SP)					      ; 1287

		  0000G  CF	       02  FB 0034A 	    CALLS   #2, LNK$ALLOVIRMEM					      ;

		         1B	       50  E8 0034F 	    BLBS    R0, 34$						      ;

				  14   AE  DD 00352 	    PUSHL   20(SP)						      ; 1289

		         7E	  14   BE  9A 00355 	    MOVZBL  @20(SP), -(SP)					      ;

		         50	0000G  CF  D0 00359 	    MOVL    LNK$GL_CURCLU, R0					      ; 1290

				  1C   A0  DD 0035E 	    PUSHL   28(R0)						      ; 1289

		         7E	       00  9A 00361 	    MOVZBL  #SEV$C_FATAL, -(SP)					      ;

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

		  0000G  CF	       05  FB 00368 	    CALLS   #5, LNK$ERRMSG					      ;

		         50	0000G  CF  D0 0036D 34$:    MOVL    LNK$GL_CURCLU, R0					      ; 1292

		    24   A0	       01  88 00372 	    BISB2   #1, 36(R0)						      ;

		         50	       01  D0 00376 35$:    MOVL    #1, R0						      ; 1294

					   04 00379 	    RET     							      ;

				       50  D4 0037A 36$:    CLRL    R0							      ; 1108

					   04 0037C 	    RET     							      ;



; Routine Size:  893 bytes





;25400  1296	ROUTINE READNEXTBLOCK =			! READ NEXT BLOCK IF ANY

;25500  1297	BEGIN

;25600  1298	!

;25700  1299	!++

;25800  1300	!	THIS ROUTINE IS CALLED TO READ THE NEXT BLOCK OF THE IMAGE HEADER

;25900  1301	!	READ ERRORS ARE FATAL. A REQUEST TO READ ANOTHER BLOCK

;26000  1302	!	WHEN HDRBLKCNT IS ALREADY ZERO RETURNS FATAL.

;26100  1303	!	HDRBLKCNT IS DECREMENTED AFTER EACH READ AND HEADERBLOCK IS

;26200  1304	!	INCREMENTED BEFORE EACH READ.

;26300  1305	!

;26400  1306	!--

;26500  1307	!

;26600  1308	LOCAL

;26700  1309		READERROR;

;26800  1310	BIND

;26900  1311		AUXFNB = LNK$GL_CURFIL[FDB$AL_AUXFNB] : BLOCK[NAM$C_BLN,BYTE];	! AUXILIARY FILE NAME BLOCK IN FDB

;27000  1312	!

;27100  1313	IF .HDRBLKCNT LEQ 0						! IF NO MORE BLOCKS

;27200  1314	THEN RETURN FALSE;						! RETURN FAILURE

;27300  1315	HEADERBLOCK = .HEADERBLOCK + 1;					! SET THE BLOCK TO READ

;27400  1316	LNK$AL_RAB[RAB$L_BKT] = .HEADERBLOCK;				! SET STARTING VBN

;27500  1317	LNK$AL_RAB[RAB$W_USZ] = 512;					! AND SET THE BYTE COUNT



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-13

; Digital Equipment Corporation

;

;27600  1318	IF NOT (READERROR = $READ(RAB = LNK$AL_RAB))				! ATTEMPT TO READ LIBRARY, USING

;27700  1319	THEN BEGIN								! BUFFER ALREADY SET UP

;27800  1320		LNK$ERRMSG(ERM$C_REDERR,SEV$C_INFOR,.LNK$GB_PASS,		! 

;27900  1321				.AUXFNB[NAM$B_RSL],.AUXFNB[NAM$L_RSA]);		! IF ANY ERROR, ISSUE

;28000  1322		LNK$CLOSCURFIL();						! THE MESSAGES AND ATTEMPT TO

;28100  1323		LNK$ERRMSG(ERM$C_UNMCOD,SEV$C_INFOR,				! CLOSE IT

;28200  1324				LNK$GL_CURFIL[FDB$Q_USRNAMDSC],.READERROR);	! IT IS ALL OVER NOW.

;28210  1325		LNK$ERRMSG(.READERROR AND NOT 7,SEV$C_INFOR,

;28220  1326				.LNK$AL_RAB[RAB$L_STV]);

;28300  1327		RETURN FALSE;

;28400  1328	     END;

;28500  1329	HDRBLKCNT = .HDRBLKCNT - 1;			! DECREMENT THE BLOCK COUNT

;28600  1330	RETURN TRUE;				! AND ALL DONE SUCCESSFULLY

;28700  1331	END;			! END OF READNEXTBLOCK







							    .GLOBL  SYS$READ



					 0E0C 0037D READNEXTBLOCK:

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

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

		         5A	0000'  CF  9E 00384 	    MOVAB   HDRBLKCNT, R10					      ;

		         5B	       00  D0 00389 	    MOVL    #SEV$C_INFOR, R11					      ;

	   52	  0000G  CF	       13  C1 0038C 	    ADDL3   #19, LNK$GL_CURFIL, R2				      ; 1311

				       6A  D5 00392 	    TSTL    HDRBLKCNT						      ; 1313

				       64  15 00394 	    BLEQ    2$							      ;

				  04   AA  D6 00396 	    INCL    HEADERBLOCK						      ; 1315

		  0000G  CF	  04   AA  D0 00399 	    MOVL    HEADERBLOCK, LNK$AL_RAB+56				      ; 1316

		  0000G  CF	0200   8F  B0 0039F 	    MOVW    #512, LNK$AL_RAB+32					      ; 1317

				0000G  CF  9F 003A6 	    PUSHAB  LNK$AL_RAB						      ; 1318

	      00000000G  9F	       01  FB 003AA 	    CALLS   #1, @#SYS$READ					      ;

		         53	       50  D0 003B1 	    MOVL    R0, READERROR					      ;

		         3D	       53  E8 003B4 	    BLBS    READERROR, 1$					      ;

				  04   A2  DD 003B7 	    PUSHL   4(R2)						      ; 1320

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

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

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

		         7E	  00G  8F  9A 003C6 	    MOVZBL  #ERM$C_REDERR, -(SP)				      ;

		         69	       05  FB 003CA 	    CALLS   #5, LNK$ERRMSG					      ;

		  0000G  CF	       00  FB 003CD 	    CALLS   #0, LNK$CLOSCURFIL					      ; 1322

				       53  DD 003D2 	    PUSHL   READERROR						      ; 1323

	   7E	  0000G  CF	       0B  C1 003D4 	    ADDL3   #11, LNK$GL_CURFIL, -(SP)				      ; 1324

		         7E	       5B  9A 003DA 	    MOVZBL  R11, -(SP)						      ; 1323

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

		         69	       04  FB 003E1 	    CALLS   #4, LNK$ERRMSG					      ;

				0000G  CF  DD 003E4 	    PUSHL   LNK$AL_RAB+12					      ; 1325

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

	   7E	         53	       07  CB 003EB 	    BICL3   #7, READERROR, -(SP)				      ;

		         69	       03  FB 003EF 	    CALLS   #3, LNK$ERRMSG					      ;

				       06  11 003F2 	    BRB     2$							      ; 1327

				       6A  D7 003F4 1$:     DECL    HDRBLKCNT						      ; 1329

		         50	       01  D0 003F6 	    MOVL    #1, R0						      ; 1330

					   04 003F9 	    RET     							      ;

				       50  D4 003FA 2$:     CLRL    R0							      ; 1296



; Bliss-32 7.352	Saturday 22-AUG-1978 04:59:26	DBB3:[LINKER.SRC]LNKPROSHR.B32;5				Page 2-14

; Digital Equipment Corporation

;

					   04 003FC 	    RET     							      ;



; Routine Size:  128 bytes





;28800  1332	END ELUDOM		! End of module













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

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

;  $CODE$         	  1021  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       239











; Size:		1021 code + 34 data bytes

; Run Time:	01:12.2

; Elapsed Time:	01:16.7

; Memory Used:	558 pages

; Compilation Complete

