

; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE PATWRT (%IF %VARIANT EQL 1

;     L 0002			%THEN

;	0003				ADDRESSING_MODE (EXTERNAL = LONG_RELATIVE,

;	0004						NONEXTERNAL = LONG_RELATIVE),

;	0005			%FI

;	0006			IDENT = 'X01.03'

;	0007			) =

;	0008	BEGIN

;	0009	

;	0010	!

;	0011	! COPYRIGHT (C) 1977,1978

;	0012	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0013	!

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

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

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

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

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

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

;	0020	! REMAIN IN DEC.

;	0021	!

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

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

;	0024	! CORPORATION.

;	0025	!

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

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

;	0028	

;	0029	!++

;	0030	! FACILITY:	PATCH

;	0031	!

;	0032	! ABSTRACT:	THIS MODULE CONTAINS THE ROUTINE TO WRITE THE PATCHED IMAGE FILE.

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	! AUTHOR: K.D. MORSE	, CREATION DATE: 3-NOV-77

;	0037	!

;	0038	! MODIFICATIONS:

;	0039	!

;	0040	!

;	0041	!  NO	DATE		PROGRAMMER		PURPOSE

;	0042	!  --	----		----------		-------

;	0043	!

;	0044	!  01	25-APR-78	K.D. MORSE		CONVERT TO NATIVE COMPILER.

;	0045	!  02	13-JUN-78	K.D. MORSE		ALLOW NON-CONTIGUOUS IMAGE FILES

;	0046	!						BUT TRY TO PRESERVE INPUT ATRIBS.

;	0047	!  03	13-JUN-78	K.D. MORSE		ADD FAO COUNTS TO SIGNALS.

;	0048	!

;	0049	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 2

; Digital Equipment Corporation

;

;	0050	!

;	0051	! TABLE OF CONTENTS:

;	0052	!

;	0053	

;	0054	FORWARD ROUTINE

;	0055		PAT$WRTIMG : NOVALUE;				! Writes out patched image

;	0056	

;	0057	!

;	0058	! INCLUDE FILES:

;	0059	!

;	0060	

;	0061	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0062	REQUIRE 'SRC$:PATPCT.REQ';

;	0078	REQUIRE 'SRC$:PREFIX.REQ';

;	0261	REQUIRE 'SRC$:PATPRE.REQ';

;	0401	REQUIRE 'LIB$:PATMSG.REQ';

;	0559	REQUIRE 'SRC$:VXSMAC.REQ';

;	0599	REQUIRE 'SRC$:PATGEN.REQ';

;	0778	

;	0779	!

;	0780	! MACROS:

;	0781	!

;	0782	

;	0783	!

;	0784	! EQUATED SYMBOLS:

;	0785	!

;	0786	

;	0787	!

;	0788	! OWN STORAGE:

;	0789	!

;	0790	OWN

;	0791		NUM_OF_UPDATES;					! Open vs create indicator

;	0792	

;	0793	!

;	0794	! EXTERNAL REFERENCES:

;	0795	!

;	0796	

;	0797	EXTERNAL ROUTINE

;	0798		PAT$CREMAP : NOVALUE,				! Maps image sections

;	0799		LIB$_CREMAPSEC,					! Creates and maps section

;	0800		PAT$WRITEFILE,					! Writes message to a file

;	0801		PAT$FAO_PUT,					! Formats message

;	0802		PAT$ALLOBLK : NOVALUE;				! Routine to allocate storage

;	0803	

;	0804	EXTERNAL

;	0805		PAT$GB_ECOLVL : BYTE,				! Eco level for current patch

;	0806		PAT$CP_OUT_STR,					! Pointer to output buffer

;	0807		PAT$GL_JNLRAB,					! RAB for journal file

;	0808		PAT$GL_BUF_SIZ,					! Size of output message in buffer

;	0809		PAT$GL_NEWVBNMX,				! Max image section binary VBN in new file

;	0810		PAT$GL_OLDVBNMX,				! Max image section binary VBN in old file

;	0811		PAT$GL_IMGBLKS,					! Number of blocks in new image

;	0812		PAT$GL_NEWRAB : BLOCK[,BYTE],			! New image file RAB

;	0813		PAT$GL_NEWFAB : BLOCK[,BYTE],			! New image file FAB

;	0814		PAT$GL_NEWNBK : BLOCK[,BYTE],			! New image file name block



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 2-1

; Digital Equipment Corporation

;

;	0815		PAT$GB_NEWNAME,						! NAME OF NEW IMAGE FILE

;	0816		PAT$GL_OLDRAB : BLOCK[,BYTE],				! OLD IMAGE FILE RAB

;	0817		PAT$GL_OLDFAB : BLOCK[,BYTE],				! OLD IMAGE FILE FAB

;	0818		PAT$GL_OLDNBK : BLOCK[,BYTE],				! OLD IMAGE FILE NAME BLOCK

;	0819		PAT$GB_OLDNAME,						! NAME OF OLD IMAGE FILE

;	0820		PAT$GL_IMGHDR : REF BLOCK[,BYTE],			! FIXED PART OF IMAGE HEADER

;	0821		PAT$GL_IHPPTR : REF BLOCK[,BYTE],			! POINTER TO PATCH SECTION OF OLD IMAGE HEADER

;	0822		PAT$GL_ISELHD,						! LIST HEAD OF IMAGE SECTION TABLE

;	0823		PAT$GL_TXTLHD : REF VECTOR[,BYTE],			! LIST HEAD FOR COMMAND TEXT

;	0824		PAT$GL_FLAGS,						! PATCH FILE FLAGS

;	0825		PAT$GL_ERRCODE;						! GLOBAL ERROR CODE



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3

; Digital Equipment Corporation

;

;	0826	GLOBAL ROUTINE PAT$WRTIMG : NOVALUE =					! WRITES OUT NEW IMAGE FILE

;	0827	

;	0828	!++

;	0829	! FUNCTIONAL DESCRIPTION:

;	0830	!

;	0831	!	THIS ROUTINE WRITES OUT THE NEW IMAGE FILE.

;	0832	!	IT PERFORMS THE FOLLOWING STEPS:

;	0833	!		1) Copies the fixed portion of the image header

;	0834	!		2) Moves in the image section descriptors

;	0835	!		3) Updates the header if necessary

;	0836	!		4) WRITES THE IMAGE HEADER

;	0837	!		5) WRITES OUT IMAGE BINARY, READING IT FROM OLD FILE IF NECESSARY

;	0838	!		6) WRITES OUT THE SYMBOL TABLE

;	0839	!		7) WRITES OUT THE APPENDED PATCH COMMANDS

;	0840	!		8) APPENDS THE PATCH COMMANDS FOR THIS PATCH SESSION

;	0841	!

;	0842	!	FIRST IT BUILDS THE IMAGE HEADER.  AT PRESENT THE IMAGE HEADER MUST FIT

;	0843	!	WITHIN THE ORIGINAL SIZE PLUS TWO BLOCKS AS THIS IS THE SIZE OF THE BUFFER.

;	0844	!	THIS IS ACCOMPLISHED BY MOVING IN THE FIXED PART OF THE HEADER AND THEN

;	0845	!	THE IMAGE SECTION DESCRIPTORS FROM THE IMAGE SECTION TABLE.

;	0846	!	IMAGE SECTION DESCRIPTORS DO NOT CROSS BLOCK BOUNDARIES AND SO

;	0847	!	THE REMAINING BYTES IN A BLOCK ARE FILLED WITH NEGATIVE ONES.

;	0848	!	AFTER THE HEADER IS COMPLETELY BUILT, THE NUMBER OF HEADER BLOCKS IS

;	0849	!	SET AND THE IMAGE SECTION DESCRIPTORS ARE UPDATED IF NECESSARY.

;	0850	!	NOW THE HEADER IS WRITTEN.

;	0851	!

;	0852	!	NEXT A SECOND PASS IS MADE THROUGH THE IMAGE SECTION TABLE TO WRITE

;	0853	!	OUT THE IMAGE BINARY.  THE IMAGE SECTION ENTRIES WITH ZEROS FOR

;	0854	!	STARTING AND ENDING MAPPED ADDRESSES MUST FIRST BE MAPPED IN FROM THE

;	0855	!	OLD IMAGE FILE AS THEY WERE NOT MAPPED IN DURING THE PATCH SESSION.

;	0856	!

;	0857	!	NOW THE SYMBOL TABLE IS WRITTEN INTO THE IMAGE FILE.  THIS SECTION

;	0858	!	IS VARIABLE LENGTH RECORDS, SO THE FILE ATTRIBUTES MUST BE CHANGED.

;	0859	!

;	0860	!	LASTLY THE PATCH COMMAND INFORMATION, ALSO VARIABLE LENGTH RECORDS IS

;	0861	!	IS COPIED FROM THE OLD IMAGE FILE.  THE PATCH COMMAND TEXT FROM THIS

;	0862	!	PATCH SESSION IS APPENDED TO THE IMAGE FILE.

;	0863	!

;	0864	! FORMAL PARAMETERS:

;	0865	!

;	0866	!	NONE

;	0867	!

;	0868	! IMPLICIT INPUTS:

;	0869	!

;	0870	!	THE IMAGE SECTION TABLE AND IMAGE HEADER MUST BE SET UP.

;	0871	!	APPENDED COMMAND TEXT BLOCKS MUST BE SET UP.

;	0872	!	SYMBOL TABLE IS IN MEMORY.

;	0873	!

;	0874	! IMPLICIT OUTPUTS:

;	0875	!

;	0876	!	NONE

;	0877	!

;	0878	! ROUTINE VALUE:

;	0879	!

;	0880	!	NONE



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-1

; Digital Equipment Corporation

;

;	0881	!

;	0882	! COMPLETION CODES:

;	0883	!

;	0884	!	NONE

;	0885	!

;	0886	! SIDE EFFECTS:

;	0887	!

;	0888	!	THE PATCHED IMAGE FILE IS OUTPUT.

;	0889	!

;	0890	!--

;	0891	

;	0892	BEGIN

;	0893	

;	0894	LITERAL

;	0895		OUT_BUF_BLKS = 10,					! NUMBER OF BLOCKS IN OUTPUT BUFFER

;	0896		OUT_BUF_SIZ = OUT_BUF_BLKS * A_PAGE,			! OUTPUT BUFFER SIZE

;	0897		NO_MORE = 0,						! INDICATOR OF NO MORE ISD'S

;	0898		FILL_CHAR = %X'FFFF';						! HEADER FILL CHARACTER

;	0899	

;	0900	BIND

;	0901		NEW_IMG_STR = UPLIT ( %ASCIC 'UPDATING IMAGE FILE "!AD"');

;	0902	

;	0903	LOCAL

;	0904		MAX_VBN_WRITTEN,					! VBN OF NEXT BLOCK TO BE WRITTEN INTO NEW IMAGE

;	0905		ECO_LEVEL_PTR : REF BITVECTOR,				! POINTER TO ECO LEVEL BITS IN IMAGE HEADER

;	0906		BLK_DIFF,						! DIFFERENCE BETWEEN OLD AND NEW HEADER BLOCK SIZE

;	0907		COUNTER,						! NUMBER OF GLOBAL SYMBOLS

;	0908		NUM_HDR_BLKS,						! NUMBER OF BLOCKS USED IN HEADER

;	0909		REM_BYTE_SIZ,						! NUMBER OF UNUSED BYTES IN CURREN OUTPUT BLOCK

;	0910		NEW_IHD_MAX,						! MAXIMUM SIZE IN BYTES OF NEW IMAGE HEADER

;	0911		OUT_BUF_PTR,						! POINTER TO OUTPUT BUFFER

;	0912		NXT_BYTE_PTR : REF VECTOR[,BYTE],			! POINTER TO NEXT BYTE OF OUTPUT BUFFER

;	0913		ISD_PTR : REF BLOCK[,BYTE],				! POINTER TO CURRENT ISD

;	0914		ISE_PTR : REF BLOCK[,BYTE],				! POINTER TO CURRENT ISE

;	0915		NEW_IHD_PTR : REF BLOCK[,BYTE],				! POINTER TO NEW IMAGE HEADER

;	0916		NEW_IHSYM_PTR : REF BLOCK[,BYTE],			! POINTER TO NEW IMAGE HEADER SYMBOL SECTION

;	0917		NEW_IHPAT_PTR : REF BLOCK[,BYTE],			! POINTER TO NEW IMAGE HEADER PATCH SECTION

;	0918		NEW_ISD_PTR : REF BLOCK[,BYTE],				! POINTER TO NEW IMAGE SECTION DESCRIPTOR

;	0919		COM_TXT_PTR : REF BLOCK[,BYTE],				! POINTER TO PATCH COMMAND TEXT BLOCK

;	0920		COM_PTR : REF VECTOR[,BYTE],				! POINTER TO NEXT PATCH COMMAND

;	0921		OLD_IHSYM_PTR : REF BLOCK[,BYTE];			! POINTER TO OLD IMAGE HEADER SYMBOL SECTION

;	0922	

;	0923	!++

;	0924	! ALLOCATE A BUFFER FOR THE HEADER AND INITIALIZE POINTERS.

;	0925	!--

;	0926	IF .PAT$GL_IMGHDR[IHD$W_SYMDBGOFF] NEQ 0

;	0927	THEN

;	0928		OLD_IHSYM_PTR=CH$PTR(.PAT$GL_IMGHDR, .PAT$GL_IMGHDR[IHD$W_SYMDBGOFF])

;	0929	ELSE

;	0930		OLD_IHSYM_PTR=0;

;	0931	NEW_IHD_MAX=(.PAT$GL_IMGHDR[IHD$B_HDRBLKCNT] +2) * A_PAGE;	! GET BUFFER SIZE

;	0932	PAT$ALLOBLK(.NEW_IHD_MAX, NEW_IHD_PTR);				! ALLOCATE NEW IMAGE HEADER BUFFER

;	0933	PAT$ALLOBLK(OUT_BUF_SIZ, OUT_BUF_PTR);				! ALLOCATE OUTPUT BUFFER

;	0934	NXT_BYTE_PTR=CH$PTR(.NEW_IHD_PTR,0);				! INITIALIZE OUTPUT BUFFER POINTER

;	0935	



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-2

; Digital Equipment Corporation

;

;	0936	!++

;	0937	! NOW MOVE IN THE FIXED SIZE PORTION OF THE IMAGE HEADER.

;	0938	! INITIALIZE POINTERS TO PIECES OF THE NEW HEADER.

;	0939	!--

;	0940	NXT_BYTE_PTR=CH$MOVE(.PAT$GL_IMGHDR[IHD$W_SIZE], .PAT$GL_IMGHDR, .NXT_BYTE_PTR);

;	0941	REM_BYTE_SIZ=A_PAGE - .PAT$GL_IMGHDR[IHD$W_SIZE];

;	0942	IF .NEW_IHD_PTR[IHD$W_SYMDBGOFF] NEQ 0

;	0943	THEN

;	0944		NEW_IHSYM_PTR=CH$PTR(.NEW_IHD_PTR, .NEW_IHD_PTR[IHD$W_SYMDBGOFF])

;	0945	ELSE

;	0946		NEW_IHD_PTR = 0;

;	0947	NEW_IHPAT_PTR=CH$PTR(.NEW_IHD_PTR, .NEW_IHD_PTR[IHD$W_PATCHOFF]);

;	0948	

;	0949	!++

;	0950	! NOW MOVE IN THE IMAGE SECTION DESCRIPTORS.

;	0951	!--

;	0952	NUM_HDR_BLKS = 1;						! COUNT THE FIRST HEADER BLOCK

;	0953	ISE_PTR=CH$PTR(.PAT$GL_ISELHD,0);				! INITIALIZE POINTER TO FIRST ISE

;	0954	REM_BYTE_SIZ = .REM_BYTE_SIZ - A_WORD;				! LEAVE ROOM FOR WORD OF -1'S AT END OF BLOCK

;	0955	WHILE .ISE_PTR NEQA 0

;	0956	DO

;	0957		BEGIN

;	0958		IF .NUM_HDR_BLKS GTR .PAT$GL_IMGHDR[IHD$B_HDRBLKCNT]+2	! CHECK IF HEADER OVERFLOWED BUFFER

;	0959		THEN

;	0960			SIGNAL(PAT$_HDRBLK);

;	0961		ISD_PTR=CH$PTR(.ISE_PTR, ISE$C_SIZE);			! POINT TO ISD

;	0962		IF (.REM_BYTE_SIZ GTR					! CHECK IF THERE IS ENOUGH ROOM FOR: 

;	0963				(IF .ISE_PTR[ISE$L_NXTISE] EQLA 0	! (IF THIS IS LAST ISD, THEN

;	0964				 THEN .ISD_PTR[ISD$W_SIZE] + A_WORD	! THE ISD AND A NO-MORE INDICATOR,

;	0965				 ELSE .ISD_PTR[ISD$W_SIZE]))		! OTHERWISE, JUST THE ISD.)

;	0966		THEN

;	0967			BEGIN						! YES, THEN MOVE IT IN

;	0968			NXT_BYTE_PTR=CH$MOVE(.ISD_PTR[ISD$W_SIZE], .ISD_PTR, .NXT_BYTE_PTR);

;	0969			REM_BYTE_SIZ=.REM_BYTE_SIZ - .ISD_PTR[ISD$W_SIZE];

;	0970			ISE_PTR = .ISE_PTR[ISE$L_NXTISE];		! POINT TO NEXT ISE

;	0971			END

;	0972		ELSE

;	0973			BEGIN

;	0974			NXT_BYTE_PTR = CH$FILL(FILL_CHAR, .REM_BYTE_SIZ+A_WORD, .NXT_BYTE_PTR); ! INSERT FILL CHARACTER

;	0975			NUM_HDR_BLKS = . NUM_HDR_BLKS + 1;		! ONE MORE HEADER BLOCK

;	0976			REM_BYTE_SIZ = A_PAGE - A_WORD;			! SET NEW BLOCK BYTE COUNT

;	0977			END;

;	0978		END;

;	0979	NXT_BYTE_PTR = CH$FILL(NO_MORE, A_WORD, .NXT_BYTE_PTR);

;	0980	CH$FILL(FILL_CHAR, .REM_BYTE_SIZ, .NXT_BYTE_PTR);

;	0981	

;	0982	!++

;	0983	! NOW UPDATE THE IMAGE HEADER IF THE NUMBER OF HEADER BLOCKS CHANGED.

;	0984	!--

;	0985	IF (.PAT$GL_IMGHDR[IHD$B_HDRBLKCNT] NEQ .NUM_HDR_BLKS) OR

;	0986	   (.PAT$GL_NEWVBNMX NEQ .PAT$GL_OLDVBNMX)

;	0987	THEN

;	0988		BEGIN

;	0989		!++

;	0990		! FILE HEADER EXPANDED.  ALL THE VBN'S IN THE ISD'S MUST BE CHANGED.



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-3

; Digital Equipment Corporation

;

;	0991		! THAT IS, THE DIFFERENCE IN THE SIZE OF THE HEADERS MUST BE ADDED

;	0992		! TO EVERY VBN IN THE HEADER.

;	0993		!--

;	0994		BLK_DIFF = .NUM_HDR_BLKS - .NEW_IHD_PTR[IHD$B_HDRBLKCNT];

;	0995		NEW_ISD_PTR = CH$PTR(.NEW_IHD_PTR, .NEW_IHD_PTR[IHD$W_SIZE]);

;	0996		WHILE .NEW_ISD_PTR[ISD$W_SIZE] NEQ 0

;	0997		DO

;	0998			BEGIN

;	0999			IF NOT .NEW_ISD_PTR[ISD$V_DZRO]

;	1000			THEN

;	1001				NEW_ISD_PTR[ISD$L_VBN] = .NEW_ISD_PTR[ISD$L_VBN] + .BLK_DIFF;

;	1002			NEW_ISD_PTR = CH$PTR(.NEW_ISD_PTR, .NEW_ISD_PTR[ISD$W_SIZE]);

;	1003			IF .NEW_ISD_PTR[ISD$W_SIZE] EQL FILL_CHAR

;	1004			THEN

;	1005				NEW_ISD_PTR = ((.NEW_ISD_PTR / A_PAGE) * A_PAGE) + 

;	1006						(IF ((.NEW_IHD_PTR MOD A_PAGE) NEQ 0)

;	1007						THEN (.NEW_IHD_PTR MOD A_PAGE)

;	1008						ELSE A_PAGE);

;	1009			END;

;	1010		NEW_IHD_PTR[IHD$B_HDRBLKCNT] = .NUM_HDR_BLKS;		! RESET NUMBER OF HEADER BLOCKS

;	1011		BLK_DIFF = .BLK_DIFF + .PAT$GL_NEWVBNMX - .PAT$GL_OLDVBNMX;

;	1012		IF .NEW_IHSYM_PTR NEQA 0

;	1013		THEN

;	1014			BEGIN

;	1015			IF .NEW_IHSYM_PTR[IHS$L_DSTVBN] NEQ 0

;	1016			THEN

;	1017				NEW_IHSYM_PTR[IHS$L_DSTVBN] = .NEW_IHSYM_PTR[IHS$L_DSTVBN] + .BLK_DIFF;

;	1018			IF .NEW_IHSYM_PTR[IHS$L_GSTVBN] NEQ 0

;	1019			THEN

;	1020				NEW_IHSYM_PTR[IHS$L_GSTVBN] = .NEW_IHSYM_PTR[IHS$L_GSTVBN] + .BLK_DIFF;

;	1021			END;

;	1022		IF .NEW_IHPAT_PTR[IHP$L_PATCOMTXT] NEQ 0

;	1023		THEN

;	1024			NEW_IHPAT_PTR[IHP$L_PATCOMTXT] = .NEW_IHPAT_PTR[IHP$L_PATCOMTXT] + .BLK_DIFF;

;	1025		END

;	1026	ELSE

;	1027		BLK_DIFF = 0;

;	1028	

;	1029	!++

;	1030	! NOW COMPUTE THE SIZE OF THE NEW IMAGE FILE.  THEN OPEN IT, ALLOCATING THE

;	1031	! NEEDED CONTIGUOUS SPACE.

;	1032	!--

;	1033	COM_TXT_PTR = CH$PTR(.PAT$GL_TXTLHD, 0);			! POINT TO FIRST COMMAND TEXT BLOCK

;	1034	WHILE .COM_TXT_PTR NEQA 0					! INCREMENT IMAGE SIZE FOR EACH

;	1035	DO								! BLOCK OF COMMAND TEXT

;	1036		BEGIN

;	1037		PAT$GL_IMGBLKS = .PAT$GL_IMGBLKS + 1;

;	1038		COM_TXT_PTR = .COM_TXT_PTR[TXT$L_NXTBLK];		! POINT TO NEXT COMMAND TEXT BLOCK

;	1039		END;

;	1040	PAT$GL_IMGBLKS = .PAT$GL_IMGBLKS + .BLK_DIFF;			! ADD IN DIFFERENCE IN HEADER SIZES

;	1041	PAT$GL_NEWFAB[FAB$L_ALQ] = .PAT$GL_IMGBLKS;			! INITIALIZE NUMBER OF BLOCKS TO ALLOCATE

;	1042	IF (.NUM_OF_UPDATES EQL 0)					! Check number of updates done

;	1043	THEN

;	1044		BEGIN

;	1045		!++



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-4

; Digital Equipment Corporation

;

;	1046		! Create the output image file.  Try to make it a contiguous file if

;	1047		! the input image file was contiguous, i.e., first try a create with

;	1048		! the same attributes.  If the file cannot be created with the same

;	1049		! attributes, then attempt a second try with contiguous-best-try.  If

;	1050		! this succeeds, then print an informational message.

;	1051		!--

;	1052		PAT$GL_NEWFAB[FAB$V_CTG] = .PAT$GL_OLDFAB[FAB$V_CTG];

;	1053		PAT$GL_NEWFAB[FAB$V_CBT] = .PAT$GL_OLDFAB[FAB$V_CBT];

;	1054		IF NOT (PAT$GL_ERRCODE=$CREATE(FAB=PAT$GL_NEWFAB))

;	1055		THEN

;	1056			BEGIN						! Attempt a contiguous best try

;	1057			PAT$GL_NEWFAB[FAB$V_CBT] = TRUE;

;	1058			PAT$GL_ERRCODE = $CREATE(FAB=PAT$GL_NEWFAB);

;	1059			IF .PAT$GL_ERRCODE

;	1060			THEN

;	1061				SIGNAL(PAT$_NONCONTIG+MSG$K_INFO,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1062			END;

;	1063		END

;	1064	ELSE

;	1065		PAT$GL_ERRCODE=$OPEN(FAB=PAT$GL_NEWFAB);		! OPEN OUTPUT FILE

;	1066	IF NOT .PAT$GL_ERRCODE						! SUCCESS ON OPEN?

;	1067	THEN

;	1068		SIGNAL(PAT$_OPNERR,3,.PAT$GL_ERRCODE,.PAT$GL_NEWNBK[NAM$B_ESL],

;	1069			PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]) ! REPORT FAILURE

;	1070	ELSE

;	1071		BEGIN

;	1072		PAT$GL_ERRCODE=$CONNECT(RAB=PAT$GL_NEWRAB);		! CONNECT INPUT FILE

;	1073		IF NOT .PAT$GL_ERRCODE					! SUCCESS ON CONNECT?

;	1074		THEN

;	1075			SIGNAL(PAT$_CNTERR,3,.PAT$GL_ERRCODE,.PAT$GL_NEWNBK[NAM$B_RSL],

;	1076				PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]) ! REPORT FAILURE

;	1077		ELSE

;	1078			BEGIN

;	1079			NUM_OF_UPDATES = 1;				! SET INDICATOR FOR ALREADY CREATED

;	1080			PAT$GL_FLAGS<PAT$S_OUTPUT,1>=1;			! SET FLAG FILE NOT OPEN

;	1081			PAT$GL_NEWFAB[FAB$V_ESC] = TRUE;

;	1082			PAT$GL_NEWFAB[FAB$L_CTX] = RME$C_SETRFM;	! SET MODIFY CODE

;	1083			PAT$GL_NEWFAB[FAB$B_RFM] = FAB$C_VAR;		! SET VARIABLE LENGTH RECORDS

;	1084			PAT$GL_ERRCODE = $MODIFY(FAB=PAT$GL_NEWFAB);

;	1085			IF NOT .PAT$GL_ERRCODE

;	1086			THEN

;	1087				SIGNAL(PAT$_MODIFYERR, 3, .PAT$GL_ERRCODE,

;	1088					.PAT$GL_NEWNBK[NAM$B_RSL], PAT$GB_NEWNAME,

;	1089					.PAT$GL_ERRCODE, .PAT$GL_NEWRAB[RAB$L_STV]);

;	1090			END

;	1091		END;

;	1092	

;	1093	!++

;	1094	! WRITE IMAGE FILE NAME TO JOURNAL FILE.

;	1095	!--

;	1096	PAT$CP_OUT_STR = .OUT_BUF_PTR;

;	1097	PAT$GL_BUF_SIZ = 0;

;	1098	PAT$FAO_PUT(NEW_IMG_STR, .PAT$GL_NEWNBK[NAM$B_RSL], PAT$GB_NEWNAME);

;	1099	PAT$WRITEFILE(.PAT$GL_BUF_SIZ, .OUT_BUF_PTR, PAT$GL_JNLRAB);

;	1100	!++



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-5

; Digital Equipment Corporation

;

;	1101	! MAKE SURE THE FILE IS OPEN.

;	1102	!--

;	1103	IF ((.PAT$GL_FLAGS AND PAT$M_OUTPUT) EQL 0) OR

;	1104	   ((.PAT$GL_FLAGS AND PAT$M_INPUT) EQL 0)

;	1105	THEN

;	1106		RETURN;							! CAN'T GET AT FILES, GIVE UP

;	1107	

;	1108	!++

;	1109	! NOW WRITE OUT THE IMAGE BINARY.

;	1110	!--

;	1111	ISE_PTR=CH$PTR(.PAT$GL_ISELHD,0);				! POINT TO FIRST ISE

;	1112	NEW_ISD_PTR = CH$PTR(.NEW_IHD_PTR, .NEW_IHD_PTR[IHD$W_SIZE]);	! POINT TO FIRST NEW ISD

;	1113	MAX_VBN_WRITTEN = 0;						! NO VBN WRITTEN YET

;	1114	WHILE .ISE_PTR NEQA 0						! LOOP UNTIL ISE'S ARE EXHAUSTED

;	1115	DO

;	1116		BEGIN

;	1117		ISD_PTR = CH$PTR(.ISE_PTR, ISE$C_SIZE);			! FIND OLD ISD ADDRESS

;	1118		COUNTER = 0;						! SET COUNT OF BLOCKS WRITTEN FOR IMAGE SECTION

;	1119		IF (NOT .ISD_PTR[ISD$V_DZRO]) AND			! CHECK FOR NO IMAGE BINARY

;	1120		   (.ISD_PTR[ISD$B_TYPE] NEQ ISD$K_USRSTACK)		! AND FOR IMAGE STACK

;	1121									! AND FOR GLOBAL SECTION?

;	1122	!	   AND (.ISD_PTR[ISD$V_GBL] AND (.ISD_PTR[ISD$V_MATCHCTL] NEQ ISD$K_MATALL))

;	1123		THEN

;	1124			BEGIN

;	1125			!++

;	1126			! SET VBN OF IMAGE SECTION IN OLD AND NEW FILES.

;	1127			!--

;	1128			PAT$GL_OLDRAB[RAB$L_BKT] = .ISD_PTR[ISD$L_VBN];

;	1129			PAT$GL_NEWRAB[RAB$L_BKT] = .NEW_ISD_PTR[ISD$L_VBN];

;	1130	

;	1131			!++

;	1132			! NOW LOOP TO OUTPUT ALL OF THIS IMAGE SECTION.

;	1133			! (THE LOOP IS IN CASE THE IMAGE SECTION IS LARGER THAN THE OUTPUT BUFFER.)

;	1134			!--

;	1135			WHILE .COUNTER NEQ .ISD_PTR[ISD$W_PAGCNT]

;	1136			DO

;	1137				BEGIN

;	1138				IF .ISE_PTR[ISE$L_MAPVEND] EQLA 0	! IF THE IMAGE SECTION IS NOT MAPPED

;	1139				THEN					! THEN READ IT

;	1140					BEGIN

;	1141					!++

;	1142					! CHECK THAT THE BUFFER IS LARGE ENOUGH TO HOLD ALL OF IMAGE SECTION.

;	1143					!--

;	1144					IF OUT_BUF_SIZ GTR ((.ISD_PTR[ISD$W_PAGCNT]-.COUNTER)*A_PAGE)

;	1145					THEN

;	1146						BEGIN

;	1147						!++

;	1148						! BUFFER WAS LARGE ENOUGH.  SET UP TO READ ENTIRE IMAGE SECTION.

;	1149						!--

;	1150						PAT$GL_OLDRAB[RAB$W_USZ] = A_PAGE * (.ISD_PTR[ISD$W_PAGCNT]-.COUNTER);

;	1151						PAT$GL_NEWRAB[RAB$W_RSZ] = .PAT$GL_OLDRAB[RAB$W_USZ];

;	1152						COUNTER = .ISD_PTR[ISD$W_PAGCNT];

;	1153						END

;	1154					ELSE

;	1155						BEGIN



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-6

; Digital Equipment Corporation

;

;	1156						!++

;	1157						! BUFFER WAS NOT LARGE ENOUGH TO READ ENTIRE IMAGE SECTION.

;	1158						! THEREFORE, SET COUNTER TO READ TEN BLOCKS.

;	1159						!--

;	1160						PAT$GL_OLDRAB[RAB$W_USZ] = OUT_BUF_SIZ;

;	1161						PAT$GL_NEWRAB[RAB$W_RSZ] = OUT_BUF_SIZ;

;	1162						COUNTER = .COUNTER + 10;

;	1163						END;

;	1164	

;	1165					!++

;	1166					! NOW READ IMAGE SECTION.  IF IMAGE SECTION IS TOO LARGE

;	1167					! FOR BUFFER, READ TEN BLOCKS OF IT.

;	1168					!--

;	1169					PAT$GL_OLDRAB[RAB$L_UBF] = .OUT_BUF_PTR;

;	1170					PAT$GL_ERRCODE = $READ(RAB=PAT$GL_OLDRAB);

;	1171					IF NOT .PAT$GL_ERRCODE

;	1172					THEN

;	1173						SIGNAL(PAT$_GETERR, 3, .PAT$GL_ERRCODE,

;	1174							.PAT$GL_OLDNBK[NAM$B_RSL],

;	1175							PAT$GB_OLDNAME,.PAT$GL_ERRCODE,

;	1176							.PAT$GL_OLDRAB[RAB$L_STV]);

;	1177	

;	1178					!++

;	1179					! INITIALIZE THE OUTPUT BUFFER ADDRESS.

;	1180					!--

;	1181					PAT$GL_NEWRAB[RAB$L_RBF] = .OUT_BUF_PTR;

;	1182					END

;	1183				ELSE

;	1184					BEGIN

;	1185					!++

;	1186					! THIS IMAGE SECTION WAS MAPPED.  CHECK IF

;	1187					! THE ENTIRE SECTION SHOULD BE WRITTEN OR TEN

;	1188					! BLOCKS AT A TIME.

;	1189					!--

;	1190					IF OUT_BUF_SIZ GTR ((.ISD_PTR[ISD$W_PAGCNT]-.COUNTER)*A_PAGE)

;	1191					THEN

;	1192						!++

;	1193						! SET THE OUTPUT BUFFER ADDRESS EQUAL

;	1194						! TO THE STARTING MAPPED ADDRESS PLUS

;	1195						! AN OFFSET FOR THE BLOCKS ALREADY WRITTEN.

;	1196						! OUTPUT THE REST OF THE IMAGE SECTION.

;	1197						!--

;	1198						BEGIN

;	1199						PAT$GL_NEWRAB[RAB$W_RSZ] = A_PAGE *

;	1200							 (.NEW_ISD_PTR[ISD$W_PAGCNT] - .COUNTER);

;	1201						PAT$GL_NEWRAB[RAB$L_RBF] = .ISE_PTR[ISE$L_MAPVST] + 

;	1202							(A_PAGE * .COUNTER);

;	1203						COUNTER = .ISD_PTR[ISD$W_PAGCNT];

;	1204						END

;	1205					ELSE

;	1206						BEGIN

;	1207						!++

;	1208						! BUFFER WAS NOT LARGE ENOUGH TO READ

;	1209						! ENTIRE IMAGE SECTION. THEREFORE, SET

;	1210						! COUNTER TO WRITE TEN BLOCKS.



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-7

; Digital Equipment Corporation

;

;	1211						!--

;	1212						PAT$GL_NEWRAB[RAB$W_RSZ] = OUT_BUF_SIZ;

;	1213						PAT$GL_NEWRAB[RAB$L_RBF] =

;	1214							 .ISE_PTR[ISE$L_MAPVST] + (A_PAGE * .COUNTER);

;	1215						COUNTER = .COUNTER + 10;

;	1216						END;

;	1217					END;

;	1218	

;	1219				!++

;	1220				! NOW WRITE OUT THE IMAGE SECTION (OR PART OF IT).

;	1221				!--

;	1222				PAT$GL_ERRCODE = $WRITE(RAB=PAT$GL_NEWRAB);

;	1223				IF NOT .PAT$GL_ERRCODE

;	1224				THEN

;	1225					SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE,

;	1226						.PAT$GL_NEWNBK[NAM$B_RSL], PAT$GB_NEWNAME,

;	1227						.PAT$GL_ERRCODE, .PAT$GL_NEWRAB[RAB$L_STV]);

;	1228	

;	1229				!++

;	1230				! CHECK TO SEE THAT THE ENTIRE IMAGE SECTION HAS BEEN WRITTEN.

;	1231				! IF NOT, RESET THE VBN'S FOR THE NEXT TEN BLOCKS OF IT.

;	1232				!--

;	1233				IF .COUNTER NEQ .ISD_PTR[ISD$W_PAGCNT]

;	1234				THEN

;	1235					BEGIN

;	1236					PAT$GL_OLDRAB[RAB$L_BKT] = .ISD_PTR[ISD$L_VBN] + .COUNTER;

;	1237					PAT$GL_NEWRAB[RAB$L_BKT] = .NEW_ISD_PTR[ISD$L_VBN] + .COUNTER;

;	1238					END;

;	1239				END;

;	1240			!++

;	1241			! Now update the pointer to the next highest VBN to be write.

;	1242			!--

;	1243			IF (.MAX_VBN_WRITTEN LSSU (.NEW_ISD_PTR[ISD$L_VBN] + .NEW_ISD_PTR[ISD$W_PAGCNT]))

;	1244			THEN

;	1245				MAX_VBN_WRITTEN = .NEW_ISD_PTR[ISD$L_VBN] + .NEW_ISD_PTR[ISD$W_PAGCNT];

;	1246			END;

;	1247		ISE_PTR = .ISE_PTR[ISE$L_NXTISE];

;	1248		NEW_ISD_PTR = CH$PTR(.NEW_ISD_PTR, .NEW_ISD_PTR[ISD$W_SIZE]);

;	1249		!++

;	1250		! Now position to the next block of ISD's.

;	1251		!--

;	1252		IF .NEW_ISD_PTR[ISD$W_SIZE] EQL FILL_CHAR

;	1253		THEN

;	1254			NEW_ISD_PTR = .NEW_IHD_PTR + 

;	1255					(((.NEW_ISD_PTR - .NEW_IHD_PTR + A_PAGE-1) / A_PAGE) * A_PAGE);

;	1256		END;

;	1257	

;	1258	!++

;	1259	! INITIALIZE THE OUTPUT FILE TO TRUNCATE THE FILE AFTER A PUT.  OTHERWISE, PATCH

;	1260	! GETS AN NEF ERROR (NOT AT END OF FILE).

;	1261	!--

;	1262	PAT$GL_NEWRAB[RAB$V_TPT] = TRUE;

;	1263	

;	1264	!++

;	1265	! NOW WRITE OUT THE DEBUG SYMBOL TABLE BLOCKS.



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-8

; Digital Equipment Corporation

;

;	1266	!**** THIS CODE WILL BE CHANGE WHEN PATCH HANDLES SYMBOLS. ****

;	1267	!--

;	1268	IF (.OLD_IHSYM_PTR NEQA 0)

;	1269	THEN

;	1270		BEGIN

;	1271		IF (.OLD_IHSYM_PTR[IHS$W_DSTBLKS] NEQ 0) AND (.OLD_IHSYM_PTR[IHS$L_DSTVBN] GTR 2)

;	1272		THEN

;	1273			BEGIN

;	1274			COUNTER = 0;

;	1275			NEW_IHSYM_PTR[IHS$L_DSTVBN] = .MAX_VBN_WRITTEN;

;	1276			PAT$GL_NEWRAB[RAB$L_BKT] = .MAX_VBN_WRITTEN;

;	1277			PAT$GL_OLDRAB[RAB$L_BKT] = .OLD_IHSYM_PTR[IHS$L_DSTVBN];

;	1278			WHILE .COUNTER NEQ .OLD_IHSYM_PTR[IHS$W_DSTBLKS]

;	1279			DO

;	1280				BEGIN

;	1281				!++

;	1282				! CHECK THAT THE BUFFER IS LARGE ENOUGH TO HOLD ALL OF IMAGE SECTION.

;	1283				!--

;	1284				IF OUT_BUF_SIZ GTR ((.OLD_IHSYM_PTR[IHS$W_DSTBLKS]-.COUNTER)*A_PAGE)

;	1285				THEN

;	1286					BEGIN

;	1287					!++

;	1288					! BUFFER WAS LARGE ENOUGH.  SET UP TO READ ENTIRE IMAGE SECTION.

;	1289					!--

;	1290					PAT$GL_OLDRAB[RAB$W_USZ] = A_PAGE * (.OLD_IHSYM_PTR[IHS$W_DSTBLKS]-.COUNTER);

;	1291					PAT$GL_NEWRAB[RAB$W_RSZ] = .PAT$GL_OLDRAB[RAB$W_USZ];

;	1292					COUNTER = .OLD_IHSYM_PTR[IHS$W_DSTBLKS];

;	1293					END

;	1294				ELSE

;	1295					BEGIN

;	1296					!++

;	1297					! BUFFER WAS NOT LARGE ENOUGH TO READ ENTIRE IMAGE SECTION.

;	1298					! THEREFORE, SET COUNTER TO READ TEN BLOCKS.

;	1299					!--

;	1300					PAT$GL_OLDRAB[RAB$W_USZ] = OUT_BUF_SIZ;

;	1301					PAT$GL_NEWRAB[RAB$W_RSZ] = OUT_BUF_SIZ;

;	1302					COUNTER = .COUNTER + 10;

;	1303					END;

;	1304	

;	1305				!++

;	1306				! NOW READ IMAGE SECTION.  IF IMAGE SECTION IS TOO LARGE

;	1307				! FOR BUFFER, READ TEN BLOCKS OF IT.

;	1308				!--

;	1309				PAT$GL_OLDRAB[RAB$L_UBF] = .OUT_BUF_PTR;

;	1310				PAT$GL_ERRCODE = $READ(RAB=PAT$GL_OLDRAB);

;	1311				IF NOT .PAT$GL_ERRCODE

;	1312				THEN

;	1313					SIGNAL(PAT$_GETERR, 3, .PAT$GL_ERRCODE, .PAT$GL_OLDNBK[NAM$B_RSL],

;	1314						PAT$GB_OLDNAME,.PAT$GL_ERRCODE,.PAT$GL_OLDRAB[RAB$L_STV]);

;	1315	

;	1316				!++

;	1317				! INITIALIZE THE OUTPUT BUFFER ADDRESS.

;	1318				!--

;	1319				PAT$GL_NEWRAB[RAB$L_RBF] = .OUT_BUF_PTR;

;	1320	



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-9

; Digital Equipment Corporation

;

;	1321				!++

;	1322				! NOW WRITE OUT THE DST (OR PART OF IT).

;	1323				!--

;	1324				PAT$GL_ERRCODE = $WRITE(RAB=PAT$GL_NEWRAB);

;	1325				IF NOT .PAT$GL_ERRCODE

;	1326				THEN

;	1327					SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1328						PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1329	

;	1330				!++

;	1331				! CHECK TO SEE THAT THE ENTIRE DST HAS BEEN WRITTEN.

;	1332				! IF NOT, RESET THE VBN'S FOR THE NEXT TEN BLOCKS OF IT.

;	1333				!--

;	1334				IF .COUNTER NEQ .OLD_IHSYM_PTR[IHS$W_DSTBLKS]

;	1335				THEN

;	1336					BEGIN

;	1337					PAT$GL_OLDRAB[RAB$L_BKT] = .OLD_IHSYM_PTR[IHS$L_DSTVBN] + .COUNTER;

;	1338					PAT$GL_NEWRAB[RAB$L_BKT] = .NEW_IHSYM_PTR[IHS$L_DSTVBN] + .COUNTER;

;	1339					END;

;	1340				END;

;	1341			END;

;	1342		IF (.MAX_VBN_WRITTEN LSSU (.NEW_IHSYM_PTR[IHS$L_DSTVBN] + .NEW_IHSYM_PTR[IHS$W_DSTBLKS]))

;	1343		THEN

;	1344			MAX_VBN_WRITTEN = .NEW_IHSYM_PTR[IHS$L_DSTVBN] + .NEW_IHSYM_PTR[IHS$W_DSTBLKS];

;	1345		END;

;	1346	

;	1347	!++

;	1348	! REDEFINE THE FABS AND RABS TO DO VARIABLE LENGTH RECORD I/O

;	1349	! INSTEAD OF BLOCK I/O.  THE FIRST GET/PUT MUST BE BY RFA AND THE REST SEQUENTIALLY.

;	1350	!***** THIS IS A TEMPORARY HACK UNTIL $SPACE WORKS. ******

;	1351	!--

;	1352	PAT$GL_NEWRAB[RAB$W_USZ] = A_PAGE;

;	1353	PAT$GL_NEWRAB[RAB$L_UBF] = .OUT_BUF_PTR;

;	1354	IF (.NEW_IHSYM_PTR[IHS$L_GSTVBN] NEQ 0)

;	1355	THEN

;	1356		NEW_IHSYM_PTR[IHS$L_GSTVBN] = .MAX_VBN_WRITTEN;

;	1357	IF (.MAX_VBN_WRITTEN NEQ 0)

;	1358	THEN

;	1359		PAT$GL_NEWRAB[RAB$L_BKT] = .MAX_VBN_WRITTEN - 1

;	1360	ELSE

;	1361	!	SIGNAL(PAT$_NOIMGSEC);					! NO IMAGE BINARY IN IMAGE FILE

;	1362		SIGNAL(PAT$_PATERR);

;	1363	PAT$GL_ERRCODE = $READ(RAB=PAT$GL_NEWRAB);

;	1364	IF NOT .PAT$GL_ERRCODE

;	1365	THEN

;	1366		SIGNAL(PAT$_GETERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1367			PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1368	!PAT$GL_NEWRAB[RAB$L_BKT] = .NEW_IHSYM_PTR[IHS$L_GSTVBN] -

;	1369	!				(.PAT$GL_NEWRAB[RAB$L_RFA0] +

;	1370	!				.(PAT$GL_NEWRAB[RAB$W_RSZ]/A_PAGE));

;	1371	!PAT$GL_ERRCODE = $SPACE(RAB=PAT$GL_NEWRAB);

;	1372	!IF NOT .PAT$GL_ERRCODE

;	1373	!THEN

;	1374	!	SIGNAL(PAT$_SPACEERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1375	!		PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-10

; Digital Equipment Corporation

;

;	1376	

;	1377	PAT$GL_OLDRAB[RAB$L_RFA0] = .OLD_IHSYM_PTR[IHS$L_GSTVBN];	! INITIALIZE TO READ

;	1378	PAT$GL_OLDRAB[RAB$W_RFA4] = 0;					! THE GLOBAL SYMBOL TABLE

;	1379	PAT$GL_OLDFAB[FAB$V_ESC] = TRUE;

;	1380	PAT$GL_OLDRAB[RAB$B_RAC] = RAB$C_RFA;				! THE FIRST RECORD IS READ BY RFA

;	1381	

;	1382	!++

;	1383	! INITIALIZE BUFFER ADDRESSES.

;	1384	!--

;	1385	PAT$GL_NEWRAB[RAB$L_RBF] = .OUT_BUF_PTR;

;	1386	PAT$GL_OLDRAB[RAB$L_UBF] = .OUT_BUF_PTR;

;	1387	

;	1388	!++

;	1389	! NOW WRITE OUT THE VARIABLE LENGTH GLOBAL SYMBOL RECORDS.

;	1390	! **** THIS CODE WILL CHANGE WHEN PATCH HANDLES SYMBOLS. ****

;	1391	! **** IT WOULD BE VERY EASY TO EXPAND THE GLOBAL SYMBOL TABLE. ****

;	1392	!--

;	1393	IF (.OLD_IHSYM_PTR NEQA 0) AND (.OLD_IHSYM_PTR[IHS$W_GSTRECS] NEQ 0) AND

;	1394	   (.OLD_IHSYM_PTR[IHS$L_GSTVBN] GTR 2)

;	1395	THEN

;	1396		BEGIN

;	1397		COUNTER = .OLD_IHSYM_PTR[IHS$W_GSTRECS];		! COUNT THE RECORDS AS READ

;	1398		WHILE .COUNTER GTR 0

;	1399		DO

;	1400			BEGIN

;	1401			PAT$GL_ERRCODE = $GET(RAB=PAT$GL_OLDRAB);

;	1402			IF NOT .PAT$GL_ERRCODE

;	1403			THEN

;	1404				SIGNAL(PAT$_GETERR, 3, .PAT$GL_ERRCODE, .PAT$GL_OLDNBK[NAM$B_RSL],

;	1405					PAT$GB_OLDNAME,.PAT$GL_ERRCODE,.PAT$GL_OLDRAB[RAB$L_STV]);

;	1406			PAT$GL_OLDRAB[RAB$B_RAC] = RAB$C_SEQ;		! SET FOR SEQUENTIAL I/O

;	1407			PAT$GL_NEWRAB[RAB$W_RSZ] = .PAT$GL_OLDRAB[RAB$W_RSZ];

;	1408			PAT$GL_ERRCODE = $PUT(RAB=PAT$GL_NEWRAB);

;	1409			IF NOT .PAT$GL_ERRCODE

;	1410			THEN

;	1411				SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1412					PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1413			COUNTER = .COUNTER - 1;

;	1414			END;

;	1415	

;	1416		!++

;	1417		! NOW WRITE A RECORD TO FILL THE REST OF THE BLOCK WITH A FILL CHARACTER.

;	1418		! THE SIZE OF THE FILLER RECORD IS THE NUMBER OF BYTES IN A BLOCK MINUS

;	1419		! THE LAST RECORD SIZE, THE LAST RECORD OFFSET INTO THE BLOCK, AND FOUR

;	1420		! BYTES FOR THE LAST RECORD LENGTH AND THE FILLER RECORD LENGTH.

;	1421		!--

;	1422		PAT$GL_NEWRAB[RAB$W_RSZ] = A_PAGE - .PAT$GL_NEWRAB[RAB$W_RSZ] - .PAT$GL_NEWRAB[RAB$W_RFA4] - 4;

;	1423		IF (.PAT$GL_NEWRAB[RAB$W_RSZ]  GTR 0) AND (.PAT$GL_NEWRAB[RAB$W_RSZ] LSS A_PAGE)

;	1424		THEN

;	1425			BEGIN

;	1426			CH$FILL(FILL_CHAR, .PAT$GL_NEWRAB[RAB$W_RSZ], .OUT_BUF_PTR);

;	1427			PAT$GL_ERRCODE = $PUT(RAB=PAT$GL_NEWRAB);

;	1428			IF NOT .PAT$GL_ERRCODE

;	1429			THEN

;	1430			SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-11

; Digital Equipment Corporation

;

;	1431					PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1432			END

;	1433	END;

;	1434	

;	1435	!++

;	1436	! SET THE VBN OF THE PATCH COMMAND TEXT IN THE NEW IMAGE HEADER, TO NEXT BLOCK.

;	1437	!--

;	1438	NEW_IHPAT_PTR[IHP$L_PATCOMTXT] = .PAT$GL_NEWRAB[RAB$L_RFA0] + 1;

;	1439	

;	1440	!++

;	1441	! NOW WRITE OUT THE OLD APPENDED PATCH COMMANDS.

;	1442	! THEY ARE VARIABLE LENGTH, SEQUENTIAL RECORDS, ENDED BY EOF.

;	1443	!--

;	1444	IF .PAT$GL_IHPPTR[IHP$L_PATCOMTXT] NEQ 0

;	1445	THEN

;	1446		BEGIN

;	1447		PAT$GL_OLDRAB[RAB$B_RAC] = RAB$C_RFA;			! FIND THE FIRST BY RFA

;	1448		PAT$GL_OLDRAB[RAB$L_RFA0] = .PAT$GL_IHPPTR[IHP$L_PATCOMTXT]; ! SET VBN

;	1449		PAT$GL_OLDRAB[RAB$W_RFA4] = 0;				! SET BYTE OFFSET WITHIN BLOCK

;	1450		REPEAT

;	1451			BEGIN

;	1452			!++

;	1453			! THIS LOOP READS AND WRITES ALL THE PREVIOUS APPENDED PATCH

;	1454			! COMMANDS AND FINISHES WHEN EOF IS ENCOUNTERED.

;	1455			!--

;	1456			PAT$GL_ERRCODE = $GET(RAB=PAT$GL_OLDRAB);

;	1457			IF .PAT$GL_ERRCODE EQL RMS$_EOF

;	1458			THEN

;	1459				EXITLOOP;

;	1460			IF NOT .PAT$GL_ERRCODE

;	1461			THEN

;	1462				SIGNAL(PAT$_GETERR, 3, .PAT$GL_ERRCODE, .PAT$GL_OLDNBK[NAM$B_RSL],

;	1463					PAT$GB_OLDNAME,.PAT$GL_ERRCODE,.PAT$GL_OLDRAB[RAB$L_STV]);

;	1464			PAT$GL_OLDRAB[RAB$B_RAC] = RAB$C_SEQ;		! ALL THE REMAINING IS SEQUENTIAL I/O

;	1465			PAT$GL_NEWRAB[RAB$W_RSZ] = .PAT$GL_OLDRAB[RAB$W_RSZ];

;	1466			PAT$GL_ERRCODE = $PUT(RAB=PAT$GL_NEWRAB);

;	1467			IF NOT .PAT$GL_ERRCODE

;	1468			THEN

;	1469				SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1470					PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1471			END;

;	1472		END;

;	1473	

;	1474	!++

;	1475	! NOW APPEND THE PATCH COMMANDS FOR THIS SESSION.

;	1476	! THE PATCH COMMANDS ARE STORED AS ASCIC STRINGS IN BLOCKS THAT ARE

;	1477	! SINGULARLY LINKED TOGETHER.  THE COMMANDS DO NOT SPAN BLOCK BOUNDARIES.

;	1478	! THE LAST COMMAND IN A BLOCK IS FOLLOWED BY A ZERO COUNT.

;	1479	!--

;	1480	COM_TXT_PTR = .PAT$GL_TXTLHD;

;	1481	WHILE .COM_TXT_PTR NEQA 0

;	1482	DO

;	1483		BEGIN

;	1484		COM_PTR = .COM_TXT_PTR + TXT$C_SIZE;			! POINT TO FIRST COMMAND IN BLOCK

;	1485		WHILE .COM_PTR[0] NEQ 0



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 3-12

; Digital Equipment Corporation

;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4

; Digital Equipment Corporation

;

;	1486		DO

;	1487			BEGIN

;	1488			PAT$GL_NEWRAB[RAB$W_RSZ] = .COM_PTR[0];		! SET LENGTH OF COMMAND

;	1489			PAT$GL_NEWRAB[RAB$L_RBF] = .COM_PTR + 1;	! SET ADDRESS OF COMMAND

;	1490			PAT$GL_ERRCODE = $PUT(RAB=PAT$GL_NEWRAB);	! WRITE ONE COMMAND

;	1491			IF NOT .PAT$GL_ERRCODE

;	1492			THEN

;	1493				SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1494					PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1495			COM_PTR = CH$PTR(.COM_PTR, .COM_PTR[0] + 1);	! POINT TO NEXT COMMAND

;	1496			END;

;	1497		COM_TXT_PTR = .COM_TXT_PTR[TXT$L_NXTBLK];		! POINT TO NEXT COMMAND TEXT BLOCK

;	1498		END;

;	1499	

;	1500	!++

;	1501	! NOW WRITE OUT THE IMAGE HEADER.  THE IMAGE HEADER IS WRITTEN LAST BECAUSE

;	1502	! THE VBN FOR THE PATCH COMMAND TEXT MUST BE FOUND FIRST.  THE ECO LEVEL BIT

;	1503	! CORRESPONDING TO THIS PATCH MAY NOW BE SET IN THE IMAGE HEADER.  IF THE

;	1504	! HEADER IS WRITTEN SUCCESSFULLY, THEN THE ECO LEVEL INDICATOR, PAT$GB_ECOLVL,

;	1505	! IS RE-INITIALIZED TO ZERO.  THIS WILL ENABLE ANOTHER "SET ECO" COMMAND TO

;	1506	! SPECIFY A NEW PATCH.

;	1507	!--

;	1508	IF (.PAT$GB_ECOLVL NEQ 0)					! DON'T TRY TO SET A LEVEL IF NONE SPECIFIED

;	1509	THEN

;	1510		BEGIN

;	1511		ECO_LEVEL_PTR = CH$PTR(NEW_IHPAT_PTR[IHP$L_ECO1], 0);	! SET POINTER TO ECO LEVEL BITVECTOR

;	1512		ECO_LEVEL_PTR[.PAT$GB_ECOLVL-1] = 1;			! SET ECO BIT

;	1513		ECO_LEVEL_PTR = CH$PTR(PAT$GL_IHPPTR[IHP$L_ECO1], 0);	! SET POINTER TO ECO LEVEL BITVECTOR

;	1514		ECO_LEVEL_PTR[.PAT$GB_ECOLVL-1] = 1;			! SET ECO BIT

;	1515		END;

;	1516	PAT$GL_NEWRAB[RAB$L_BKT] = 1;					! SET NUMBER OF BLOCK TO OUTPUT

;	1517	PAT$GL_NEWRAB[RAB$W_RSZ] = .NUM_HDR_BLKS * A_PAGE;		! SET NUMBER OF BYTES TO WRITE

;	1518	PAT$GL_NEWRAB[RAB$L_RBF] = .NEW_IHD_PTR;			! SET BUFFER ADDRESS

;	1519	

;	1520	!++

;	1521	! NOW CLEAR THE TRUNCATE BIT BEFORE PATCH WRITES THE IMAGE HEADER.  IF THIS

;	1522	! IS NOT DONE, THE REST OF THE FILE IS LOST.

;	1523	!--

;	1524	PAT$GL_NEWRAB[RAB$V_TPT] = FALSE;

;	1525	PAT$GL_ERRCODE=$WRITE(RAB=PAT$GL_NEWRAB);			! OUTPUT HEADER BLOCKS

;	1526	IF NOT .PAT$GL_ERRCODE

;	1527	THEN

;	1528		SIGNAL(PAT$_PUTERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1529			PAT$GB_NEWNAME,.PAT$GL_ERRCODE,.PAT$GL_NEWRAB[RAB$L_STV]);

;	1530	PAT$GB_ECOLVL = 0;						! ALLOW NEW PATCH ECO LEVEL

;	1531	

;	1532	!++

;	1533	! NOW RESET FILE ATTRIBUTES.

;	1534	!--

;	1535	PAT$GL_NEWFAB[FAB$V_ESC] = TRUE;

;	1536	PAT$GL_NEWFAB[FAB$L_CTX] = RME$C_SETRFM;			! SET MODIFY CODE

;	1537	PAT$GL_NEWFAB[FAB$B_RFM] = FAB$C_FIX;				! SET VARIABLE LENGTH RECORDS

;	1538	PAT$GL_ERRCODE = $MODIFY(FAB=PAT$GL_NEWFAB);

;	1539	IF NOT .PAT$GL_ERRCODE

;	1540	THEN



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-1

; Digital Equipment Corporation

;

;	1541		SIGNAL(PAT$_MODIFYERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1542			 PAT$GB_NEWNAME, .PAT$GL_ERRCODE, .PAT$GL_NEWRAB[RAB$L_STV]);

;	1543	

;	1544	!++

;	1545	! NOW CLOSE THE OUTPUT IMAGE FILE.  THIS IS DONE HERE SO THAT THE "UPDATE"

;	1546	! COMMAND CAN REWRITE THE FILE IF UPDATE IS SPECIFIED MORE THAN ONCE.

;	1547	!--

;	1548	PAT$GL_ERRCODE = $CLOSE(FAB=PAT$GL_NEWFAB);

;	1549	IF NOT .PAT$GL_ERRCODE

;	1550	THEN

;	1551		SIGNAL(PAT$_CLSERR, 3, .PAT$GL_ERRCODE, .PAT$GL_NEWNBK[NAM$B_RSL],

;	1552			PAT$GB_NEWNAME, .PAT$GL_ERRCODE, .PAT$GL_NEWRAB[RAB$L_STV])

;	1553	ELSE

;	1554		PAT$GL_FLAGS<PAT$S_OUTPUT,1> = 0;

;	1555	

;	1556	RETURN;

;	1557	END;								! END OF PAT$WRTIMG





							    .TITLE  PATWRT

							    .IDENT  \X01.03\



							    .PSECT  _PAT$PLIT,NOWRT,NOEXE,0



					      00000 P.AAA:  .ASCII  <25>\UPDATING IMAGE FILE "!AD"\<0><0>		      ;



							    .PSECT  _PAT$OWN,NOEXE,2



					      00000 NUM_OF_UPDATES:

							    .BLKB   4



						    ISE$C_SIZE==	20

						    TXT$C_SIZE==	4

						    PAL$C_SIZE==	16

						    ASD$C_SIZE==	9

						    FWR$C_SIZE==	24

						    NEW_IMG_STR=	P.AAA

							    .GLOBL  PAT$CREMAP, LIB$_CREMAPSEC, PAT$WRITEFILE, PAT$FAO_PUT

							    .GLOBL  PAT$ALLOBLK, PAT$GB_ECOLVL, PAT$CP_OUT_STR, PAT$GL_JNLRAB

							    .GLOBL  PAT$GL_BUF_SIZ, PAT$GL_NEWVBNMX, PAT$GL_OLDVBNMX

							    .GLOBL  PAT$GL_IMGBLKS, PAT$GL_NEWRAB, PAT$GL_NEWFAB, PAT$GL_NEWNBK

							    .GLOBL  PAT$GB_NEWNAME, PAT$GL_OLDRAB, PAT$GL_OLDFAB, PAT$GL_OLDNBK

							    .GLOBL  PAT$GB_OLDNAME, PAT$GL_IMGHDR, PAT$GL_IHPPTR, PAT$GL_ISELHD

							    .GLOBL  PAT$GL_TXTLHD, PAT$GL_FLAGS, PAT$GL_ERRCODE, SYS$CREATE

							    .GLOBL  SYS$OPEN, SYS$CONNECT, SYS$MODIFY, SYS$READ, SYS$WRITE

							    .GLOBL  SYS$GET, SYS$PUT, SYS$CLOSE



							    .PSECT  _PAT$CODE,NOWRT,2



					 0FFC 00000 	    .ENTRY  PAT$WRTIMG, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0826

		         5E	       14  C2 00002 	    SUBL2   #20, SP						      ;

		         50 00000000G  EF  D0 00005 	    MOVL    PAT$GL_IMGHDR, R0					      ; 0926

				  04   A0  B5 0000C 	    TSTW    4(R0)						      ;

				       09  13 0000F 	    BEQL    1$							      ;

		         58	  04   A0  3C 00011 	    MOVZWL  4(R0), OLD_IHSYM_PTR				      ; 0928



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-2

; Digital Equipment Corporation

;

		         58	       50  C0 00015 	    ADDL2   R0, OLD_IHSYM_PTR					      ;

				       02  11 00018 	    BRB     2$							      ; 0926

				       58  D4 0001A 1$:     CLRL    OLD_IHSYM_PTR					      ; 0930

		         50	  10   A0  9A 0001C 2$:     MOVZBL  16(R0), R0						      ; 0931

		         50	       02  C0 00020 	    ADDL2   #2, R0						      ;

	   50	         50	       09  78 00023 	    ASHL    #9, NEW_IHD_MAX, NEW_IHD_MAX			      ; 0000

				  10   AE  9F 00027 	    PUSHAB  NEW_IHD_PTR						      ; 0932

				       50  DD 0002A 	    PUSHL   NEW_IHD_MAX						      ;

	      00000000G  EF	       02  FB 0002C 	    CALLS   #2, PAT$ALLOBLK					      ;

				  0C   AE  9F 00033 	    PUSHAB  OUT_BUF_PTR						      ; 0933

		         7E	1400   8F  3C 00036 	    MOVZWL  #5120, -(SP)					      ;

	      00000000G  EF	       02  FB 0003B 	    CALLS   #2, PAT$ALLOBLK					      ;

		         56	  10   AE  D0 00042 	    MOVL    NEW_IHD_PTR, R6					      ; 0934

		         59	       56  D0 00046 	    MOVL    R6, NXT_BYTE_PTR					      ;

		         57 00000000G  EF  D0 00049 	    MOVL    PAT$GL_IMGHDR, R7					      ; 0940

	   69	         67	       67  28 00050 	    MOVC3   (R7), (R7), (NXT_BYTE_PTR)				      ;

		         59	       53  D0 00054 	    MOVL    R3, NXT_BYTE_PTR					      ;

		         5B	       67  3C 00057 	    MOVZWL  (R7), REM_BYTE_SIZ					      ; 0941

	   5B 00000200   8F	       5B  C3 0005A 	    SUBL3   REM_BYTE_SIZ, #512, REM_BYTE_SIZ			      ;

				  04   A6  B5 00062 	    TSTW    4(R6)						      ; 0942

				       09  13 00065 	    BEQL    3$							      ;

		         50	  04   A6  3C 00067 	    MOVZWL  4(R6), R0						      ; 0944

		         56	       50  C0 0006B 	    ADDL2   R0, NEW_IHSYM_PTR					      ;

				       03  11 0006E 	    BRB     4$							      ; 0942

				  10   AE  D4 00070 3$:     CLRL    NEW_IHD_PTR						      ; 0946

		    04   AE	  10   AE  D0 00073 4$:     MOVL    NEW_IHD_PTR, 4(SP)					      ; 0947

	   51	    04   AE	       08  C1 00078 	    ADDL3   #8, 4(SP), R1					      ;

		         50	       61  3C 0007D 	    MOVZWL  (R1), R0						      ;

	   6E	    04   AE	       50  C1 00080 	    ADDL3   R0, 4(SP), NEW_IHPAT_PTR				      ;

		    08   AE	       01  D0 00085 	    MOVL    #1, NUM_HDR_BLKS					      ; 0952

		         5A 00000000G  EF  D0 00089 	    MOVL    PAT$GL_ISELHD, ISE_PTR				      ; 0953

		         5B	       02  C2 00090 	    SUBL2   #2, REM_BYTE_SIZ					      ; 0954

				       5A  D5 00093 5$:     TSTL    ISE_PTR						      ; 0955

				       63  13 00095 	    BEQL    10$							      ;

		         50 00000000G  EF  D0 00097 	    MOVL    PAT$GL_IMGHDR, R0					      ; 0958

		         50	  10   A0  9A 0009E 	    MOVZBL  16(R0), R0						      ;

		         50	       02  C0 000A2 	    ADDL2   #2, R0						      ;

		         50	  08   AE  D1 000A5 	    CMPL    NUM_HDR_BLKS, R0					      ;

				       0D  15 000A9 	    BLEQ    6$							      ;

			    006D819C   8F  DD 000AB 	    PUSHL   #7176604						      ; 0960

	      00000000G  00	       01  FB 000B1 	    CALLS   #1, LIB$SIGNAL					      ;

	   57	         5A	       14  C1 000B8 6$:     ADDL3   #20, ISE_PTR, ISD_PTR				      ; 0961

				       6A  D5 000BC 	    TSTL    (ISE_PTR)						      ; 0963

				       08  12 000BE 	    BNEQ    7$							      ;

		         50	       67  3C 000C0 	    MOVZWL  (ISD_PTR), R0					      ; 0964

		         50	       02  C0 000C3 	    ADDL2   #2, R0						      ;

				       03  11 000C6 	    BRB     8$							      ; 0963

		         50	       67  3C 000C8 7$:     MOVZWL  (ISD_PTR), R0					      ;

		         50	       5B  D1 000CB 8$:     CMPL    REM_BYTE_SIZ, R0					      ; 0962

				       12  15 000CE 	    BLEQ    9$							      ;

	   69	         67	       67  28 000D0 	    MOVC3   (ISD_PTR), (ISD_PTR), (NXT_BYTE_PTR)		      ; 0968

		         59	       53  D0 000D4 	    MOVL    R3, NXT_BYTE_PTR					      ;

		         50	       67  3C 000D7 	    MOVZWL  (ISD_PTR), R0					      ; 0969

		         5B	       50  C2 000DA 	    SUBL2   R0, REM_BYTE_SIZ					      ;

		         5A	       6A  D0 000DD 	    MOVL    (ISE_PTR), ISE_PTR					      ; 0970



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-3

; Digital Equipment Corporation

;

				       B1  11 000E0 	    BRB     5$							      ; 0962

	   50	         5B	       02  C1 000E2 9$:     ADDL3   #2, REM_BYTE_SIZ, R0				      ; 0974

      FF   8F	         6E	       00  2C 000E6 	    MOVC5   #0, (SP), #255, R0, (NXT_BYTE_PTR)			      ;

		         69	       50     000EB									      ;

		         59	       53  D0 000ED 	    MOVL    R3, NXT_BYTE_PTR					      ;

				  08   AE  D6 000F0 	    INCL    NUM_HDR_BLKS					      ; 0975

		         5B	01FE   8F  3C 000F3 	    MOVZWL  #510, REM_BYTE_SIZ					      ; 0976

				       99  11 000F8 	    BRB     5$							      ; 0955

	   00	         6E	       00  2C 000FA 10$:    MOVC5   #0, (SP), #0, #2, (NXT_BYTE_PTR)			      ; 0979

		         69	       02     000FE									      ;

		         59	       53  D0 00100 	    MOVL    R3, NXT_BYTE_PTR					      ;

      FF   8F	         6E	       00  2C 00103 	    MOVC5   #0, (SP), #255, REM_BYTE_SIZ, (NXT_BYTE_PTR)	      ; 0980

		         69	       5B     00108									      ;

		         50 00000000G  EF  D0 0010A 	    MOVL    PAT$GL_IMGHDR, R0					      ; 0985

      10   A0	         08	       00  ED 00111 	    CMPZV   #0, #8, 16(R0), NUM_HDR_BLKS			      ;

				  08   AE     00116									      ;

				       10  12 00118 	    BNEQ    11$							      ;

	      00000000G  EF 00000000G  EF  D1 0011A 	    CMPL    PAT$GL_NEWVBNMX, PAT$GL_OLDVBNMX			      ; 0986

				       03  12 00125 	    BNEQ    11$							      ;

				     0097  31 00127 	    BRW     18$							      ;

	   50	    04   AE	       10  C1 0012A 11$:    ADDL3   #16, 4(SP), R0					      ; 0994

		         51	       60  9A 0012F 	    MOVZBL  (R0), BLK_DIFF					      ;

	   51	    08   AE	       51  C3 00132 	    SUBL3   BLK_DIFF, NUM_HDR_BLKS, BLK_DIFF			      ;

		         52	  04   BE  3C 00137 	    MOVZWL  @4(SP), NEW_ISD_PTR					      ; 0995

		         52	  04   AE  C0 0013B 	    ADDL2   4(SP), NEW_ISD_PTR					      ;

				       62  B5 0013F 12$:    TSTW    (NEW_ISD_PTR)					      ; 0996

				       40  13 00141 	    BEQL    15$							      ;

	   04	    08   A2	       02  E0 00143 	    BBS     #2, 8(NEW_ISD_PTR), 13$				      ; 0999

		    0C   A2	       51  C0 00148 	    ADDL2   BLK_DIFF, 12(NEW_ISD_PTR)				      ; 1001

		         50	       62  3C 0014C 13$:    MOVZWL  (NEW_ISD_PTR), R0					      ; 1002

		         52	       50  C0 0014F 	    ADDL2   R0, NEW_ISD_PTR					      ;

		  FFFF   8F	       62  B1 00152 	    CMPW    (NEW_ISD_PTR), #65535				      ; 1003

				       E6  12 00157 	    BNEQ    12$							      ;

	   53	         52 00000200   8F  C7 00159 	    DIVL3   #512, NEW_ISD_PTR, R3				      ; 1005

	   53	         53	       09  78 00161 	    ASHL    #9, R3, R3						      ; 0000

	   00	    04   AE	       01  7A 00165 	    EMUL    #1, 4(SP), #0, -(SP)				      ; 1006

				       7E     0016A									      ;

	   50	         8E 00000200   8F  7B 0016B 	    EDIV    #512, (SP)+, R0, R0					      ;

				       50     00173									      ;

				       50  D5 00174 	    TSTL    R0							      ;

				       05  12 00176 	    BNEQ    14$							      ;

		         50	0200   8F  3C 00178 	    MOVZWL  #512, R0						      ;

	   52	         53	       50  C1 0017D 14$:    ADDL3   R0, R3, NEW_ISD_PTR					      ; 1005

				       BC  11 00181 	    BRB     12$							      ; 0996

	   50	    04   AE	       10  C1 00183 15$:    ADDL3   #16, 4(SP), R0					      ; 1010

		         60	  08   AE  90 00188 	    MOVB    NUM_HDR_BLKS, (R0)					      ;

	   50	         51 00000000G  EF  C1 0018C 	    ADDL3   PAT$GL_NEWVBNMX, BLK_DIFF, R0			      ; 1011

	   51	         50 00000000G  EF  C3 00194 	    SUBL3   PAT$GL_OLDVBNMX, R0, BLK_DIFF			      ;

				       56  D5 0019C 	    TSTL    NEW_IHSYM_PTR					      ; 1012

				       10  13 0019E 	    BEQL    17$							      ;

				       66  D5 001A0 	    TSTL    (NEW_IHSYM_PTR)					      ; 1015

				       03  13 001A2 	    BEQL    16$							      ;

		         66	       51  C0 001A4 	    ADDL2   BLK_DIFF, (NEW_IHSYM_PTR)				      ; 1017

				  04   A6  D5 001A7 16$:    TSTL    4(NEW_IHSYM_PTR)					      ; 1018

				       04  13 001AA 	    BEQL    17$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-4

; Digital Equipment Corporation

;

		    04   A6	       51  C0 001AC 	    ADDL2   BLK_DIFF, 4(NEW_IHSYM_PTR)				      ; 1020

	   50	         6E	       20  C1 001B0 17$:    ADDL3   #32, NEW_IHPAT_PTR, R0				      ; 1022

				       60  D5 001B4 	    TSTL    (R0)						      ;

				       0B  13 001B6 	    BEQL    19$							      ;

	   50	         6E	       20  C1 001B8 	    ADDL3   #32, NEW_IHPAT_PTR, R0				      ; 1024

		         60	       51  C0 001BC 	    ADDL2   BLK_DIFF, (R0)					      ;

				       02  11 001BF 	    BRB     19$							      ; 0985

				       51  D4 001C1 18$:    CLRL    BLK_DIFF						      ; 1027

		         5B 00000000G  EF  D0 001C3 19$:    MOVL    PAT$GL_TXTLHD, COM_TXT_PTR				      ; 1033

				       5B  D5 001CA 20$:    TSTL    COM_TXT_PTR						      ; 1034

				       0B  13 001CC 	    BEQL    21$							      ;

			    00000000G  EF  D6 001CE 	    INCL    PAT$GL_IMGBLKS					      ; 1037

		         5B	       6B  D0 001D4 	    MOVL    (COM_TXT_PTR), COM_TXT_PTR				      ; 1038

				       F1  11 001D7 	    BRB     20$							      ; 1034

	      00000000G  EF	       51  C0 001D9 21$:    ADDL2   BLK_DIFF, PAT$GL_IMGBLKS				      ; 1040

	      00000000G  EF 00000000G  EF  D0 001E0 	    MOVL    PAT$GL_IMGBLKS, PAT$GL_NEWFAB+16			      ; 1041

			    00000000'  EF  D5 001EB 	    TSTL    NUM_OF_UPDATES					      ; 1042

				       78  12 001F1 	    BNEQ    22$							      ;

00000000G  EF	         01	       04  EF 001F3 	    EXTZV   #4, #1, PAT$GL_OLDFAB+6, R0				      ; 1052

				       50     001FB									      ;

	   01	         04	       50  F0 001FC 	    INSV    R0, #4, #1, PAT$GL_NEWFAB+6				      ;

			    00000000G  EF     00200									      ;

00000000G  EF	         01	       05  EF 00205 	    EXTZV   #5, #1, PAT$GL_OLDFAB+6, R0				      ; 1053

				       50     0020D									      ;

	   01	         05	       50  F0 0020E 	    INSV    R0, #5, #1, PAT$GL_NEWFAB+6				      ;

			    00000000G  EF     00212									      ;

			    00000000G  EF  9F 00217 	    PUSHAB  PAT$GL_NEWFAB					      ; 1054

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

	      00000000G  EF	       50  D0 00224 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         51	       50  E8 0022B 	    BLBS    R0, 23$						      ;

	      00000000G  EF	       20  88 0022E 	    BISB2   #32, PAT$GL_NEWFAB+6				      ; 1057

			    00000000G  EF  9F 00235 	    PUSHAB  PAT$GL_NEWFAB					      ; 1058

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

	      00000000G  EF	       50  D0 00242 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         2F 00000000G  EF  E9 00249 	    BLBC    PAT$GL_ERRCODE, 23$					      ; 1059

			    00000000G  EF  DD 00250 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1061

			    00000000G  EF  DD 00256 	    PUSHL   PAT$GL_ERRCODE					      ;

			    006D82D3   8F  DD 0025C 	    PUSHL   #7176915						      ;

	      00000000G  00	       03  FB 00262 	    CALLS   #3, LIB$SIGNAL					      ;

				       14  11 00269 	    BRB     23$							      ; 1042

			    00000000G  EF  9F 0026B 22$:    PUSHAB  PAT$GL_NEWFAB					      ; 1065

	      00000000G  9F	       01  FB 00271 	    CALLS   #1, @#SYS$OPEN					      ;

	      00000000G  EF	       50  D0 00278 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 0027F 23$:    MOVL    PAT$GL_ERRCODE, R0					      ; 1066

		         21	       50  E8 00286 	    BLBS    R0, 24$						      ;

			    00000000G  EF  DD 00289 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1068

				       50  DD 0028F 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00291 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00297 	    MOVZBL  PAT$GL_NEWNBK+11, -(SP)				      ;

				       50  DD 0029E 	    PUSHL   R0							      ;

				       03  DD 002A0 	    PUSHL   #3							      ;

			    006D81CC   8F  DD 002A2 	    PUSHL   #7176652						      ;

				       3D  11 002A8 	    BRB     25$							      ;

			    00000000G  EF  9F 002AA 24$:    PUSHAB  PAT$GL_NEWRAB					      ; 1072

	      00000000G  9F	       01  FB 002B0 	    CALLS   #1, @#SYS$CONNECT					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-5

; Digital Equipment Corporation

;

	      00000000G  EF	       50  D0 002B7 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 002BE 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1073

		         21	       50  E8 002C5 	    BLBS    R0, 26$						      ;

			    00000000G  EF  DD 002C8 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1075

				       50  DD 002CE 	    PUSHL   R0							      ;

			    00000000G  EF  9F 002D0 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 002D6 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 002DD 	    PUSHL   R0							      ;

				       03  DD 002DF 	    PUSHL   #3							      ;

			    006D8164   8F  DD 002E1 	    PUSHL   #7176548						      ;

				       60  11 002E7 25$:    BRB     27$							      ;

	      00000000'  EF	       01  D0 002E9 26$:    MOVL    #1, NUM_OF_UPDATES					      ; 1079

	      00000000G  EF	       08  88 002F0 	    BISB2   #8, PAT$GL_FLAGS					      ; 1080

	      00000000G  EF	       08  88 002F7 	    BISB2   #8, PAT$GL_NEWFAB+7					      ; 1081

	      00000000G  EF	       01  D0 002FE 	    MOVL    #1, PAT$GL_NEWFAB+24				      ; 1082

	      00000000G  EF	       02  90 00305 	    MOVB    #2, PAT$GL_NEWFAB+31				      ; 1083

			    00000000G  EF  9F 0030C 	    PUSHAB  PAT$GL_NEWFAB					      ; 1084

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

	      00000000G  EF	       50  D0 00319 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00320 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1085

		         26	       50  E8 00327 	    BLBS    R0, 28$						      ;

			    00000000G  EF  DD 0032A 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1087

				       50  DD 00330 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00332 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00338 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 0033F 	    PUSHL   R0							      ;

				       03  DD 00341 	    PUSHL   #3							      ;

			    006D81BC   8F  DD 00343 	    PUSHL   #7176636						      ;

	      00000000G  00	       07  FB 00349 27$:    CALLS   #7, LIB$SIGNAL					      ;

		         59	  0C   AE  D0 00350 28$:    MOVL    OUT_BUF_PTR, R9					      ; 1096

	      00000000G  EF	       59  D0 00354 	    MOVL    R9, PAT$CP_OUT_STR					      ;

			    00000000G  EF  D4 0035B 	    CLRL    PAT$GL_BUF_SIZ					      ; 1097

			    00000000G  EF  9F 00361 	    PUSHAB  PAT$GB_NEWNAME					      ; 1098

		         7E 00000000G  EF  9A 00367 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

			    00000000'  EF  9F 0036E 	    PUSHAB  NEW_IMG_STR						      ; 0826

	      00000000G  EF	       03  FB 00374 	    CALLS   #3, PAT$FAO_PUT					      ; 1098

			    00000000G  EF  9F 0037B 	    PUSHAB  PAT$GL_JNLRAB					      ; 1099

				       59  DD 00381 	    PUSHL   R9							      ;

			    00000000G  EF  DD 00383 	    PUSHL   PAT$GL_BUF_SIZ					      ;

	      00000000G  EF	       03  FB 00389 	    CALLS   #3, PAT$WRITEFILE					      ;

	   01 00000000G  EF	       03  E0 00390 	    BBS     #3, PAT$GL_FLAGS, 29$				      ; 1103

					   04 00398 	    RET     							      ;

	   01 00000000G  EF	       02  E0 00399 29$:    BBS     #2, PAT$GL_FLAGS, 30$				      ; 1104

					   04 003A1 	    RET     							      ;

		         5A 00000000G  EF  D0 003A2 30$:    MOVL    PAT$GL_ISELHD, ISE_PTR				      ; 1111

		         52	  04   BE  3C 003A9 	    MOVZWL  @4(SP), NEW_ISD_PTR					      ; 1112

		         52	  04   AE  C0 003AD 	    ADDL2   4(SP), NEW_ISD_PTR					      ;

				       55  D4 003B1 	    CLRL    MAX_VBN_WRITTEN					      ; 1113

				       5A  D5 003B3 31$:    TSTL    ISE_PTR						      ; 1114

				       03  12 003B5 	    BNEQ    32$							      ;

				     01C4  31 003B7 	    BRW     49$							      ;

	   57	         5A	       14  C1 003BA 32$:    ADDL3   #20, ISE_PTR, ISD_PTR				      ; 1117

				       53  D4 003BE 	    CLRL    COUNTER						      ; 1118

	   03	    08   A7	       02  E1 003C0 	    BBC     #2, 8(ISD_PTR), 34$					      ; 1119

				     0189  31 003C5 33$:    BRW     47$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-6

; Digital Equipment Corporation

;

		    FD   8F	  0B   A7  91 003C8 34$:    CMPB    11(ISD_PTR), #253					      ; 1120

				       F6  13 003CD 	    BEQL    33$							      ;

	      00000000G  EF	  0C   A7  D0 003CF 	    MOVL    12(ISD_PTR), PAT$GL_OLDRAB+56			      ; 1128

	      00000000G  EF	  0C   A2  D0 003D7 	    MOVL    12(NEW_ISD_PTR), PAT$GL_NEWRAB+56			      ; 1129

		         54	  02   A7  9E 003DF 	    MOVAB   2(ISD_PTR), R4					      ; 1135

	   64	         10	       00  ED 003E3 35$:    CMPZV   #0, #16, (R4), COUNTER				      ;

				       53     003E7									      ;

				       03  12 003E8 	    BNEQ    36$							      ;

				     014F  31 003EA 	    BRW     46$							      ;

				  10   AA  D5 003ED 36$:    TSTL    16(ISE_PTR)						      ; 1138

				       03  13 003F0 	    BEQL    37$							      ;

				     009C  31 003F2 	    BRW     41$							      ;

		         50	       64  3C 003F5 37$:    MOVZWL  (R4), R0						      ; 1144

		         50	       53  C2 003F8 	    SUBL2   COUNTER, R0						      ;

	   50	         50	       09  78 003FB 	    ASHL    #9, R0, R0						      ; 0000

	      00001400   8F	       50  D1 003FF 	    CMPL    R0, #5120						      ; 1144

				       20  18 00406 	    BGEQ    38$							      ;

		         50	       64  3C 00408 	    MOVZWL  (R4), R0						      ; 1150

		         50	       53  C2 0040B 	    SUBL2   COUNTER, R0						      ;

00000000G  EF	         50	0200   8F  A5 0040E 	    MULW3   #512, R0, PAT$GL_OLDRAB+32				      ;

	      00000000G  EF 00000000G  EF  B0 00418 	    MOVW    PAT$GL_OLDRAB+32, PAT$GL_NEWRAB+34			      ; 1151

		         53	       64  3C 00423 	    MOVZWL  (R4), COUNTER					      ; 1152

				       15  11 00426 	    BRB     39$							      ; 1144

	      00000000G  EF	1400   8F  B0 00428 38$:    MOVW    #5120, PAT$GL_OLDRAB+32				      ; 1160

	      00000000G  EF	1400   8F  B0 00431 	    MOVW    #5120, PAT$GL_NEWRAB+34				      ; 1161

		         53	       0A  C0 0043A 	    ADDL2   #10, COUNTER					      ; 1162

	      00000000G  EF	       59  D0 0043D 39$:    MOVL    R9, PAT$GL_OLDRAB+36				      ; 1169

			    00000000G  EF  9F 00444 	    PUSHAB  PAT$GL_OLDRAB					      ; 1170

	      00000000G  9F	       01  FB 0044A 	    CALLS   #1, @#SYS$READ					      ;

	      00000000G  EF	       50  D0 00451 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00458 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1171

		         26	       50  E8 0045F 	    BLBS    R0, 40$						      ;

			    00000000G  EF  DD 00462 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1173

				       50  DD 00468 	    PUSHL   R0							      ;

			    00000000G  EF  9F 0046A 	    PUSHAB  PAT$GB_OLDNAME					      ;

		         7E 00000000G  EF  9A 00470 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 00477 	    PUSHL   R0							      ;

				       03  DD 00479 	    PUSHL   #3							      ;

			    006D818C   8F  DD 0047B 	    PUSHL   #7176588						      ;

	      00000000G  00	       07  FB 00481 	    CALLS   #7, LIB$SIGNAL					      ;

	      00000000G  EF	       59  D0 00488 40$:    MOVL    R9, PAT$GL_NEWRAB+40				      ; 1181

				       4B  11 0048F 	    BRB     43$							      ; 1138

	   51	         53	       09  78 00491 41$:    ASHL    #9, COUNTER, R1					      ; 1202

		         50	       64  3C 00495 	    MOVZWL  (R4), R0						      ; 1190

		         50	       53  C2 00498 	    SUBL2   COUNTER, R0						      ;

	   50	         50	       09  78 0049B 	    ASHL    #9, R0, R0						      ; 0000

	      00001400   8F	       50  D1 0049F 	    CMPL    R0, #5120						      ; 1190

				       1F  18 004A6 	    BGEQ    42$							      ;

		         50	  02   A2  3C 004A8 	    MOVZWL  2(NEW_ISD_PTR), R0					      ; 1200

		         50	       53  C2 004AC 	    SUBL2   COUNTER, R0						      ;

00000000G  EF	         50	0200   8F  A5 004AF 	    MULW3   #512, R0, PAT$GL_NEWRAB+34				      ; 1199

00000000G  EF	    0C   AA	       51  C1 004B9 	    ADDL3   R1, 12(ISE_PTR), PAT$GL_NEWRAB+40			      ; 1201

		         53	       64  3C 004C2 	    MOVZWL  (R4), COUNTER					      ; 1203

				       15  11 004C5 	    BRB     43$							      ; 1190

	      00000000G  EF	1400   8F  B0 004C7 42$:    MOVW    #5120, PAT$GL_NEWRAB+34				      ; 1212



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-7

; Digital Equipment Corporation

;

00000000G  EF	    0C   AA	       51  C1 004D0 	    ADDL3   R1, 12(ISE_PTR), PAT$GL_NEWRAB+40			      ; 1214

		         53	       0A  C0 004D9 	    ADDL2   #10, COUNTER					      ; 1215

			    00000000G  EF  9F 004DC 43$:    PUSHAB  PAT$GL_NEWRAB					      ; 1222

	      00000000G  9F	       01  FB 004E2 	    CALLS   #1, @#SYS$WRITE					      ;

	      00000000G  EF	       50  D0 004E9 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 004F0 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1223

		         26	       50  E8 004F7 	    BLBS    R0, 44$						      ;

			    00000000G  EF  DD 004FA 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1225

				       50  DD 00500 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00502 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00508 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 0050F 	    PUSHL   R0							      ;

				       03  DD 00511 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 00513 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 00519 	    CALLS   #7, LIB$SIGNAL					      ;

	   64	         10	       00  ED 00520 44$:    CMPZV   #0, #16, (R4), COUNTER				      ; 1233

				       53     00524									      ;

				       12  13 00525 	    BEQL    45$							      ;

00000000G  EF	    0C   A7	       53  C1 00527 	    ADDL3   COUNTER, 12(ISD_PTR), PAT$GL_OLDRAB+56		      ; 1236

00000000G  EF	    0C   A2	       53  C1 00530 	    ADDL3   COUNTER, 12(NEW_ISD_PTR), PAT$GL_NEWRAB+56		      ; 1237

				     FEA7  31 00539 45$:    BRW     35$							      ; 1135

		         50	  02   A2  3C 0053C 46$:    MOVZWL  2(NEW_ISD_PTR), R0					      ; 1243

		         50	  0C   A2  C0 00540 	    ADDL2   12(NEW_ISD_PTR), R0					      ;

		         50	       55  D1 00544 	    CMPL    MAX_VBN_WRITTEN, R0					      ;

				       08  1E 00547 	    BGEQU   47$							      ;

		         55	  02   A2  3C 00549 	    MOVZWL  2(NEW_ISD_PTR), MAX_VBN_WRITTEN			      ; 1245

		         55	  0C   A2  C0 0054D 	    ADDL2   12(NEW_ISD_PTR), MAX_VBN_WRITTEN			      ;

		         5A	       6A  D0 00551 47$:    MOVL    (ISE_PTR), ISE_PTR					      ; 1247

		         50	       62  3C 00554 	    MOVZWL  (NEW_ISD_PTR), R0					      ; 1248

		         52	       50  C0 00557 	    ADDL2   R0, NEW_ISD_PTR					      ;

		  FFFF   8F	       62  B1 0055A 	    CMPW    (NEW_ISD_PTR), #65535				      ; 1252

				       1A  12 0055F 	    BNEQ    48$							      ;

	   50	         52	  04   AE  C3 00561 	    SUBL3   4(SP), NEW_ISD_PTR, R0				      ; 1255

		         50	01FF   C0  9E 00566 	    MOVAB   511(R0), R0						      ;

		         50 00000200   8F  C6 0056B 	    DIVL2   #512, R0						      ;

	   50	         50	       09  78 00572 	    ASHL    #9, R0, R0						      ; 0000

	   52	         50	  04   AE  C1 00576 	    ADDL3   4(SP), R0, NEW_ISD_PTR				      ; 1254

				     FE35  31 0057B 48$:    BRW     31$							      ; 1114

	      00000000G  EF	       02  88 0057E 49$:    BISB2   #2, PAT$GL_NEWRAB+4					      ; 1262

				       54  D4 00585 	    CLRL    R4							      ; 1268

				       58  D5 00587 	    TSTL    OLD_IHSYM_PTR					      ;

				       03  12 00589 	    BNEQ    50$							      ;

				     0137  31 0058B 	    BRW     60$							      ;

				       54  D6 0058E 50$:    INCL    R4							      ;

		         52	  08   A8  9E 00590 	    MOVAB   8(OLD_IHSYM_PTR), R2				      ; 1271

				       62  B5 00594 	    TSTW    (R2)						      ;

				       05  13 00596 	    BEQL    51$							      ;

		         02	       68  D1 00598 	    CMPL    (OLD_IHSYM_PTR), #2					      ;

				       03  14 0059B 	    BGTR    52$							      ;

				     0112  31 0059D 51$:    BRW     59$							      ;

				       53  D4 005A0 52$:    CLRL    COUNTER						      ; 1274

		         66	       55  D0 005A2 	    MOVL    MAX_VBN_WRITTEN, (NEW_IHSYM_PTR)			      ; 1275

	      00000000G  EF	       55  D0 005A5 	    MOVL    MAX_VBN_WRITTEN, PAT$GL_NEWRAB+56			      ; 1276

	      00000000G  EF	       68  D0 005AC 	    MOVL    (OLD_IHSYM_PTR), PAT$GL_OLDRAB+56			      ; 1277

	   62	         10	       00  ED 005B3 53$:    CMPZV   #0, #16, (R2), COUNTER				      ; 1278



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-8

; Digital Equipment Corporation

;

				       53     005B7									      ;

				       E3  13 005B8 	    BEQL    51$							      ;

		         50	       62  3C 005BA 	    MOVZWL  (R2), R0						      ; 1284

		         50	       53  C2 005BD 	    SUBL2   COUNTER, R0						      ;

	   50	         50	       09  78 005C0 	    ASHL    #9, R0, R0						      ; 0000

	      00001400   8F	       50  D1 005C4 	    CMPL    R0, #5120						      ; 1284

				       20  18 005CB 	    BGEQ    54$							      ;

		         50	       62  3C 005CD 	    MOVZWL  (R2), R0						      ; 1290

		         50	       53  C2 005D0 	    SUBL2   COUNTER, R0						      ;

00000000G  EF	         50	0200   8F  A5 005D3 	    MULW3   #512, R0, PAT$GL_OLDRAB+32				      ;

	      00000000G  EF 00000000G  EF  B0 005DD 	    MOVW    PAT$GL_OLDRAB+32, PAT$GL_NEWRAB+34			      ; 1291

		         53	       62  3C 005E8 	    MOVZWL  (R2), COUNTER					      ; 1292

				       15  11 005EB 	    BRB     55$							      ; 1284

	      00000000G  EF	1400   8F  B0 005ED 54$:    MOVW    #5120, PAT$GL_OLDRAB+32				      ; 1300

	      00000000G  EF	1400   8F  B0 005F6 	    MOVW    #5120, PAT$GL_NEWRAB+34				      ; 1301

		         53	       0A  C0 005FF 	    ADDL2   #10, COUNTER					      ; 1302

	      00000000G  EF	       59  D0 00602 55$:    MOVL    R9, PAT$GL_OLDRAB+36				      ; 1309

			    00000000G  EF  9F 00609 	    PUSHAB  PAT$GL_OLDRAB					      ; 1310

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

	      00000000G  EF	       50  D0 00616 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 0061D 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1311

		         26	       50  E8 00624 	    BLBS    R0, 56$						      ;

			    00000000G  EF  DD 00627 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1313

				       50  DD 0062D 	    PUSHL   R0							      ;

			    00000000G  EF  9F 0062F 	    PUSHAB  PAT$GB_OLDNAME					      ;

		         7E 00000000G  EF  9A 00635 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 0063C 	    PUSHL   R0							      ;

				       03  DD 0063E 	    PUSHL   #3							      ;

			    006D818C   8F  DD 00640 	    PUSHL   #7176588						      ;

	      00000000G  00	       07  FB 00646 	    CALLS   #7, LIB$SIGNAL					      ;

	      00000000G  EF	       59  D0 0064D 56$:    MOVL    R9, PAT$GL_NEWRAB+40				      ; 1319

			    00000000G  EF  9F 00654 	    PUSHAB  PAT$GL_NEWRAB					      ; 1324

	      00000000G  9F	       01  FB 0065A 	    CALLS   #1, @#SYS$WRITE					      ;

	      00000000G  EF	       50  D0 00661 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00668 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1325

		         26	       50  E8 0066F 	    BLBS    R0, 57$						      ;

			    00000000G  EF  DD 00672 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1327

				       50  DD 00678 	    PUSHL   R0							      ;

			    00000000G  EF  9F 0067A 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00680 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 00687 	    PUSHL   R0							      ;

				       03  DD 00689 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 0068B 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 00691 	    CALLS   #7, LIB$SIGNAL					      ;

	   62	         10	       00  ED 00698 57$:    CMPZV   #0, #16, (R2), COUNTER				      ; 1334

				       53     0069C									      ;

				       10  13 0069D 	    BEQL    58$							      ;

00000000G  EF	         68	       53  C1 0069F 	    ADDL3   COUNTER, (OLD_IHSYM_PTR), PAT$GL_OLDRAB+56		      ; 1337

00000000G  EF	         66	       53  C1 006A7 	    ADDL3   COUNTER, (NEW_IHSYM_PTR), PAT$GL_NEWRAB+56		      ; 1338

				     FF01  31 006AF 58$:    BRW     53$							      ; 1278

		         50	  08   A6  3C 006B2 59$:    MOVZWL  8(NEW_IHSYM_PTR), R0				      ; 1342

		         50	       66  C0 006B6 	    ADDL2   (NEW_IHSYM_PTR), R0					      ;

		         50	       55  D1 006B9 	    CMPL    MAX_VBN_WRITTEN, R0					      ;

				       07  1E 006BC 	    BGEQU   60$							      ;

		         55	  08   A6  3C 006BE 	    MOVZWL  8(NEW_IHSYM_PTR), MAX_VBN_WRITTEN			      ; 1344



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-9

; Digital Equipment Corporation

;

		         55	       66  C0 006C2 	    ADDL2   (NEW_IHSYM_PTR), MAX_VBN_WRITTEN			      ;

	      00000000G  EF	0200   8F  B0 006C5 60$:    MOVW    #512, PAT$GL_NEWRAB+32				      ; 1352

	      00000000G  EF	       59  D0 006CE 	    MOVL    R9, PAT$GL_NEWRAB+36				      ; 1353

				  04   A6  D5 006D5 	    TSTL    4(NEW_IHSYM_PTR)					      ; 1354

				       04  13 006D8 	    BEQL    61$							      ;

		    04   A6	       55  D0 006DA 	    MOVL    MAX_VBN_WRITTEN, 4(NEW_IHSYM_PTR)			      ; 1356

				       55  D5 006DE 61$:    TSTL    MAX_VBN_WRITTEN					      ; 1357

				       0A  13 006E0 	    BEQL    62$							      ;

00000000G  EF	         55	       01  C3 006E2 	    SUBL3   #1, MAX_VBN_WRITTEN, PAT$GL_NEWRAB+56		      ; 1359

				       0D  11 006EA 	    BRB     63$							      ; 1357

			    006D8132   8F  DD 006EC 62$:    PUSHL   #7176498						      ; 1362

	      00000000G  00	       01  FB 006F2 	    CALLS   #1, LIB$SIGNAL					      ;

			    00000000G  EF  9F 006F9 63$:    PUSHAB  PAT$GL_NEWRAB					      ; 1363

	      00000000G  9F	       01  FB 006FF 	    CALLS   #1, @#SYS$READ					      ;

	      00000000G  EF	       50  D0 00706 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 0070D 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1364

		         26	       50  E8 00714 	    BLBS    R0, 64$						      ;

			    00000000G  EF  DD 00717 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1366

				       50  DD 0071D 	    PUSHL   R0							      ;

			    00000000G  EF  9F 0071F 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00725 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 0072C 	    PUSHL   R0							      ;

				       03  DD 0072E 	    PUSHL   #3							      ;

			    006D818C   8F  DD 00730 	    PUSHL   #7176588						      ;

	      00000000G  00	       07  FB 00736 	    CALLS   #7, LIB$SIGNAL					      ;

	      00000000G  EF	  04   A8  D0 0073D 64$:    MOVL    4(OLD_IHSYM_PTR), PAT$GL_OLDRAB+16			      ; 1377

			    00000000G  EF  B4 00745 	    CLRW    PAT$GL_OLDRAB+20					      ; 1378

	      00000000G  EF	       08  88 0074B 	    BISB2   #8, PAT$GL_OLDFAB+7					      ; 1379

	      00000000G  EF	       02  90 00752 	    MOVB    #2, PAT$GL_OLDRAB+30				      ; 1380

	      00000000G  EF	       59  D0 00759 	    MOVL    R9, PAT$GL_NEWRAB+40				      ; 1385

	      00000000G  EF	       59  D0 00760 	    MOVL    R9, PAT$GL_OLDRAB+36				      ; 1386

		         03	       54  E8 00767 	    BLBS    R4, 66$						      ; 1393

				     0132  31 0076A 65$:    BRW     72$							      ;

				  0A   A8  B5 0076D 66$:    TSTW    10(OLD_IHSYM_PTR)					      ;

				       F8  13 00770 	    BEQL    65$							      ;

		         02	  04   A8  D1 00772 	    CMPL    4(OLD_IHSYM_PTR), #2				      ; 1394

				       F2  15 00776 	    BLEQ    65$							      ;

		         53	  0A   A8  3C 00778 	    MOVZWL  10(OLD_IHSYM_PTR), COUNTER				      ; 1397

				       53  D5 0077C 67$:    TSTL    COUNTER						      ; 1398

				       03  14 0077E 	    BGTR    68$							      ;

				     009E  31 00780 	    BRW     71$							      ;

			    00000000G  EF  9F 00783 68$:    PUSHAB  PAT$GL_OLDRAB					      ; 1401

	      00000000G  9F	       01  FB 00789 	    CALLS   #1, @#SYS$GET					      ;

	      00000000G  EF	       50  D0 00790 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00797 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1402

		         26	       50  E8 0079E 	    BLBS    R0, 69$						      ;

			    00000000G  EF  DD 007A1 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1404

				       50  DD 007A7 	    PUSHL   R0							      ;

			    00000000G  EF  9F 007A9 	    PUSHAB  PAT$GB_OLDNAME					      ;

		         7E 00000000G  EF  9A 007AF 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 007B6 	    PUSHL   R0							      ;

				       03  DD 007B8 	    PUSHL   #3							      ;

			    006D818C   8F  DD 007BA 	    PUSHL   #7176588						      ;

	      00000000G  00	       07  FB 007C0 	    CALLS   #7, LIB$SIGNAL					      ;

			    00000000G  EF  94 007C7 69$:    CLRB    PAT$GL_OLDRAB+30					      ; 1406



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-10

; Digital Equipment Corporation

;

	      00000000G  EF 00000000G  EF  B0 007CD 	    MOVW    PAT$GL_OLDRAB+34, PAT$GL_NEWRAB+34			      ; 1407

			    00000000G  EF  9F 007D8 	    PUSHAB  PAT$GL_NEWRAB					      ; 1408

	      00000000G  9F	       01  FB 007DE 	    CALLS   #1, @#SYS$PUT					      ;

	      00000000G  EF	       50  D0 007E5 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 007EC 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1409

		         26	       50  E8 007F3 	    BLBS    R0, 70$						      ;

			    00000000G  EF  DD 007F6 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1411

				       50  DD 007FC 	    PUSHL   R0							      ;

			    00000000G  EF  9F 007FE 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00804 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 0080B 	    PUSHL   R0							      ;

				       03  DD 0080D 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 0080F 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 00815 	    CALLS   #7, LIB$SIGNAL					      ;

				       53  D7 0081C 70$:    DECL    COUNTER						      ; 1413

				     FF5B  31 0081E 	    BRW     67$							      ; 1398

		         50 00000000G  EF  3C 00821 71$:    MOVZWL  PAT$GL_NEWRAB+34, R0				      ; 1422

		         51 00000000G  EF  3C 00828 	    MOVZWL  PAT$GL_NEWRAB+20, R1				      ;

		         50	       51  C0 0082F 	    ADDL2   R1, R0						      ;

00000000G  EF	  01FC   8F	       50  A3 00832 	    SUBW3   R0, #508, PAT$GL_NEWRAB+34				      ;

		         50 00000000G  EF  3C 0083C 	    MOVZWL  PAT$GL_NEWRAB+34, R0				      ; 1423

				       50  D5 00843 	    TSTL    R0							      ;

				       58  15 00845 	    BLEQ    72$							      ;

	      00000200   8F	       50  D1 00847 	    CMPL    R0, #512						      ;

				       4F  18 0084E 	    BGEQ    72$							      ;

      FF   8F	         6E	       00  2C 00850 	    MOVC5   #0, (SP), #255, PAT$GL_NEWRAB+34, (R9)		      ; 1426

		         69 00000000G  EF     00855									      ;

			    00000000G  EF  9F 0085B 	    PUSHAB  PAT$GL_NEWRAB					      ; 1427

	      00000000G  9F	       01  FB 00861 	    CALLS   #1, @#SYS$PUT					      ;

	      00000000G  EF	       50  D0 00868 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 0086F 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1428

		         26	       50  E8 00876 	    BLBS    R0, 72$						      ;

			    00000000G  EF  DD 00879 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1430

				       50  DD 0087F 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00881 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00887 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 0088E 	    PUSHL   R0							      ;

				       03  DD 00890 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 00892 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 00898 	    CALLS   #7, LIB$SIGNAL					      ;

	   50	         6E	       20  C1 0089F 72$:    ADDL3   #32, NEW_IHPAT_PTR, R0				      ; 1438

	   60 00000000G  EF	       01  C1 008A3 	    ADDL3   #1, PAT$GL_NEWRAB+16, (R0)				      ;

		         50 00000000G  EF  D0 008AB 	    MOVL    PAT$GL_IHPPTR, R0					      ; 1444

				  20   A0  D5 008B2 	    TSTL    32(R0)						      ;

				       37  13 008B5 	    BEQL    74$							      ;

	      00000000G  EF	       02  90 008B7 	    MOVB    #2, PAT$GL_OLDRAB+30				      ; 1447

	      00000000G  EF	  20   A0  D0 008BE 	    MOVL    32(R0), PAT$GL_OLDRAB+16				      ; 1448

			    00000000G  EF  B4 008C6 	    CLRW    PAT$GL_OLDRAB+20					      ; 1449

			    00000000G  EF  9F 008CC 73$:    PUSHAB  PAT$GL_OLDRAB					      ; 1456

	      00000000G  9F	       01  FB 008D2 	    CALLS   #1, @#SYS$GET					      ;

	      00000000G  EF	       50  D0 008D9 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 008E0 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1457

	      0001827A   8F	       50  D1 008E7 	    CMPL    R0, #98938						      ;

				       03  12 008EE 74$:    BNEQ    75$							      ;

				     0081  31 008F0 	    BRW     77$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-11

; Digital Equipment Corporation

;

		         26	       50  E8 008F3 75$:    BLBS    R0, 76$						      ; 1460

			    00000000G  EF  DD 008F6 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1462

				       50  DD 008FC 	    PUSHL   R0							      ;

			    00000000G  EF  9F 008FE 	    PUSHAB  PAT$GB_OLDNAME					      ;

		         7E 00000000G  EF  9A 00904 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 0090B 	    PUSHL   R0							      ;

				       03  DD 0090D 	    PUSHL   #3							      ;

			    006D818C   8F  DD 0090F 	    PUSHL   #7176588						      ;

	      00000000G  00	       07  FB 00915 	    CALLS   #7, LIB$SIGNAL					      ;

			    00000000G  EF  94 0091C 76$:    CLRB    PAT$GL_OLDRAB+30					      ; 1464

	      00000000G  EF 00000000G  EF  B0 00922 	    MOVW    PAT$GL_OLDRAB+34, PAT$GL_NEWRAB+34			      ; 1465

			    00000000G  EF  9F 0092D 	    PUSHAB  PAT$GL_NEWRAB					      ; 1466

	      00000000G  9F	       01  FB 00933 	    CALLS   #1, @#SYS$PUT					      ;

	      00000000G  EF	       50  D0 0093A 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00941 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1467

		         81	       50  E8 00948 	    BLBS    R0, 73$						      ;

			    00000000G  EF  DD 0094B 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1469

				       50  DD 00951 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00953 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00959 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 00960 	    PUSHL   R0							      ;

				       03  DD 00962 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 00964 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 0096A 	    CALLS   #7, LIB$SIGNAL					      ;

				     FF58  31 00971 	    BRW     73$							      ; 1449

		         5B 00000000G  EF  D0 00974 77$:    MOVL    PAT$GL_TXTLHD, COM_TXT_PTR				      ; 1480

				       5B  D5 0097B 78$:    TSTL    COM_TXT_PTR						      ; 1481

				       6C  13 0097D 	    BEQL    82$							      ;

	   52	         5B	       04  C1 0097F 	    ADDL3   #4, COM_TXT_PTR, COM_PTR				      ; 1484

				       62  95 00983 79$:    TSTB    (COM_PTR)						      ; 1485

				       5F  13 00985 	    BEQL    81$							      ;

	      00000000G  EF	       62  9B 00987 	    MOVZBW  (COM_PTR), PAT$GL_NEWRAB+34				      ; 1488

00000000G  EF	         52	       01  C1 0098E 	    ADDL3   #1, COM_PTR, PAT$GL_NEWRAB+40			      ; 1489

			    00000000G  EF  9F 00996 	    PUSHAB  PAT$GL_NEWRAB					      ; 1490

	      00000000G  9F	       01  FB 0099C 	    CALLS   #1, @#SYS$PUT					      ;

	      00000000G  EF	       50  D0 009A3 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 009AA 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1491

		         26	       50  E8 009B1 	    BLBS    R0, 80$						      ;

			    00000000G  EF  DD 009B4 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1493

				       50  DD 009BA 	    PUSHL   R0							      ;

			    00000000G  EF  9F 009BC 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 009C2 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 009C9 	    PUSHL   R0							      ;

				       03  DD 009CB 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 009CD 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 009D3 	    CALLS   #7, LIB$SIGNAL					      ;

		         50	       62  9A 009DA 80$:    MOVZBL  (COM_PTR), R0					      ; 1495

		         50	       52  C0 009DD 	    ADDL2   COM_PTR, R0						      ;

	   52	         50	       01  C1 009E0 	    ADDL3   #1, R0, COM_PTR					      ;

				       9D  11 009E4 	    BRB     79$							      ; 1485

		         5B	       6B  D0 009E6 81$:    MOVL    (COM_TXT_PTR), COM_TXT_PTR				      ; 1497

				       90  11 009E9 	    BRB     78$							      ; 1481

			    00000000G  EF  95 009EB 82$:    TSTB    PAT$GB_ECOLVL					      ; 1508

				       24  13 009F1 	    BEQL    84$							      ;

		         50	       6E  D0 009F3 	    MOVL    NEW_IHPAT_PTR, ECO_LEVEL_PTR			      ; 1511



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-12

; Digital Equipment Corporation

;

		         51 00000000G  EF  9A 009F6 	    MOVZBL  PAT$GB_ECOLVL, R1					      ; 1512

				       51  D7 009FD 	    DECL    R1							      ;

	   00	         60	       51  E2 009FF 	    BBSS    R1, (ECO_LEVEL_PTR), 83$				      ;

		         50 00000000G  EF  D0 00A03 83$:    MOVL    PAT$GL_IHPPTR, ECO_LEVEL_PTR			      ; 1513

		         51 00000000G  EF  9A 00A0A 	    MOVZBL  PAT$GB_ECOLVL, R1					      ; 1514

				       51  D7 00A11 	    DECL    R1							      ;

	   00	         60	       51  E2 00A13 	    BBSS    R1, (ECO_LEVEL_PTR), 84$				      ;

	      00000000G  EF	       01  D0 00A17 84$:    MOVL    #1, PAT$GL_NEWRAB+56				      ; 1516

00000000G  EF	    08   AE	0200   8F  A5 00A1E 	    MULW3   #512, NUM_HDR_BLKS, PAT$GL_NEWRAB+34		      ; 1517

	      00000000G  EF	  04   AE  D0 00A29 	    MOVL    4(SP), PAT$GL_NEWRAB+40				      ; 1518

	      00000000G  EF	       02  8A 00A31 	    BICB2   #2, PAT$GL_NEWRAB+4					      ; 1524

			    00000000G  EF  9F 00A38 	    PUSHAB  PAT$GL_NEWRAB					      ; 1525

	      00000000G  9F	       01  FB 00A3E 	    CALLS   #1, @#SYS$WRITE					      ;

	      00000000G  EF	       50  D0 00A45 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00A4C 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1526

		         26	       50  E8 00A53 	    BLBS    R0, 85$						      ;

			    00000000G  EF  DD 00A56 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1528

				       50  DD 00A5C 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00A5E 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00A64 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 00A6B 	    PUSHL   R0							      ;

				       03  DD 00A6D 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 00A6F 	    PUSHL   #7176676						      ;

	      00000000G  00	       07  FB 00A75 	    CALLS   #7, LIB$SIGNAL					      ;

			    00000000G  EF  94 00A7C 85$:    CLRB    PAT$GB_ECOLVL					      ; 1530

	      00000000G  EF	       08  88 00A82 	    BISB2   #8, PAT$GL_NEWFAB+7					      ; 1535

	      00000000G  EF	       01  D0 00A89 	    MOVL    #1, PAT$GL_NEWFAB+24				      ; 1536

	      00000000G  EF	       01  90 00A90 	    MOVB    #1, PAT$GL_NEWFAB+31				      ; 1537

			    00000000G  EF  9F 00A97 	    PUSHAB  PAT$GL_NEWFAB					      ; 1538

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

	      00000000G  EF	       50  D0 00AA4 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00AAB 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1539

		         26	       50  E8 00AB2 	    BLBS    R0, 86$						      ;

			    00000000G  EF  DD 00AB5 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1541

				       50  DD 00ABB 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00ABD 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00AC3 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 00ACA 	    PUSHL   R0							      ;

				       03  DD 00ACC 	    PUSHL   #3							      ;

			    006D81BC   8F  DD 00ACE 	    PUSHL   #7176636						      ;

	      00000000G  00	       07  FB 00AD4 	    CALLS   #7, LIB$SIGNAL					      ;

			    00000000G  EF  9F 00ADB 86$:    PUSHAB  PAT$GL_NEWFAB					      ; 1548

	      00000000G  9F	       01  FB 00AE1 	    CALLS   #1, @#SYS$CLOSE					      ;

	      00000000G  EF	       50  D0 00AE8 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50 00000000G  EF  D0 00AEF 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1549

		         27	       50  E8 00AF6 	    BLBS    R0, 87$						      ;

			    00000000G  EF  DD 00AF9 	    PUSHL   PAT$GL_NEWRAB+12					      ; 1551

				       50  DD 00AFF 	    PUSHL   R0							      ;

			    00000000G  EF  9F 00B01 	    PUSHAB  PAT$GB_NEWNAME					      ;

		         7E 00000000G  EF  9A 00B07 	    MOVZBL  PAT$GL_NEWNBK+3, -(SP)				      ;

				       50  DD 00B0E 	    PUSHL   R0							      ;

				       03  DD 00B10 	    PUSHL   #3							      ;

			    006D815C   8F  DD 00B12 	    PUSHL   #7176540						      ;

	      00000000G  00	       07  FB 00B18 	    CALLS   #7, LIB$SIGNAL					      ;

					   04 00B1F 	    RET     							      ; 1549



; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 4-13

; Digital Equipment Corporation

;

	      00000000G  EF	       08  8A 00B20 87$:    BICB2   #8, PAT$GL_FLAGS					      ; 1554

					   04 00B27 88$:    RET     							      ; 0826



; Routine Size:  2856 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 03:26:36	DBB3:[PATCH.SRC]PATWRT.B32;33					Page 5

; Digital Equipment Corporation

;

;	1558	END								! End of module

;	1559	ELUDOM









							    .GLOBL  LIB$SIGNAL



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

;  _PAT$PLIT      	    28  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(0)

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

;  $CODE$         	     0  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        53         0       258











; Size:		2856 code + 32 data bytes

; Run Time:	01:45.0

; Elapsed Time:	03:24.2

; Memory Used:	802 pages

; Compilation Complete

