

; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE PATMAIN ( MAIN = PAT$MAIN,			! DRIVER FOR PATCH

;	0002			%IF %VARIANT EQL 1

;     L 0003			%THEN

;	0004				ADDRESSING_MODE (EXTERNAL = LONG_RELATIVE, NONEXTERNAL = LONG_RELATIVE),

;	0005			%FI

;	0006			IDENT = 'X01.06'

;	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:  IMAGE FILE PATCH UTILITY, PATCH

;	0031	!

;	0032	! ABSTRACT:  THIS ROUTINE DRIVES PATCH.  IT PERFORMS THE COMMAND LINE

;	0033	!	INTERFACE, THE FILE HANDLING, AND THE COMMAND PROCESSING LOOP.

;	0034	

;	0035	!

;	0036	! ENVIRONMENT:

;	0037	!

;	0038	! AUTHOR:  K.D. MORSE	, CREATION DATE:  29-SEP-77

;	0039	!

;	0040	! MODIFICATIONS:

;	0041	!

;	0042	!  NO	DATE		PROGRAMMER		PURPOSE

;	0043	!  --	----		----------		-------

;	0044	!

;	0045	!  01	20-FEB-78	K.D. MORSE		ADD COMMAND LINE OUTPUT TO

;	0046	!						INDIRECT COMMAND FILE.

;	0047	!  02	2-MAR-78	K.D. MORSE		ADD CODE TO MAKE /UPDATE WORK.

;	0048	!  03	18-APR-78	K.D. MORSE		MAKE COMMAND VERB WORK.

;	0049	!  04	25-APR-78	K.D. MORSE		CONVERT TO NATIVE COMPILER.

;	0050	!  05	13-JUN-78	K.D. MORSE		ADD FAO COUNTS TO SIGNALS.

;	0051	!  06	16-JUN-78	K.D. MORSE		ALWAYS TRY TO OUTPUT THE COMMAND

;	0052	!						LINE TO OUTPUT COMMAND FILE.

;	0053	!						THIS CAUSES IT TO GO INTO THE

;	0054	!						APPENDED PATCH COMMAND TEXT.

;	0055	!



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 1-1

; Digital Equipment Corporation

;

;	0056	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 2

; Digital Equipment Corporation

;

;	0057	!

;	0058	! TABLE OF CONTENTS:

;	0059	!

;	0060	

;	0061	FORWARD ROUTINE

;	0062		CLIERROR : NOVALUE,					! CALLED FOR ALL CLI ERRORS

;	0063		OPEN_INPUT : NOVALUE,					! OPENS THE INPUT IMAGE FILE

;	0064		OPEN_OUTPUT : NOVALUE,					! INITIALIZES FOR FUTURE OUTPUT IMAGE FILE OPEN

;	0065		OPEN_JOURNAL : NOVALUE,					! OPENS THE JOURNAL FILE

;	0066		PAT$OPEN_COMFIL : NOVALUE;				! OPENS THE COMMAND FILE

;	0067	

;	0068	!

;	0069	! INCLUDE FILES:

;	0070	!

;	0071	

;	0072	LIBRARY 'SYS$LIBRARY:STARLET.L32';				! SYSTEM STRUCTURE DEFINITIONS

;	0073	REQUIRE 'SRC$:PATPCT.REQ';					! DEFINE PSECTS

;	0089	REQUIRE 'SRC$:PREFIX.REQ';					! UTILITY MACROS

;	0272	REQUIRE 'SRC$:CLIMAC.REQ';					! CLI STRUCTURE ALLOCATION

;	0409	REQUIRE 'SRC$:PATPRE.REQ';					! DEFINES PATCH LITERALS

;	0549	REQUIRE 'LIB$:PATMSG.REQ';					! DEFINES PATCH ERROR MESSAGE NUMBERS

;	0707	REQUIRE 'SRC$:VXSMAC.REQ';					! DEFINE LITERALS

;	0747	REQUIRE 'SRC$:SYSLIT.REQ';					! DEFINES SYSTEM LITERALS

;	0782	REQUIRE 'SRC$:SYSSER.REQ';					! DEFINES FAL OUTPUT MACROS

;      R0790	SWITCHES LIST (SOURCE);

;      R0791	

;      R0792	EXTERNAL ROUTINE

;      R0793		PAT$fao_out;		! formats a line and outputs to the terminal

;      R0794	

;      R0795	SWITCHES LIST (NOSOURCE);

;	0840	

;	0841	!

;	0842	! EXTERNAL REFERENCES:

;	0843	!

;	0844	

;	0845	EXTERNAL ROUTINE

;	0846		PAT$FIND_DST,						! INITIALIZES SYMBOL TABLES

;	0847		pat$com_proc,						! PATCH COMMAND PROCESSOR

;	0848		PAT$FAO_PUT,						! FORMATS OUTPUT MESSAGE

;	0849		PAT$INIT,						! OPEN COMMUNICATION CHANNELS

;	0850		PAT$GET_IHD,						! PROCESS IMAGE HEADER INFORMATION

;	0851		PAT$CLOSEFILES,						! CLOSE ALL FILES

;	0852		PAT$WRITEFILE,						! OUTPUTS MESSAGE TO A FILE

;	0853		PAT$ERR_HANDLER;					! ERROR MESSAGE HANDLER

;	0854	

;	0855	EXTERNAL

;	0856		PAT$GB_EXEC_CMD : BYTE,					! INDICATOR WHETHER OR NOT TO EXECUTE PATCH COMMANDS

;	0857		PAT$CP_OUT_STR : REF VECTOR[,BYTE],			! POINTER TO OUTPUT BUFFER

;	0858		PAT$GL_BUF_SIZ,						! SIZE OF MESSAGE IN OUTPUT BUFFER

;	0859		PAT$GB_TAKE_CMD: BYTE,					! INDICATOR TO PROCESS COMMANDS

;	0860		PAT$GL_ERRCODE,						! ERROR CODE

;	0861		PAT$GL_HEAD_LST,					! HEAD OF PATCH COMMAND ARGUMENT LIST

;	0862		PAT$GL_IMGBLKS,						! NUMBER OF BLOCKS IN NEW IMAGE

;	0863		PAT$GL_ECO_UPD,						! ECO LEVELS TO UPDATE

;	0864		PAT$GL_FLAGS,						! CLI PARSE FLAGS



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 2-1

; Digital Equipment Corporation

;

;	0865		PAT$GL_OLDFAB : BLOCK[,BYTE],				! INPUT IMAGE FILE FAB

;	0866		PAT$GL_OLDRAB : BLOCK[,BYTE],				! INPUT IMAGE FILE RAB

;	0867		PAT$GL_OLDNBK : BLOCK[,BYTE],				! INPUT IMAGE FILE NAME BLOCK

;	0868		PAT$GL_NEWFAB : BLOCK[,BYTE],				! OUTPUT IMAGE FILE FAB

;	0869		PAT$GL_NEWRAB : BLOCK[,BYTE],				! OUTPUT IMAGE FILE RAB

;	0870		PAT$GL_NEWNBK : BLOCK[,BYTE],				! OUTPUT IMAGE FILE NAME BLOCK

;	0871		PAT$GL_JNLFAB : BLOCK[,BYTE],				! JOURNAL FILE FAB

;	0872		PAT$GL_JNLRAB : BLOCK[,BYTE],				! JOURNAL FILE RAB

;	0873		PAT$GL_JNLNBK : BLOCK[,BYTE],				! JOURNAL FILE NAME BLOCK

;	0874		PAT$GL_COMFAB : BLOCK[,BYTE],				! OUTPUT COMMAND FILE FAB

;	0875		PAT$GL_COMRAB : BLOCK[,BYTE],				! OUTPUT COMMAND FILE RAB

;	0876		PAT$GL_COMNBK : BLOCK[,BYTE],				! OUTPUT COMMAND FILE NAME BLOCK

;	0877		PAT$GB_OLDNAME,						! OLD IMAGE FILE NAME

;	0878		PAT$GB_NEWNAME,						! NEW IMAGE FILE NAME

;	0879		PAT$GB_JNLNAME,						! JOURNAL FILE NAME

;	0880		PAT$GB_COMNAME;						! COMMAND FILE NAME

;	0881	

;	0882	!

;	0883	! MACROS:

;	0884	!

;	0885	

;	0886	!

;	0887	! EQUATED SYMBOLS:

;	0888	!

;	0889	

;	0890	$CLIQUALCODES(PATCH,						! FOR PATCH

;     P 0891				UPDATE);				! UPDATE SPECIFIC ECO LEVELS

;	0892	

;	0893	!

;	0894	! OWN STORAGE:

;	0895	!

;	0896	

;	0897	OWN

;	0898		INITPRS_DESC : $CLIREQDESC(				! INITIAL PARSE OF COMMAND LINE

;     P 0899					RQTYPE=INITPRS,			! TYPE OF REQUEST

;     P 0900					ERRACT=CLIERROR-INITPRS_DESC),	! ERROR ACTION ROUTINE

;	0901	

;	0902		ENDPRS_DESC : $CLIREQDESC(				! END PARSE OF COMMAND LINE

;     P 0903					RQTYPE=ENDPRM1,			! TYPE OF REQUEST

;     P 0904					ERRACT=CLIERROR-ENDPRS_DESC),	! ERROR ACTION ROUTINE

;	0905	

;	0906		UPDATE_VAL_DESC: $CLIREQDESC(				! UPDATE VALUES REQUEST DESCRIPTOR

;     P 0907					RQTYPE=NUMERVAL,		! CONVERT VALUE TO NUMERIC

;     P 0908					ERRACT=CLIERROR-UPDATE_VAL_DESC), ! ERROR ROUTINE

;	0909	

;	0910		UPDATE_DESC : $CLIQUALDESC(				! UPDATE QUALIFIER DESCRIPTOR

;     P 0911					QDCODE=UPDATE,			! QUALIFIER CODE

;     P 0912					SETLST=PAT$S_UPDATE),		! UPDATE QUALIFIER BIT

;	0913		INPUT_QUAL_END : $CLIQUALEND,				! END OF INPUT QUALIFIERS

;	0914	

;	0915		INPUT_DESC : $CLIREQDESC(				! INPUT FILE REQUEST DESCRIPTOR

;     P 0916					RQTYPE=INPUT1,			! PRIMARY INPUT FILE

;     P 0917					RQFLGS=PARMREQ,			! REQUIRED PARAMETER

;     P 0918					ERRACT=CLIERROR-INPUT_DESC,	! ERROR ROUTINE

;     P 0919					PRSACT=OPEN_INPUT-INPUT_DESC,	! OPEN INPUT FILE



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 2-2

; Digital Equipment Corporation

;

;     P 0920					QUALST=UPDATE_DESC-INPUT_DESC,	! INPUT FILE QUALIFIER LIST

;     P 0921					BITNUM=PAT$S_INPUT),		! INPUT FILE BIT

;	0922	

;	0923		OUTPUT_DESC : $CLIREQDESC(				! OUTPUT FILE REQUEST DESCRIPTOR

;     P 0924					RQTYPE=OUTPUT1,			! PRIMARY OUTPUT FILE

;     P 0925					ERRACT=CLIERROR-OUTPUT_DESC,	! ERROR ROUTINE

;     P 0926					PRSACT=OPEN_OUTPUT-OUTPUT_DESC,	! OPEN OUTPUT FILE

;     P 0927					BITNUM=PAT$S_OUTPUT),		! OUTPUT FILE BIT

;	0928	

;	0929		JOURNAL_DESC : $CLIREQDESC(				! JOURNAL FILE REQUEST DESCRIPTOR

;     P 0930					RQTYPE=OUTPUT2,			! SECONDARY OUTPUT FILE

;     P 0931					ERRACT=CLIERROR-JOURNAL_DESC,	! ERROR ROUTINE

;     P 0932					PRSACT=OPEN_JOURNAL-JOURNAL_DESC, ! OPEN JOURNAL FILE

;     P 0933					BITNUM=PAT$S_JOURNAL),		! JOURNAL FILE BIT

;	0934	

;	0935		COMMAND_DESC : $CLIREQDESC(				! COMMAND FILE REQUEST DESCRIPTOR

;     P 0936					RQTYPE=OUTPUT3,			! TERTIARY OUTPUT FILE

;     P 0937					ERRACT=CLIERROR-COMMAND_DESC,	! ERROR ROUTINE

;     P 0938					PRSACT=PAT$OPEN_COMFIL-COMMAND_DESC, ! OPEN COMMAND FILE

;     P 0939					BITNUM=PAT$S_COMMAND),		! COMMAND FILE BIT

;	0940	

;	0941		COMLINE_DESC : $CLIREQDESC(				! COMMAND LINE REQUEST DESCRIPTOR

;     P 0942					RQTYPE=GETCMD,			! COMMAND LINE REQUEST

;     P 0943					ERRACT=CLIERROR-COMLINE_DESC);	! ERROR ACTION ROUTINE

;	0944	

;	0945	!++

;	0946	! FAO control string for output of command line to command file.

;	0947	!--

;	0948	BIND

;	0949		COM_STR		= UPLIT ( %ASCIC 'COMMAND FILE:			"!AD"'),

;	0950		COM_LINE_STR	= UPLIT (%ASCIC '!AS');



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3

; Digital Equipment Corporation

;

;	0951	GLOBAL ROUTINE PAT$MAIN (DMY1,RECALLCLI,DMY2,DMY3) :NOVALUE =		! MAIN PATCH DRIVER

;	0952	

;	0953	!++

;	0954	! FUNCTIONAL DESCRIPTION:

;	0955	!

;	0956	! THIS MODULE IS THE DRIVER FOR THE IMAGE FILE PATCH UTILTIY.

;	0957	! IT PERFORMS THE FOLLOWING:

;	0958	!

;	0959	!	1.  REPEATEDLY CALLS BACK THE CLI REQUESTING THE PIECES OF THE

;	0960	!	    COMMAND LINE

;	0961	!	2.  OPENS THE FILES FOR INPUT AND OUTPUT

;	0962	!	3.  CALLS THE ROUTINE TO MAP THE INPUT IMAGE FILE

;	0963	!	4.  LOOPS, CALLING APPROPRIATE ROUTINES TO HANDLE PATCH COMMANDS

;	0964	!	5.  CLOSES ALL FILES

;	0965	!

;	0966	!

;	0967	! FORMAL PARAMETERS:

;	0968	!

;	0969	!	DMY1 = DUMMY ARGUMENT

;	0970	!	RECALLCLI = THE ADDRESS OF THE CALL BACK ROUTINE IN THE CLI

;	0971	!	DMY2 = DUMMY ARGUMENT

;	0972	!	DMY3 = DUMMY ARGUMENT

;	0973	!

;	0974	! IMPLICIT INPUTS:

;	0975	!

;	0976	!	CLI HAS THE COMMAND LINE.

;	0977	!	THE FABS AND RABS ARE INITIALIZED, SAVE FOR FILE NAMES.

;	0978	!

;	0979	! IMPLICIT OUTPUTS:

;	0980	!

;	0981	!	NONE

;	0982	!

;	0983	! ROUTINE VALUE:	NONE

;	0984	!

;	0985	! COMPLETION CODES:

;	0986	!

;	0987	!	NONE

;	0988	!

;	0989	! SIDE EFFECTS:

;	0990	!

;	0991	!	THE INPUT AND OUTPUT FILES ARE OPENED.  THE COMMAND LINE IS PROCESSED.

;	0992	!	THE PATCH COMMANDS ARE EXECUTED.

;	0993	!

;	0994	!--

;	0995	

;	0996	BEGIN

;	0997	BIND

;	0998		NEW_IMG_STR	= UPLIT ( %ASCIC 'IMAGE FILE BEING PATCHED:	"!AD"'),

;	0999		JNL_STR		= UPLIT ( %ASCIC 'JOURNAL FILE:			"!AD"'),

;	1000		UPDATE_STR	= UPLIT ( %ASCIC 'UPDATE QUALIFIER VALUES:	'),

;	1001		UPD_VAL_STR	= UPLIT ( %ASCIC ' !UL,');

;	1002	

;	1003	LOCAL	CLIWRK : BLOCK[CLI$C_WORKAREA,BYTE],			! CLI WORK AREA

;	1004		BIT_NUMBER,						! ECO LEVEL BIT COUNTER

;	1005		OUT_BUFFER : VECTOR[TTY_OUT_WIDTH,BYTE];		! OUTPUT BUFFER FOR JOURNAL MESSAGES



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-1

; Digital Equipment Corporation

;

;	1006	

;	1007	ENABLE PAT$ERR_HANDLER;						! DECLARE ERROR HANDLER

;	1008	

;	1009	!++

;	1010	! OPEN COMMUNICATION CHANNELS AND INITIALIZE CONTEXT DATA,ETC.

;	1011	!--

;	1012	PAT$INIT();							! OPEN CHANNELS

;	1013	

;	1014	!++

;	1015	! INITIALIZE PARSE OF COMMAND LINE.

;	1016	!--

;	1017	PAT$GL_ERRCODE=(.RECALLCLI)(INITPRS_DESC,CLIWRK);		! INITIATE COMMAND LINE PARSE

;	1018	IF NOT .PAT$GL_ERRCODE						! IF ERROR IN PARSE

;	1019	THEN

;	1020		SIGNAL(PAT$_INITPRS,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE);	! REPORT ERROR

;	1021	

;	1022	!++

;	1023	! REQUEST INPUT FILE FROM CLI.  PRESENT ACTION ROUTINE WILL OPEN INPUT FILE.

;	1024	!--

;	1025	PAT$GL_ERRCODE=(.RECALLCLI)(INPUT_DESC,CLIWRK,PAT$GL_FLAGS); ! PARSE INPUT FILE

;	1026	IF NOT .PAT$GL_ERRCODE						! IF ERROR IN PARSE

;	1027	THEN

;	1028		SIGNAL(PAT$_PRIMIN,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE);	! REPORT ERROR

;	1029	

;	1030	!++

;	1031	! REQUEST IMAGE OUTPUT FILE FROM CLI.  PRESENT ACTION ROUTINE WILL

;	1032	! OPEN THE OUTPUT IMAGE FILE.

;	1033	!--

;	1034	PAT$GL_ERRCODE=(.RECALLCLI)(OUTPUT_DESC,CLIWRK,PAT$GL_FLAGS);	! PARSE IMAGE OUTPUT FILE

;	1035	IF NOT .PAT$GL_ERRCODE						! IF ERROR IN PARSE

;	1036	THEN

;	1037		SIGNAL(PAT$_PRIMOUT,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE); ! REPORT ERROR

;	1038	

;	1039	!++

;	1040	! REQUEST JOURNAL FILE FROM CLI.  JOURNAL FILE WILL BE OPENED BY

;	1041	! THE PRESENT ACTION ROUTINE.

;	1042	!--

;	1043	PAT$GL_ERRCODE=(.RECALLCLI)(JOURNAL_DESC,CLIWRK,PAT$GL_FLAGS);	! PARSE JOURNAL FILE

;	1044	IF NOT .PAT$GL_ERRCODE						! IF ERROR IN PARSE

;	1045	THEN

;	1046		SIGNAL(PAT$_SECOUT,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE);	! REPORT ERROR

;	1047	

;	1048	!++

;	1049	! REQUEST COMMAND OUTPUT FILE FROM CLI.  IF A COMMAND FILE IS TO BE CREATED,

;	1050	! IT WILL BE OPENED BY THE PRESENT ACTION ROUTINE.

;	1051	!--

;	1052	PAT$GL_ERRCODE=(.RECALLCLI)(COMMAND_DESC,CLIWRK,PAT$GL_FLAGS); ! PARSE COMMAND FILE

;	1053	IF NOT .PAT$GL_ERRCODE						! IF ERROR IN PARSE

;	1054	THEN

;	1055		SIGNAL(PAT$_TEROUT,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE);	! REPORT ERROR

;	1056	

;	1057	!++

;	1058	! IF THE UPDATE QUALIFIER WAS SPECIFIED, THEN REQUEST AN

;	1059	! ECO LEVEL FROM CLI.  THIS CALL CONVERTS IT TO A NUMERIC VALUE.

;	1060	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-2

; Digital Equipment Corporation

;

;	1061	IF (.PAT$GL_FLAGS AND PAT$M_UPDATE) NEQ 0			! IF /UPDATE SPECIFIED

;	1062	THEN

;	1063		BEGIN

;	1064		DO							! REPEATEDLY

;	1065			BEGIN						! GET AN ECO LEVEL AND

;	1066			PAT$GL_ERRCODE=(.RECALLCLI)(UPDATE_VAL_DESC,CLIWRK,UPDATE_DESC);

;	1067			IF NOT .PAT$GL_ERRCODE				! IF ERROR

;	1068			THEN

;	1069				SIGNAL(PAT$_NUMVAL,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE); ! REPORT ERROR

;	1070			PAT$GL_ECO_UPD<.UPDATE_VAL_DESC[CLI$L_RQVALU]-1,1>=1;

;	1071			END						! SET THE CORRESPONDING ECO BIT

;	1072		UNTIL							! UNTIL THERE ARE NO MORE

;	1073			.UPDATE_VAL_DESC[CLI$V_MOREVALS] EQL 0;

;	1074		PAT$GB_EXEC_CMD = FALSE;				! SET INDICATOR NOT TO EXECUTE COMMANDS

;	1075		END

;	1076	ELSE

;	1077		PAT$GB_EXEC_CMD = TRUE;					! SET INDICATOR TO EXECUTE ALL COMMANDS

;	1078	

;	1079	!++

;	1080	! FINISH UP THE COMMAND LINE PARSE.

;	1081	!--

;	1082	PAT$GL_ERRCODE=(.RECALLCLI)(ENDPRS_DESC,CLIWRK);		! END PARSE OF COMMAND LINE

;	1083	IF NOT .PAT$GL_ERRCODE						! IF ERROR

;	1084	THEN

;	1085		SIGNAL(PAT$_ENDPRS,1,.PAT$GL_ERRCODE,.PAT$GL_ERRCODE);	! THE OUTPUT MESSAGE

;	1086	

;	1087	!++

;	1088	! OUTPUT WELCOME MESSAGE.

;	1089	!--

;	1090	$FAO_TT_OUT('!/!/  PATCH BASE LEVEL X5.04  15 DEC 77!/');

;	1091	

;	1092	!++

;	1093	! OUTPUT COMMAND INFORMATION TO JOURNAL FILE.

;	1094	!--

;	1095	PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1096	PAT$GL_BUF_SIZ = 0;

;	1097	PAT$FAO_PUT(NEW_IMG_STR, .PAT$GL_OLDNBK[NAM$B_RSL], PAT$GB_OLDNAME);

;	1098	PAT$WRITEFILE(.PAT$GL_BUF_SIZ, CH$PTR(OUT_BUFFER, 0), PAT$GL_JNLRAB);

;	1099	PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1100	PAT$GL_BUF_SIZ = 0;

;	1101	PAT$FAO_PUT(JNL_STR, .PAT$GL_JNLNBK[NAM$B_RSL], PAT$GB_JNLNAME);

;	1102	PAT$WRITEFILE(.PAT$GL_BUF_SIZ, CH$PTR(OUT_BUFFER, 0), PAT$GL_JNLRAB);

;	1103	IF (.PAT$GL_FLAGS AND PAT$M_COMMAND) NEQ 0

;	1104	THEN

;	1105		BEGIN

;	1106		PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1107		PAT$GL_BUF_SIZ = 0;

;	1108		PAT$FAO_PUT(COM_STR, .PAT$GL_COMNBK[NAM$B_RSL], PAT$GB_COMNAME);

;	1109		PAT$WRITEFILE(.PAT$GL_BUF_SIZ, CH$PTR(OUT_BUFFER, 0), PAT$GL_JNLRAB);

;	1110		END;

;	1111	

;	1112	!++

;	1113	! Call back the CLI to get a descriptor for the command line.  This may be

;	1114	! later used by the "CREATE" command.  In any case, an attempt is made to write

;	1115	! the command line to the output command file.  This places it in the appended



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-3

; Digital Equipment Corporation

;

;	1116	! patch command text buffer even if no output command file is being written.

;	1117	!--

;	1118	PAT$GL_ERRCODE = (.RECALLCLI) (COMLINE_DESC, CLIWRK);

;	1119	IF NOT .PAT$GL_ERRCODE

;	1120	THEN

;	1121		SIGNAL(.PAT$GL_ERRCODE);

;	1122	PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1123	PAT$GL_BUF_SIZ = 0;

;	1124	PAT$FAO_PUT(COM_LINE_STR, CH$PTR(COMLINE_DESC[CLI$Q_RQDESC], 0));

;	1125	PAT$WRITEFILE(.PAT$GL_BUF_SIZ, OUT_BUFFER, PAT$GL_COMRAB);

;	1126	IF (.PAT$GL_FLAGS AND PAT$M_UPDATE) NEQ 0

;	1127	THEN

;	1128		BEGIN

;	1129		PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1130		PAT$GL_BUF_SIZ = 0;

;	1131		PAT$FAO_PUT(UPDATE_STR);

;	1132		BIT_NUMBER = PAT$K_MIN_ECO;

;	1133		WHILE .BIT_NUMBER LEQ PAT$K_MAX_ECO

;	1134		DO

;	1135			BEGIN

;	1136			IF .PAT$GL_ECO_UPD<.BIT_NUMBER-1, 1>

;	1137			THEN

;	1138				PAT$FAO_PUT(UPD_VAL_STR, .BIT_NUMBER);

;	1139			BIT_NUMBER = .BIT_NUMBER + 1;

;	1140			END;

;	1141		PAT$WRITEFILE(.PAT$GL_BUF_SIZ-1, CH$PTR(OUT_BUFFER, 0), PAT$GL_JNLRAB);

;	1142		END;

;	1143	

;	1144	!++

;	1145	! READ THE IMAGE HEADER AND SET UP THE IMAGE SECTION TABLE.

;	1146	!--

;	1147	PAT$GET_IHD();							! GET INFO FROM IMAGE HEADER

;	1148	

;	1149	!++

;	1150	! INITALIZE SYMBOL TABLES FROM RST AND GST IN OLD IMAGE FILE.

;	1151	!--

;	1152	PAT$FIND_DST();

;	1153	

;	1154	!++

;	1155	! THIS IS THE LOOP WHICH CAUSES PATCH COMMANDS TO BE PROCESSED.

;	1156	! AS LONG AS THERE ARE COMMANDS TO PROCESS, THE COMMAND FLAG IS ON.

;	1157	! IT IS TURNED OFF WHEN EOF IS ENCOUNTERED.

;	1158	!--

;	1159	PAT$GB_TAKE_CMD = TRUE;						! PROCESS COMMANDS

;	1160	WHILE .PAT$GB_TAKE_CMD DO

;	1161	

;	1162		PAT$COM_PROC();

;	1163	

;	1164	!++

;	1165	! CLOSE ALL FILES.

;	1166	!--

;	1167	PAT$CLOSEFILES();						! FINISH UP

;	1168	

;	1169	END;								! END OF PAT$MAIN





; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-4

; Digital Equipment Corporation

;



							    .TITLE  PATMAIN

							    .IDENT  \X01.06\



							    .PSECT  _PAT$PLIT,NOWRT,NOEXE,0



					      00000 P.AAA:  .ASCII  <21>\COMMAND FILE:\<9><9><9>\"!AD"\<0><0>		      ;

					      00018 P.AAB:  .ASCII  <3>\!AS\						      ;

					      0001C P.AAC:  .ASCII  <31>\IMAGE FILE BEING PATCHED:\<9>\"!AD"\		      ;

					      0003C P.AAD:  .ASCII  <21>\JOURNAL FILE:\<9><9><9>\"!AD"\<0><0>		      ;

					      00054 P.AAE:  .ASCII  <25>\UPDATE QUALIFIER VALUES:\<9><0><0>		      ;

					      00070 P.AAF:  .ASCII  <5>\ !UL,\<0><0>					      ;

					      00078 P.AAG:  .BYTE   41							      ;

					      00079 	    .ASCII  \!/!/  PATCH BASE LEVEL X5.04  15 DEC 77!/\		      ;

					      000A2	    .BLKB   2



							    .PSECT  _PAT$OWN,NOEXE,2



					      00000 INITPRS_DESC:

							    .BYTE   0							      ;

					      00001 	    .BYTE   0							      ;

					      00002 	    .BYTE   0							      ;

					      00003 	    .BYTE   0							      ;

					      00004 	    .LONG    <CLIERROR-INITPRS_DESC>				      ;

					      00008 	    .LONG   0, 0						      ;

					      00010 	    .LONG   0							      ;

					      00014 	    .LONG   0							      ;

					      00018 	    .LONG   0							      ;

					      0001C ENDPRS_DESC:

							    .BYTE   48							      ;

					      0001D 	    .BYTE   0							      ;

					      0001E 	    .BYTE   0							      ;

					      0001F 	    .BYTE   0							      ;

					      00020 	    .LONG    <CLIERROR-ENDPRS_DESC>				      ;

					      00024 	    .LONG   0, 0						      ;

					      0002C 	    .LONG   0							      ;

					      00030 	    .LONG   0							      ;

					      00034 	    .LONG   0							      ;

					      00038 UPDATE_VAL_DESC:

							    .BYTE   64							      ;

					      00039 	    .BYTE   0							      ;

					      0003A 	    .BYTE   0							      ;

					      0003B 	    .BYTE   0							      ;

					      0003C 	    .LONG    <CLIERROR-UPDATE_VAL_DESC>				      ;

					      00040 	    .LONG   0, 0						      ;

					      00048 	    .LONG   0							      ;

					      0004C 	    .LONG   0							      ;

					      00050 	    .LONG   0							      ;

					      00054 UPDATE_DESC:

							    .BYTE   24							      ;

					      00055 	    .BYTE    CLI$K_PATC_UPDA					      ;

					      00056 	    .WORD   0							      ;

					      00058 	    .LONG   0, 0						      ;

					      00060 	    .LONG   0							      ;

					      00064 	    .LONG   0							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-5

; Digital Equipment Corporation

;

					      00068 	    .BYTE   0							      ;

					      00069 	    .BYTE   1, 4						      ;

					      0006B 	    .BYTE   0							      ;

					      0006C INPUT_QUAL_END:

							    .BYTE   0							      ;

					      0006D	    .BLKB   3

					      00070 INPUT_DESC:

							    .BYTE   16							      ;

					      00071 	    .BYTE   2							      ;

					      00072 	    .BYTE   1							      ;

					      00073 	    .BYTE   0							      ;

					      00074 	    .LONG    <CLIERROR-INPUT_DESC>				      ;

					      00078 	    .LONG   0, 0						      ;

					      00080 	    .LONG    <OPEN_INPUT-INPUT_DESC>				      ;

					      00084 	    .LONG   0							      ;

					      00088 	    .LONG    <UPDATE_DESC-INPUT_DESC>				      ;

					      0008C OUTPUT_DESC:

							    .BYTE   32							      ;

					      0008D 	    .BYTE   3							      ;

					      0008E 	    .BYTE   0							      ;

					      0008F 	    .BYTE   0							      ;

					      00090 	    .LONG    <CLIERROR-OUTPUT_DESC>				      ;

					      00094 	    .LONG   0, 0						      ;

					      0009C 	    .LONG    <OPEN_OUTPUT-OUTPUT_DESC>				      ;

					      000A0 	    .LONG   0							      ;

					      000A4 	    .LONG   0							      ;

					      000A8 JOURNAL_DESC:

							    .BYTE   33							      ;

					      000A9 	    .BYTE   1							      ;

					      000AA 	    .BYTE   0							      ;

					      000AB 	    .BYTE   0							      ;

					      000AC 	    .LONG    <CLIERROR-JOURNAL_DESC>				      ;

					      000B0 	    .LONG   0, 0						      ;

					      000B8 	    .LONG    <OPEN_JOURNAL-JOURNAL_DESC>			      ;

					      000BC 	    .LONG   0							      ;

					      000C0 	    .LONG   0							      ;

					      000C4 COMMAND_DESC:

							    .BYTE   34							      ;

					      000C5 	    .BYTE   0							      ;

					      000C6 	    .BYTE   0							      ;

					      000C7 	    .BYTE   0							      ;

					      000C8 	    .LONG    <CLIERROR-COMMAND_DESC>				      ;

					      000CC 	    .LONG   0, 0						      ;

					      000D4 	    .LONG    <PAT$OPEN_COMFIL-COMMAND_DESC>			      ;

					      000D8 	    .LONG   0							      ;

					      000DC 	    .LONG   0							      ;

					      000E0 COMLINE_DESC:

							    .BYTE   1							      ;

					      000E1 	    .BYTE   0							      ;

					      000E2 	    .BYTE   0							      ;

					      000E3 	    .BYTE   0							      ;

					      000E4 	    .LONG    <CLIERROR-COMLINE_DESC>				      ;

					      000E8 	    .LONG   0, 0						      ;

					      000F0 	    .LONG   0							      ;

					      000F4 	    .LONG   0							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-6

; Digital Equipment Corporation

;

					      000F8 	    .LONG   0							      ;



						    ISE$C_SIZE==	20

						    TXT$C_SIZE==	4

						    PAL$C_SIZE==	16

						    ASD$C_SIZE==	9

						    FWR$C_SIZE==	24

						    COM_STR=		P.AAA

						    COM_LINE_STR=	P.AAB

						    NEW_IMG_STR=	P.AAC

						    JNL_STR=		P.AAD

						    UPDATE_STR=		P.AAE

						    UPD_VAL_STR=	P.AAF

							    .GLOBL  PAT$FAO_OUT, PAT$FIND_DST, PAT$COM_PROC, PAT$FAO_PUT

							    .GLOBL  PAT$INIT, PAT$GET_IHD, PAT$CLOSEFILES, PAT$WRITEFILE

							    .GLOBL  PAT$ERR_HANDLER, PAT$GB_EXEC_CMD, PAT$CP_OUT_STR

							    .GLOBL  PAT$GL_BUF_SIZ, PAT$GB_TAKE_CMD, PAT$GL_ERRCODE

							    .GLOBL  PAT$GL_HEAD_LST, PAT$GL_IMGBLKS, PAT$GL_ECO_UPD

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

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

							    .GLOBL  PAT$GL_JNLRAB, PAT$GL_JNLNBK, PAT$GL_COMFAB, PAT$GL_COMRAB

							    .GLOBL  PAT$GL_COMNBK, PAT$GB_OLDNAME, PAT$GB_NEWNAME

							    .GLOBL  PAT$GB_JNLNAME, PAT$GB_COMNAME, CLI$K_PATC_UPDA



							    .PSECT  _PAT$CODE,NOWRT,2



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

		         53 00000000G  EF  9E 00002 	    MOVAB   PAT$WRITEFILE, R3					      ;

		         54 00000000G  EF  9E 00009 	    MOVAB   PAT$CP_OUT_STR, R4					      ;

		         55 00000000G  EF  9E 00010 	    MOVAB   PAT$FAO_PUT, R5					      ;

		         56 00000000'  EF  9E 00017 	    MOVAB   P.AAG, R6						      ;

		         57 00000000G  EF  9E 0001E 	    MOVAB   PAT$GL_FLAGS, R7					      ;

		         58 00000000G  00  9E 00025 	    MOVAB   LIB$SIGNAL, R8					      ;

		         59 00000000G  EF  9E 0002C 	    MOVAB   PAT$GL_BUF_SIZ, R9					      ;

		         5A 00000000'  EF  9E 00033 	    MOVAB   INITPRS_DESC, R10					      ;

		         5B 00000000G  EF  9E 0003A 	    MOVAB   PAT$GL_ERRCODE, R11					      ;

		         5E	FEFC   CE  9E 00041 	    MOVAB   -260(SP), SP					      ;

		         6D 00000246   EF  DE 00046 	    MOVAL   20$, (FP)						      ; 0996

	      00000000G  EF	       00  FB 0004D 	    CALLS   #0, PAT$INIT					      ; 1012

		         52	  08   AC  D0 00054 	    MOVL    RECALLCLI, R2					      ; 1017

				  80   AD  9F 00058 	    PUSHAB  CLIWRK						      ;

				       5A  DD 0005B 	    PUSHL   R10							      ;

		         62	       02  FB 0005D 	    CALLS   #2, (R2)						      ;

		         6B	       50  D0 00060 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 00063 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1018

		         0F	       50  E8 00066 	    BLBS    R0, 1$						      ;

				       50  DD 00069 	    PUSHL   R0							      ; 1020

				       50  DD 0006B 	    PUSHL   R0							      ;

				       01  DD 0006D 	    PUSHL   #1							      ;

			    006D81A4   8F  DD 0006F 	    PUSHL   #7176612						      ;

		         68	       04  FB 00075 	    CALLS   #4, LIB$SIGNAL					      ;

				       57  DD 00078 1$:     PUSHL   R7							      ; 1025

				  80   AD  9F 0007A 	    PUSHAB  CLIWRK						      ;

				  70   AA  9F 0007D 	    PUSHAB  INPUT_DESC						      ;

		         62	       03  FB 00080 	    CALLS   #3, (R2)						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-7

; Digital Equipment Corporation

;

		         6B	       50  D0 00083 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 00086 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1026

		         0F	       50  E8 00089 	    BLBS    R0, 2$						      ;

				       50  DD 0008C 	    PUSHL   R0							      ; 1028

				       50  DD 0008E 	    PUSHL   R0							      ;

				       01  DD 00090 	    PUSHL   #1							      ;

			    006D81D4   8F  DD 00092 	    PUSHL   #7176660						      ;

		         68	       04  FB 00098 	    CALLS   #4, LIB$SIGNAL					      ;

				       57  DD 0009B 2$:     PUSHL   R7							      ; 1034

				  80   AD  9F 0009D 	    PUSHAB  CLIWRK						      ;

				008C   CA  9F 000A0 	    PUSHAB  OUTPUT_DESC						      ;

		         62	       03  FB 000A4 	    CALLS   #3, (R2)						      ;

		         6B	       50  D0 000A7 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 000AA 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1035

		         0F	       50  E8 000AD 	    BLBS    R0, 3$						      ;

				       50  DD 000B0 	    PUSHL   R0							      ; 1037

				       50  DD 000B2 	    PUSHL   R0							      ;

				       01  DD 000B4 	    PUSHL   #1							      ;

			    006D81DC   8F  DD 000B6 	    PUSHL   #7176668						      ;

		         68	       04  FB 000BC 	    CALLS   #4, LIB$SIGNAL					      ;

				       57  DD 000BF 3$:     PUSHL   R7							      ; 1043

				  80   AD  9F 000C1 	    PUSHAB  CLIWRK						      ;

				00A8   CA  9F 000C4 	    PUSHAB  JOURNAL_DESC					      ;

		         62	       03  FB 000C8 	    CALLS   #3, (R2)						      ;

		         6B	       50  D0 000CB 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 000CE 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1044

		         0F	       50  E8 000D1 	    BLBS    R0, 4$						      ;

				       50  DD 000D4 	    PUSHL   R0							      ; 1046

				       50  DD 000D6 	    PUSHL   R0							      ;

				       01  DD 000D8 	    PUSHL   #1							      ;

			    006D81EC   8F  DD 000DA 	    PUSHL   #7176684						      ;

		         68	       04  FB 000E0 	    CALLS   #4, LIB$SIGNAL					      ;

				       57  DD 000E3 4$:     PUSHL   R7							      ; 1052

				  80   AD  9F 000E5 	    PUSHAB  CLIWRK						      ;

				00C4   CA  9F 000E8 	    PUSHAB  COMMAND_DESC					      ;

		         62	       03  FB 000EC 	    CALLS   #3, (R2)						      ;

		         6B	       50  D0 000EF 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 000F2 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1053

		         0F	       50  E8 000F5 	    BLBS    R0, 5$						      ;

				       50  DD 000F8 	    PUSHL   R0							      ; 1055

				       50  DD 000FA 	    PUSHL   R0							      ;

				       01  DD 000FC 	    PUSHL   #1							      ;

			    006D81F4   8F  DD 000FE 	    PUSHL   #7176692						      ;

		         68	       04  FB 00104 	    CALLS   #4, LIB$SIGNAL					      ;

	   3D	         67	       04  E1 00107 5$:     BBC     #4, PAT$GL_FLAGS, 9$				      ; 1061

				  54   AA  9F 0010B 6$:     PUSHAB  UPDATE_DESC						      ; 1066

				  80   AD  9F 0010E 	    PUSHAB  CLIWRK						      ;

				  38   AA  9F 00111 	    PUSHAB  UPDATE_VAL_DESC					      ;

		         62	       03  FB 00114 	    CALLS   #3, (R2)						      ;

		         6B	       50  D0 00117 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 0011A 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1067

		         0F	       50  E8 0011D 	    BLBS    R0, 7$						      ;

				       50  DD 00120 	    PUSHL   R0							      ; 1069

				       50  DD 00122 	    PUSHL   R0							      ;

				       01  DD 00124 	    PUSHL   #1							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-8

; Digital Equipment Corporation

;

			    006D81C4   8F  DD 00126 	    PUSHL   #7176644						      ;

		         68	       04  FB 0012C 	    CALLS   #4, LIB$SIGNAL					      ;

	   50	    44   AA	       01  C3 0012F 7$:     SUBL3   #1, UPDATE_VAL_DESC+12, R0				      ; 1070

	   00 00000000G  EF	       50  E2 00134 	    BBSS    R0, PAT$GL_ECO_UPD, 8$				      ;

		         CB	  3B   AA  E8 0013C 8$:     BLBS    UPDATE_VAL_DESC+3, 6$				      ; 1073

			    00000000G  EF  94 00140 	    CLRB    PAT$GB_EXEC_CMD					      ; 1074

				       07  11 00146 	    BRB     10$							      ; 1061

	      00000000G  EF	       01  90 00148 9$:     MOVB    #1, PAT$GB_EXEC_CMD					      ; 1077

				  80   AD  9F 0014F 10$:    PUSHAB  CLIWRK						      ; 1082

				  1C   AA  9F 00152 	    PUSHAB  ENDPRS_DESC						      ;

		         62	       02  FB 00155 	    CALLS   #2, (R2)						      ;

		         6B	       50  D0 00158 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 0015B 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1083

		         0F	       50  E8 0015E 	    BLBS    R0, 11$						      ;

				       50  DD 00161 	    PUSHL   R0							      ; 1085

				       50  DD 00163 	    PUSHL   R0							      ;

				       01  DD 00165 	    PUSHL   #1							      ;

			    006D817C   8F  DD 00167 	    PUSHL   #7176572						      ;

		         68	       04  FB 0016D 	    CALLS   #4, LIB$SIGNAL					      ;

				       7E  D4 00170 11$:    CLRL    -(SP)						      ; 1090

				       56  DD 00172 	    PUSHL   R6							      ;

	      00000000G  EF	       02  FB 00174 	    CALLS   #2, PAT$FAO_OUT					      ;

		         64	       6E  9E 0017B 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1095

				       69  D4 0017E 	    CLRL    PAT$GL_BUF_SIZ					      ; 1096

			    00000000G  EF  9F 00180 	    PUSHAB  PAT$GB_OLDNAME					      ; 1097

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

				  A4   A6  9F 0018D 	    PUSHAB  NEW_IMG_STR						      ; 0951

		         65	       03  FB 00190 	    CALLS   #3, PAT$FAO_PUT					      ; 1097

			    00000000G  EF  9F 00193 	    PUSHAB  PAT$GL_JNLRAB					      ; 1098

				  04   AE  9F 00199 	    PUSHAB  OUT_BUFFER						      ;

				       69  DD 0019C 	    PUSHL   PAT$GL_BUF_SIZ					      ;

		         63	       03  FB 0019E 	    CALLS   #3, PAT$WRITEFILE					      ;

		         64	       6E  9E 001A1 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1099

				       69  D4 001A4 	    CLRL    PAT$GL_BUF_SIZ					      ; 1100

			    00000000G  EF  9F 001A6 	    PUSHAB  PAT$GB_JNLNAME					      ; 1101

		         7E 00000000G  EF  9A 001AC 	    MOVZBL  PAT$GL_JNLNBK+3, -(SP)				      ;

				  C4   A6  9F 001B3 	    PUSHAB  JNL_STR						      ; 0951

		         65	       03  FB 001B6 	    CALLS   #3, PAT$FAO_PUT					      ; 1101

			    00000000G  EF  9F 001B9 	    PUSHAB  PAT$GL_JNLRAB					      ; 1102

				  04   AE  9F 001BF 	    PUSHAB  OUT_BUFFER						      ;

				       69  DD 001C2 	    PUSHL   PAT$GL_BUF_SIZ					      ;

		         63	       03  FB 001C4 	    CALLS   #3, PAT$WRITEFILE					      ;

		         26	       67  E9 001C7 	    BLBC    PAT$GL_FLAGS, 12$					      ; 1103

		         64	       6E  9E 001CA 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1106

				       69  D4 001CD 	    CLRL    PAT$GL_BUF_SIZ					      ; 1107

			    00000000G  EF  9F 001CF 	    PUSHAB  PAT$GB_COMNAME					      ; 1108

		         7E 00000000G  EF  9A 001D5 	    MOVZBL  PAT$GL_COMNBK+3, -(SP)				      ;

				  88   A6  9F 001DC 	    PUSHAB  COM_STR						      ; 0951

		         65	       03  FB 001DF 	    CALLS   #3, PAT$FAO_PUT					      ; 1108

			    00000000G  EF  9F 001E2 	    PUSHAB  PAT$GL_JNLRAB					      ; 1109

				  04   AE  9F 001E8 	    PUSHAB  OUT_BUFFER						      ;

				       69  DD 001EB 	    PUSHL   PAT$GL_BUF_SIZ					      ;

		         63	       03  FB 001ED 	    CALLS   #3, PAT$WRITEFILE					      ;

				  80   AD  9F 001F0 12$:    PUSHAB  CLIWRK						      ; 1118

				00E0   CA  9F 001F3 	    PUSHAB  COMLINE_DESC					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 3-9

; Digital Equipment Corporation

;

		         62	       02  FB 001F7 	    CALLS   #2, (R2)						      ;

		         6B	       50  D0 001FA 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         05	       6B  E8 001FD 	    BLBS    PAT$GL_ERRCODE, 13$					      ; 1119

				       6B  DD 00200 	    PUSHL   PAT$GL_ERRCODE					      ; 1121

		         68	       01  FB 00202 	    CALLS   #1, LIB$SIGNAL					      ;

		         64	       6E  9E 00205 13$:    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1122

				       69  D4 00208 	    CLRL    PAT$GL_BUF_SIZ					      ; 1123

				00E8   CA  9F 0020A 	    PUSHAB  COMLINE_DESC+8					      ; 1124

				  A0   A6  9F 0020E 	    PUSHAB  COM_LINE_STR					      ; 0951

		         65	       02  FB 00211 	    CALLS   #2, PAT$FAO_PUT					      ; 1124

			    00000000G  EF  9F 00214 	    PUSHAB  PAT$GL_COMRAB					      ; 1125

				  04   AE  9F 0021A 	    PUSHAB  OUT_BUFFER						      ;

				       69  DD 0021D 	    PUSHL   PAT$GL_BUF_SIZ					      ;

		         63	       03  FB 0021F 	    CALLS   #3, PAT$WRITEFILE					      ;

	   3F	         67	       04  E1 00222 	    BBC     #4, PAT$GL_FLAGS, 17$				      ; 1126

		         64	       6E  9E 00226 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1129

				       69  D4 00229 	    CLRL    PAT$GL_BUF_SIZ					      ; 1130

				  DC   A6  9F 0022B 	    PUSHAB  UPDATE_STR						      ; 0951

		         65	       01  FB 0022E 	    CALLS   #1, PAT$FAO_PUT					      ; 1131

		         52	       01  D0 00231 	    MOVL    #1, BIT_NUMBER					      ; 1132

	      00000080   8F	       52  D1 00234 14$:    CMPL    BIT_NUMBER, #128					      ; 1133

				       18  14 0023B 	    BGTR    16$							      ;

	   50	         52	       01  C3 0023D 	    SUBL3   #1, BIT_NUMBER, R0					      ; 1136

	   08 00000000G  EF	       50  E1 00241 	    BBC     R0, PAT$GL_ECO_UPD, 15$				      ;

				       52  DD 00249 	    PUSHL   BIT_NUMBER						      ; 1138

				  F8   A6  9F 0024B 	    PUSHAB  UPD_VAL_STR						      ; 0951

		         65	       02  FB 0024E 	    CALLS   #2, PAT$FAO_PUT					      ; 1138

				       52  D6 00251 15$:    INCL    BIT_NUMBER						      ; 1139

				       DF  11 00253 	    BRB     14$							      ; 1133

			    00000000G  EF  9F 00255 16$:    PUSHAB  PAT$GL_JNLRAB					      ; 1141

				  04   AE  9F 0025B 	    PUSHAB  OUT_BUFFER						      ;

	   7E	         69	       01  C3 0025E 	    SUBL3   #1, PAT$GL_BUF_SIZ, -(SP)				      ;

		         63	       03  FB 00262 	    CALLS   #3, PAT$WRITEFILE					      ;

	      00000000G  EF	       00  FB 00265 17$:    CALLS   #0, PAT$GET_IHD					      ; 1147

	      00000000G  EF	       00  FB 0026C 	    CALLS   #0, PAT$FIND_DST					      ; 1152

	      00000000G  EF	       01  90 00273 	    MOVB    #1, PAT$GB_TAKE_CMD					      ; 1159

		         09 00000000G  EF  E9 0027A 18$:    BLBC    PAT$GB_TAKE_CMD, 19$				      ; 1160

	      00000000G  EF	       00  FB 00281 	    CALLS   #0, PAT$COM_PROC					      ; 1162

				       F0  11 00288 	    BRB     18$							      ; 1160

	      00000000G  EF	       00  FB 0028A 19$:    CALLS   #0, PAT$CLOSEFILES					      ; 1167

					   04 00291 	    RET     							      ; 0951

					 0000 00292 20$:    .WORD   Save nothing					      ; 0996

				       7E  D4 00294 	    CLRL    -(SP)						      ;

				       5E  DD 00296 	    PUSHL   SP							      ;

		         7E	  04   AC  7D 00298 	    MOVQ    4(AP), -(SP)					      ;

	      00000000G  EF	       03  FB 0029C 	    CALLS   #3, PAT$ERR_HANDLER					      ;

					   04 002A3 	    RET     							      ;



; Routine Size:  676 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 4

; Digital Equipment Corporation

;

;	1170	ROUTINE OPEN_INPUT (REQDESC,CLIADDR) : NOVALUE =		! ROUTINE TO OPEN INPUT FILE

;	1171	

;	1172	!++

;	1173	! FUNCTIONAL DESCRIPTION:

;	1174	!

;	1175	! THIS IS THE ACTION ROUTINE FOR THE INPUT FILE PARAMETER IN THE COMMAND

;	1176	! LINE.  THE FAB IS SET UP AND THE INPUT IMAGE FILE OPENED.

;	1177	!

;	1178	! FORMAL PARAMETERS:

;	1179	!

;	1180	!	REQDESC = THE ADDRESS OF THE REQUEST DESCRIPTOR

;	1181	!	CLIADDR = THE ADDRESS OF THE CLI CALL BACK ROUTINE

;	1182	!

;	1183	! IMPLICIT INPUTS:

;	1184	!

;	1185	!	CLI HAS THE COMMAND LINE.

;	1186	!	THE FABS AND RABS ARE INITIALIZED, SAVE FOR FILE NAMES.

;	1187	!

;	1188	! IMPLICIT OUTPUTS:

;	1189	!

;	1190	!	NONE

;	1191	!

;	1192	! ROUTINE VALUE:	NONE

;	1193	!

;	1194	! COMPLETION CODES:

;	1195	!

;	1196	!	NONE

;	1197	!

;	1198	! SIDE EFFECTS:

;	1199	!

;	1200	!	THE INPUT FILES IS OPENED.

;	1201	!	THE PATCH COMMANDS ARE EXECUTED.

;	1202	!

;	1203	!--

;	1204	

;	1205	BEGIN

;	1206	

;	1207	

;	1208	PAT$GL_OLDFAB[FAB$L_FNA]=.INPUT_DESC[CLI$A_RQADDR];		! SET FILE NAME ADDRESS

;	1209	PAT$GL_OLDFAB[FAB$B_FNS]=.INPUT_DESC[CLI$W_RQSIZE];		! SET FILE NAME LENGTH

;	1210	PAT$GL_ERRCODE=$OPEN(FAB=PAT$GL_OLDFAB);			! OPEN INPUT FILE

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

;	1212	THEN

;	1213		BEGIN

;	1214		PAT$GL_FLAGS<PAT$S_INPUT,1>=0;				! SET FLAG FILE NOT OPEN

;	1215		SIGNAL(PAT$_OPNERR,3,.PAT$GL_ERRCODE,.PAT$GL_OLDNBK[NAM$B_ESL],

;	1216			PAT$GB_OLDNAME,.PAT$GL_ERRCODE,.PAT$GL_OLDRAB[RAB$L_STV]); ! REPORT FAILURE

;	1217		END

;	1218	ELSE

;	1219		BEGIN

;	1220		PAT$GL_ERRCODE=$CONNECT(RAB=PAT$GL_OLDRAB);		! CONNECT INPUT FILE

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

;	1222		THEN

;	1223			SIGNAL(PAT$_CNTERR,3,.PAT$GL_ERRCODE,.PAT$GL_OLDNBK[NAM$B_RSL],

;	1224			PAT$GB_OLDNAME,.PAT$GL_ERRCODE,.PAT$GL_OLDRAB[RAB$L_STV]); ! REPORT FAILURE



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 4-1

; Digital Equipment Corporation

;

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

;	1226		PAT$GL_OLDFAB[FAB$L_CTX] = RME$C_SETRFM;

;	1227		PAT$GL_OLDFAB[FAB$B_RFM] = FAB$C_VAR;

;	1228		PAT$GL_ERRCODE = $MODIFY(FAB=PAT$GL_OLDFAB);

;	1229		IF NOT .PAT$GL_ERRCODE

;	1230		THEN

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

;	1232				.PAT$GL_OLDNBK[NAM$B_RSL], PAT$GB_OLDNAME,

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

;	1234		END;

;	1235	

;	1236	

;	1237	END;								! END OF INPUT_OPEN







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



					 0FC0 002A4 OPEN_INPUT:

							    .WORD   Save R6,R7,R8,R9,R10,R11				      ; 1170

		         56 00000000G  00  9E 002A6 	    MOVAB   LIB$SIGNAL, R6					      ;

		         57 00000000G  EF  9E 002AD 	    MOVAB   PAT$GL_OLDNBK+3, R7					      ;

		         58 00000000G  EF  9E 002B4 	    MOVAB   PAT$GB_OLDNAME, R8					      ;

		         59 00000000G  EF  9E 002BB 	    MOVAB   PAT$GL_OLDRAB+12, R9				      ;

		         5A 00000000G  EF  9E 002C2 	    MOVAB   PAT$GL_ERRCODE, R10					      ;

		         5B 00000000G  EF  9E 002C9 	    MOVAB   PAT$GL_OLDFAB, R11					      ;

		    2C   AB 00000000'  EF  D0 002D0 	    MOVL    INPUT_DESC+12, PAT$GL_OLDFAB+44			      ; 1208

		    34   AB 00000000'  EF  90 002D8 	    MOVB    INPUT_DESC+8, PAT$GL_OLDFAB+52			      ; 1209

				       5B  DD 002E0 	    PUSHL   R11							      ; 1210

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

		         6A	       50  D0 002E9 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6A  D0 002EC 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1211

		         1D	       50  E8 002EF 	    BLBS    R0, 1$						      ;

	      00000000G  EF	       04  8A 002F2 	    BICB2   #4, PAT$GL_FLAGS					      ; 1214

				       69  DD 002F9 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1215

				       50  DD 002FB 	    PUSHL   R0							      ;

				       58  DD 002FD 	    PUSHL   R8							      ;

		         7E	  08   A7  9A 002FF 	    MOVZBL  PAT$GL_OLDNBK+11, -(SP)				      ;

				       50  DD 00303 	    PUSHL   R0							      ;

				       03  DD 00305 	    PUSHL   #3							      ;

			    006D81CC   8F  DD 00307 	    PUSHL   #7176652						      ;

				       5A  11 0030D 	    BRB     3$							      ;

				  F4   A9  9F 0030F 1$:     PUSHAB  PAT$GL_OLDRAB					      ; 1220

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

		         6A	       50  D0 00319 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6A  D0 0031C 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1221

		         16	       50  E8 0031F 	    BLBS    R0, 2$						      ;

				       69  DD 00322 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1223

				       50  DD 00324 	    PUSHL   R0							      ;

				       58  DD 00326 	    PUSHL   R8							      ;

		         7E	       67  9A 00328 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 0032B 	    PUSHL   R0							      ;

				       03  DD 0032D 	    PUSHL   #3							      ;

			    006D8164   8F  DD 0032F 	    PUSHL   #7176548						      ;

		         66	       07  FB 00335 	    CALLS   #7, LIB$SIGNAL					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 4-2

; Digital Equipment Corporation

;

		    07   AB	       08  88 00338 2$:     BISB2   #8, PAT$GL_OLDFAB+7					      ; 1225

		    18   AB	       01  D0 0033C 	    MOVL    #1, PAT$GL_OLDFAB+24				      ; 1226

		    1F   AB	       02  90 00340 	    MOVB    #2, PAT$GL_OLDFAB+31				      ; 1227

				       5B  DD 00344 	    PUSHL   R11							      ; 1228

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

		         6A	       50  D0 0034D 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6A  D0 00350 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1229

		         16	       50  E8 00353 	    BLBS    R0, 4$						      ;

				       69  DD 00356 	    PUSHL   PAT$GL_OLDRAB+12					      ; 1231

				       50  DD 00358 	    PUSHL   R0							      ;

				       58  DD 0035A 	    PUSHL   R8							      ;

		         7E	       67  9A 0035C 	    MOVZBL  PAT$GL_OLDNBK+3, -(SP)				      ;

				       50  DD 0035F 	    PUSHL   R0							      ;

				       03  DD 00361 	    PUSHL   #3							      ;

			    006D81BC   8F  DD 00363 	    PUSHL   #7176636						      ;

		         66	       07  FB 00369 3$:     CALLS   #7, LIB$SIGNAL					      ;

					   04 0036C 4$:     RET     							      ; 1170



; Routine Size:  201 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 5

; Digital Equipment Corporation

;

;	1238	ROUTINE OPEN_OUTPUT (REQDESC,CLIADDR) : NOVALUE =		! ROUTINE TO INIT FOR OUTPUT FILE OPEN

;	1239	

;	1240	!++

;	1241	! FUNCTIONAL DESCRIPTION:

;	1242	!

;	1243	! THIS IS THE ACTION ROUTINE FOR THE OUTPUT FILE PARAMETER IN THE COMMAND

;	1244	! LINE.  THE FAB IS SET UP AND THE NUMBER OF IMAGE FILE BLOCKS IS INITIALIZED.

;	1245	! THE IMAGE FILE WILL BE OPENED JUST BEFORE IT IS WRITTEN AS THE NUMBER OF

;	1246	! BLOCKS THAT MUST BE ALLOCATED CONTIGUOUSLY, WILL NOT BE KNOWN UNTIL THEN.

;	1247	!

;	1248	! FORMAL PARAMETERS:

;	1249	!

;	1250	!	REQDESC = THE ADDRESS OF THE REQUEST DESCRIPTOR

;	1251	!	CLIADDR = THE ADDRESS OF THE CLI CALL BACK ROUTINE

;	1252	!

;	1253	! IMPLICIT INPUTS:

;	1254	!

;	1255	!	CLI HAS THE COMMAND LINE.

;	1256	!	THE OUTPUT IMAGE FAB ARE INITIALIZED.

;	1257	!

;	1258	! IMPLICIT OUTPUTS:

;	1259	!

;	1260	!	NONE

;	1261	!

;	1262	! ROUTINE VALUE:	NONE

;	1263	!

;	1264	! COMPLETION CODES:

;	1265	!

;	1266	!	NONE

;	1267	!

;	1268	! SIDE EFFECTS:

;	1269	!

;	1270	!	THE NUMBER OF IMAGE BLOCKS IS INITIALIZED AS IS THE FILENAME IN THE FAB.

;	1271	!

;	1272	!--

;	1273	

;	1274	BEGIN

;	1275	

;	1276	PAT$GL_IMGBLKS = .PAT$GL_OLDFAB[FAB$L_ALQ];			! INITIALIZE NUMBER OF BLOCKS IN FILE

;	1277	PAT$GL_NEWFAB[FAB$L_FNA]=.OUTPUT_DESC[CLI$A_RQADDR];		! SET FILE NAME ADDRESS

;	1278	PAT$GL_NEWFAB[FAB$B_FNS]=.OUTPUT_DESC[CLI$W_RQSIZE];		! SET FILE NAME LENGTH

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

;	1280	

;	1281	END;								! END OF OPEN_OUTPUT











					 0000 0036D OPEN_OUTPUT:

							    .WORD   Save nothing					      ; 1238

	      00000000G  EF 00000000G  EF  D0 0036F 	    MOVL    PAT$GL_OLDFAB+16, PAT$GL_IMGBLKS			      ; 1276

	      00000000G  EF 00000000'  EF  D0 0037A 	    MOVL    OUTPUT_DESC+12, PAT$GL_NEWFAB+44			      ; 1277

	      00000000G  EF 00000000'  EF  90 00385 	    MOVB    OUTPUT_DESC+8, PAT$GL_NEWFAB+52			      ; 1278

	      00000000G  EF	       08  8A 00390 	    BICB2   #8, PAT$GL_FLAGS					      ; 1279



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 5-1

; Digital Equipment Corporation

;

					   04 00397 	    RET     							      ; 1238



; Routine Size:  43 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 6

; Digital Equipment Corporation

;

;	1282	ROUTINE OPEN_JOURNAL (REQDESC,CLIADDR) : NOVALUE =		! ROUTINE TO OPEN JOURNAL FILE

;	1283	

;	1284	!++

;	1285	! FUNCTIONAL DESCRIPTION:

;	1286	!

;	1287	! THIS IS THE ACTION ROUTINE FOR THE JOURNAL FILE PARAMETER IN THE COMMAND

;	1288	! LINE.  THE FAB IS SET UP AND THE JOURNAL FILE OPENED.

;	1289	!

;	1290	! FORMAL PARAMETERS:

;	1291	!

;	1292	!	REQDESC = THE ADDRESS OF THE REQUEST DESCRIPTOR

;	1293	!	CLIADDR = THE ADDRESS OF THE CLI CALL BACK ROUTINE

;	1294	!

;	1295	! IMPLICIT JOURNALS:

;	1296	!

;	1297	!	CLI HAS THE COMMAND LINE.

;	1298	!	THE JOURNAL FAB AND RAB ARE INITIALIZED.

;	1299	!

;	1300	! IMPLICIT OUTPUTS:

;	1301	!

;	1302	!	NONE

;	1303	!

;	1304	! ROUTINE VALUE:	NONE

;	1305	!

;	1306	! COMPLETION CODES:

;	1307	!

;	1308	!	NONE

;	1309	!

;	1310	! SIDE EFFECTS:

;	1311	!

;	1312	!	THE JOURNAL FILE IS OPENED.

;	1313	!

;	1314	!--

;	1315	

;	1316	BEGIN

;	1317	

;	1318	PAT$GL_JNLFAB[FAB$L_FNA]=.JOURNAL_DESC[CLI$A_RQADDR];		! SET FILE NAME ADDRESS

;	1319	PAT$GL_JNLFAB[FAB$B_FNS]=.JOURNAL_DESC[CLI$W_RQSIZE];		! SET FILE NAME LENGTH

;	1320	PAT$GL_ERRCODE=$CREATE(FAB=PAT$GL_JNLFAB);			! OPEN JOURNAL FILE

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

;	1322	THEN

;	1323		BEGIN

;	1324		PAT$GL_FLAGS<PAT$S_JOURNAL,1>=0;			! SET FLAG FILE NOT OPEN

;	1325		SIGNAL(PAT$_OPNERR,3,.PAT$GL_ERRCODE,.PAT$GL_JNLNBK[NAM$B_ESL],

;	1326			PAT$GB_JNLNAME,.PAT$GL_ERRCODE,.PAT$GL_JNLRAB[RAB$L_STV]); ! REPORT FAILURE

;	1327		END

;	1328	ELSE

;	1329		BEGIN

;	1330		PAT$GL_ERRCODE=$CONNECT(RAB=PAT$GL_JNLRAB);		! CONNECT JOURNAL FILE

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

;	1332		THEN

;	1333			SIGNAL(PAT$_CNTERR,3,.PAT$GL_ERRCODE,.PAT$GL_JNLNBK[NAM$B_RSL],

;	1334				PAT$GB_JNLNAME,.PAT$GL_ERRCODE,.PAT$GL_JNLRAB[RAB$L_STV]); ! REPORT FAILURE

;	1335		END;

;	1336	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 6-1

; Digital Equipment Corporation

;

;	1337	END;								! END OF OPEN_JOURNAL







							    .GLOBL  SYS$CREATE



					 0F00 00398 OPEN_JOURNAL:

							    .WORD   Save R8,R9,R10,R11					      ; 1282

		         58 00000000G  EF  9E 0039A 	    MOVAB   PAT$GB_JNLNAME, R8					      ;

		         59 00000000G  EF  9E 003A1 	    MOVAB   PAT$GL_JNLRAB+12, R9				      ;

		         5A 00000000G  EF  9E 003A8 	    MOVAB   PAT$GL_JNLFAB+44, R10				      ;

		         5B 00000000G  EF  9E 003AF 	    MOVAB   PAT$GL_ERRCODE, R11					      ;

		         6A 00000000'  EF  D0 003B6 	    MOVL    JOURNAL_DESC+12, PAT$GL_JNLFAB+44			      ; 1318

		    08   AA 00000000'  EF  90 003BD 	    MOVB    JOURNAL_DESC+8, PAT$GL_JNLFAB+52			      ; 1319

				  D4   AA  9F 003C5 	    PUSHAB  PAT$GL_JNLFAB					      ; 1320

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

		         6B	       50  D0 003CF 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 003D2 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1321

		         20	       50  E8 003D5 	    BLBS    R0, 1$						      ;

	      00000000G  EF	       02  8A 003D8 	    BICB2   #2, PAT$GL_FLAGS					      ; 1324

				       69  DD 003DF 	    PUSHL   PAT$GL_JNLRAB+12					      ; 1325

				       50  DD 003E1 	    PUSHL   R0							      ;

				       58  DD 003E3 	    PUSHL   R8							      ;

		         7E 00000000G  EF  9A 003E5 	    MOVZBL  PAT$GL_JNLNBK+11, -(SP)				      ;

				       50  DD 003EC 	    PUSHL   R0							      ;

				       03  DD 003EE 	    PUSHL   #3							      ;

			    006D81CC   8F  DD 003F0 	    PUSHL   #7176652						      ;

				       2A  11 003F6 	    BRB     2$							      ;

				  F4   A9  9F 003F8 1$:     PUSHAB  PAT$GL_JNLRAB					      ; 1330

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

		         6B	       50  D0 00402 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 00405 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1331

		         1E	       50  E8 00408 	    BLBS    R0, 3$						      ;

				       69  DD 0040B 	    PUSHL   PAT$GL_JNLRAB+12					      ; 1333

				       50  DD 0040D 	    PUSHL   R0							      ;

				       58  DD 0040F 	    PUSHL   R8							      ;

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

				       50  DD 00418 	    PUSHL   R0							      ;

				       03  DD 0041A 	    PUSHL   #3							      ;

			    006D8164   8F  DD 0041C 	    PUSHL   #7176548						      ;

	      00000000G  00	       07  FB 00422 2$:     CALLS   #7, LIB$SIGNAL					      ;

					   04 00429 3$:     RET     							      ; 1282



; Routine Size:  146 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 7

; Digital Equipment Corporation

;

;	1338	GLOBAL ROUTINE PAT$OPEN_COMFIL (REQDESC,CLIADDR) : NOVALUE =		! ROUTINE TO OPEN COMMAND FILE

;	1339	

;	1340	!++

;	1341	! FUNCTIONAL DESCRIPTION:

;	1342	!

;	1343	! THIS IS THE ACTION ROUTINE FOR THE COMMAND FILE PARAMETER IN THE COMMAND

;	1344	! LINE.  THE FAB IS SET UP AND THE COMMAND FILE OPENED.

;	1345	!

;	1346	! IT IS ALSO SERVING TO OPEN THE COMMAND FILE BECAUSE OF THE "CREATE" COMMAND.

;	1347	! IN THIS CASE, THE INPUT PARAMETERS ARE ZEROS.  THERE SHOULD BE ONLY ONE "CREATE"

;	1348	! COMMAND PER PATCH SESSION.  THE "CREATE" COMMAND MAY OR MAY NOT HAVE ONE

;	1349	! ARGUMENT WHICH IS THE COMMAND FILE SPECIFICATION.

;	1350	!

;	1351	! FORMAL PARAMETERS:

;	1352	!

;	1353	!	REQDESC = THE ADDRESS OF THE REQUEST DESCRIPTOR OR 0

;	1354	!	CLIADDR = THE ADDRESS OF THE CLI CALL BACK ROUTINE

;	1355	!

;	1356	! IMPLICIT COMMANDS:

;	1357	!

;	1358	!	CLI HAS THE COMMAND LINE.

;	1359	!	THE OUTPUT COMMAND FAB AND RAB ARE INITIALIZED.

;	1360	!

;	1361	! IMPLICIT OUTPUTS:

;	1362	!

;	1363	!	NONE

;	1364	!

;	1365	! ROUTINE VALUE:

;	1366	!

;	1367	!	NONE

;	1368	!

;	1369	! COMPLETION CODES:

;	1370	!

;	1371	!	NONE

;	1372	!

;	1373	! SIDE EFFECTS:

;	1374	!

;	1375	!	THE COMMAND FILE IS OPENED.

;	1376	!

;	1377	!--

;	1378	

;	1379	BEGIN

;	1380	

;	1381	LOCAL

;	1382		POINTER : REF VECTOR[,LONG],				! POINTER TO ADDRESS OFFILE NAME

;	1383		NAME_DSC : REF VECTOR[,BYTE],				! POINTER TO ASCIC FILE NAME

;	1384		OUT_BUFFER : VECTOR[TTY_OUT_WIDTH,BYTE];		! OUTPUT BUFFER FOR JOURNAL MESSAGES

;	1385	

;	1386	

;	1387	IF (.REQDESC EQL 0)

;	1388	THEN

;	1389		BEGIN

;	1390		IF (.PAT$GL_FLAGS AND PAT$M_COMMAND)

;	1391		THEN

;	1392			BEGIN



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 7-1

; Digital Equipment Corporation

;

;	1393			SIGNAL(PAT$_DUPCOMFIL+MSG$K_WARN,.PAT$GL_COMNBK[NAM$B_RSL],PAT$GB_COMNAME);

;	1394			END;

;	1395		POINTER = .PAT$GL_HEAD_LST;

;	1396		IF (.POINTER NEQA 0)

;	1397		THEN

;	1398			BEGIN

;	1399			NAME_DSC = .POINTER[1];				! GET ADDRESS OF FILE NAME

;	1400			PAT$GL_COMFAB[FAB$L_FNA]=NAME_DSC[1];		! SET FILE NAME ADDRESS

;	1401			PAT$GL_COMFAB[FAB$B_FNS]=.NAME_DSC[0];		! SET FILE NAME LENGTH

;	1402			END;

;	1403		END

;	1404	ELSE

;	1405		BEGIN

;	1406		PAT$GL_COMFAB[FAB$L_FNA]=.COMMAND_DESC[CLI$A_RQADDR];	! SET FILE NAME ADDRESS

;	1407		PAT$GL_COMFAB[FAB$B_FNS]=.COMMAND_DESC[CLI$W_RQSIZE];	! SET FILE NAME LENGTH

;	1408		END;

;	1409	PAT$GL_ERRCODE=$CREATE(FAB=PAT$GL_COMFAB);			! OPEN OUTPUT COMMAND FILE

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

;	1411	THEN

;	1412		BEGIN

;	1413		PAT$GL_FLAGS<PAT$S_COMMAND,1>=0;			! SET FLAG FILE NOT OPEN

;	1414		SIGNAL(PAT$_OPNERR,3,.PAT$GL_ERRCODE,.PAT$GL_COMNBK[NAM$B_ESL],

;	1415			PAT$GB_COMNAME,.PAT$GL_ERRCODE,.PAT$GL_COMRAB[RAB$L_STV]); ! REPORT FAILURE

;	1416		END

;	1417	ELSE

;	1418		BEGIN

;	1419		PAT$GL_ERRCODE=$CONNECT(RAB=PAT$GL_COMRAB);		! CONNECT COMMAND FILE

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

;	1421		THEN

;	1422			SIGNAL(PAT$_CNTERR,3,.PAT$GL_ERRCODE,.PAT$GL_COMNBK[NAM$B_RSL],

;	1423				PAT$GB_COMNAME,.PAT$GL_ERRCODE,.PAT$GL_COMRAB[RAB$L_STV]) ! REPORT FAILURE

;	1424		ELSE

;	1425			BEGIN

;	1426			!++

;	1427			! Now set the flag indicating the file is open.  If the command

;	1428			! file was opened due to a CREATE command, then write out the

;	1429			! name of the command file to the journal file and write out

;	1430			! the DCL PATCH command line to the command file.

;	1431			!--

;	1432			PAT$GL_FLAGS<PAT$S_COMMAND,1> = 1;		! SET FILE OPEN BIT

;	1433			IF (.REQDESC EQL 0)

;	1434			THEN

;	1435				BEGIN

;	1436				PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1437				PAT$GL_BUF_SIZ = 0;

;	1438				PAT$FAO_PUT(COM_STR, .PAT$GL_COMNBK[NAM$B_RSL], PAT$GB_COMNAME);

;	1439				PAT$WRITEFILE(.PAT$GL_BUF_SIZ, CH$PTR(OUT_BUFFER, 0), PAT$GL_JNLRAB);

;	1440				PAT$CP_OUT_STR = CH$PTR(OUT_BUFFER, 0);

;	1441				PAT$GL_BUF_SIZ = 0;

;	1442				PAT$FAO_PUT(COM_LINE_STR, CH$PTR(COMLINE_DESC[CLI$Q_RQDESC], 0));

;	1443				PAT$GL_COMRAB[RAB$W_RSZ] = .PAT$GL_BUF_SIZ;

;	1444				PAT$GL_COMRAB[RAB$L_RBF] = OUT_BUFFER;

;	1445				IF NOT (PAT$GL_ERRCODE = $PUT(RAB=PAT$GL_COMRAB))

;	1446				THEN

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



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 7-2

; Digital Equipment Corporation

;

;	1448						.PAT$GL_COMNBK[NAM$B_RSL],PAT$GB_COMNAME,

;	1449						.PAT$GL_ERRCODE,.PAT$GL_COMRAB[RAB$L_STV]);

;	1450				END;

;	1451			END;

;	1452		END;

;	1453	

;	1454	

;	1455	END;								! END OF PAT$OPN_COMMAND







							    .GLOBL  SYS$PUT



					 0FFC 0042A 	    .ENTRY  PAT$OPEN_COMFIL, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11     ; 1338

		         53 00000000G  00  9E 0042C 	    MOVAB   LIB$SIGNAL, R3					      ;

		         54 00000000G  EF  9E 00433 	    MOVAB   PAT$GL_FLAGS, R4					      ;

		         55 00000000'  EF  9E 0043A 	    MOVAB   COMMAND_DESC+12, R5					      ;

		         56 00000000G  EF  9E 00441 	    MOVAB   PAT$GL_BUF_SIZ, R6					      ;

		         57 00000000G  EF  9E 00448 	    MOVAB   PAT$GL_COMFAB+44, R7				      ;

		         58 00000000G  EF  9E 0044F 	    MOVAB   PAT$GL_COMNBK+3, R8					      ;

		         59 00000000G  EF  9E 00456 	    MOVAB   PAT$GB_COMNAME, R9					      ;

		         5A 00000000G  EF  9E 0045D 	    MOVAB   PAT$GL_COMRAB+12, R10				      ;

		         5B 00000000G  EF  9E 00464 	    MOVAB   PAT$GL_ERRCODE, R11					      ;

		         5E	FF7C   CE  9E 0046B 	    MOVAB   -132(SP), SP					      ;

				       52  D4 00470 	    CLRL    R2							      ; 1387

				  04   AC  D5 00472 	    TSTL    REQDESC						      ;

				       2A  12 00475 	    BNEQ    2$							      ;

				       52  D6 00477 	    INCL    R2							      ;

		         0E	       64  E9 00479 	    BLBC    PAT$GL_FLAGS, 1$					      ; 1390

				       59  DD 0047C 	    PUSHL   R9							      ; 1393

		         7E	       68  9A 0047E 	    MOVZBL  PAT$GL_COMNBK+3, -(SP)				      ;

			    006D82E0   8F  DD 00481 	    PUSHL   #7176928						      ;

		         63	       03  FB 00487 	    CALLS   #3, LIB$SIGNAL					      ;

		         50 00000000G  EF  D0 0048A 1$:     MOVL    PAT$GL_HEAD_LST, POINTER				      ; 1395

				       16  13 00491 	    BEQL    3$							      ; 1396

		         50	  04   A0  D0 00493 	    MOVL    4(POINTER), NAME_DSC				      ; 1399

	   67	         50	       01  C1 00497 	    ADDL3   #1, NAME_DSC, PAT$GL_COMFAB+44			      ; 1400

		    08   A7	       60  90 0049B 	    MOVB    (NAME_DSC), PAT$GL_COMFAB+52			      ; 1401

				       08  11 0049F 	    BRB     3$							      ; 1387

		         67	       65  D0 004A1 2$:     MOVL    COMMAND_DESC+12, PAT$GL_COMFAB+44			      ; 1406

		    08   A7	  FC   A5  90 004A4 	    MOVB    COMMAND_DESC+8, PAT$GL_COMFAB+52			      ; 1407

				  D4   A7  9F 004A9 3$:     PUSHAB  PAT$GL_COMFAB					      ; 1409

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

		         6B	       50  D0 004B3 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 004B6 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1410

		         19	       50  E8 004B9 	    BLBS    R0, 4$						      ;

		         64	       01  8A 004BC 	    BICB2   #1, PAT$GL_FLAGS					      ; 1413

				       6A  DD 004BF 	    PUSHL   PAT$GL_COMRAB+12					      ; 1414

				       50  DD 004C1 	    PUSHL   R0							      ;

				       59  DD 004C3 	    PUSHL   R9							      ;

		         7E	  08   A8  9A 004C5 	    MOVZBL  PAT$GL_COMNBK+11, -(SP)				      ;

				       50  DD 004C9 	    PUSHL   R0							      ;

				       03  DD 004CB 	    PUSHL   #3							      ;

			    006D81CC   8F  DD 004CD 	    PUSHL   #7176652						      ;

				       26  11 004D3 	    BRB     5$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 7-3

; Digital Equipment Corporation

;

				  F4   AA  9F 004D5 4$:     PUSHAB  PAT$GL_COMRAB					      ; 1419

	      00000000G  9F	       01  FB 004D8 	    CALLS   #1, @#SYS$CONNECT					      ;

		         6B	       50  D0 004DF 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         50	       6B  D0 004E2 	    MOVL    PAT$GL_ERRCODE, R0					      ; 1420

		         15	       50  E8 004E5 	    BLBS    R0, 6$						      ;

				       6A  DD 004E8 	    PUSHL   PAT$GL_COMRAB+12					      ; 1422

				       50  DD 004EA 	    PUSHL   R0							      ;

				       59  DD 004EC 	    PUSHL   R9							      ;

		         7E	       68  9A 004EE 	    MOVZBL  PAT$GL_COMNBK+3, -(SP)				      ;

				       50  DD 004F1 	    PUSHL   R0							      ;

				       03  DD 004F3 	    PUSHL   #3							      ;

			    006D8164   8F  DD 004F5 	    PUSHL   #7176548						      ;

				       77  11 004FB 5$:     BRB     7$							      ;

		         64	       01  88 004FD 6$:     BISB2   #1, PAT$GL_FLAGS					      ; 1432

		         74	       52  E9 00500 	    BLBC    R2, 8$						      ; 1433

	      00000000G  EF	       6E  9E 00503 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1436

				       66  D4 0050A 	    CLRL    PAT$GL_BUF_SIZ					      ; 1437

				       59  DD 0050C 	    PUSHL   R9							      ; 1438

		         7E	       68  9A 0050E 	    MOVZBL  PAT$GL_COMNBK+3, -(SP)				      ;

			    00000000'  EF  9F 00511 	    PUSHAB  COM_STR						      ; 1338

	      00000000G  EF	       03  FB 00517 	    CALLS   #3, PAT$FAO_PUT					      ; 1438

			    00000000G  EF  9F 0051E 	    PUSHAB  PAT$GL_JNLRAB					      ; 1439

				  04   AE  9F 00524 	    PUSHAB  OUT_BUFFER						      ;

				       66  DD 00527 	    PUSHL   PAT$GL_BUF_SIZ					      ;

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

	      00000000G  EF	       6E  9E 00530 	    MOVAB   OUT_BUFFER, PAT$CP_OUT_STR				      ; 1440

				       66  D4 00537 	    CLRL    PAT$GL_BUF_SIZ					      ; 1441

				  18   A5  9F 00539 	    PUSHAB  COMLINE_DESC+8					      ; 1442

			    00000000'  EF  9F 0053C 	    PUSHAB  COM_LINE_STR					      ; 1338

	      00000000G  EF	       02  FB 00542 	    CALLS   #2, PAT$FAO_PUT					      ; 1442

		    16   AA	       66  B0 00549 	    MOVW    PAT$GL_BUF_SIZ, PAT$GL_COMRAB+34			      ; 1443

		    1C   AA	       6E  9E 0054D 	    MOVAB   OUT_BUFFER, PAT$GL_COMRAB+40			      ; 1444

				  F4   AA  9F 00551 	    PUSHAB  PAT$GL_COMRAB					      ; 1445

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

		         6B	       50  D0 0055B 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         16	       50  E8 0055E 	    BLBS    R0, 8$						      ;

				       6A  DD 00561 	    PUSHL   PAT$GL_COMRAB+12					      ; 1447

				       6B  DD 00563 	    PUSHL   PAT$GL_ERRCODE					      ;

				       59  DD 00565 	    PUSHL   R9							      ;

		         7E	       68  9A 00567 	    MOVZBL  PAT$GL_COMNBK+3, -(SP)				      ;

				       6B  DD 0056A 	    PUSHL   PAT$GL_ERRCODE					      ;

				       03  DD 0056C 	    PUSHL   #3							      ;

			    006D81E4   8F  DD 0056E 	    PUSHL   #7176676						      ;

		         63	       07  FB 00574 7$:     CALLS   #7, LIB$SIGNAL					      ;

					   04 00577 8$:     RET     							      ; 1338



; Routine Size:  334 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 8

; Digital Equipment Corporation

;

;	1456	ROUTINE CLIERROR (REQDESC,CLIADDR) : NOVALUE =		! ROUTINE TO REPORT CLI ERRORS

;	1457	

;	1458	!++

;	1459	! FUNCTIONAL DESCRIPTION:

;	1460	!

;	1461	! THIS IS THE ACTION ROUTINE FOR THE FOR REPORTING ANY COMMAND PARSE ERRORS.

;	1462	! AN ERROR MESSAGE IS PRODUCED AND THE PATCH EXITS.

;	1463	!

;	1464	! FORMAL PARAMETERS:

;	1465	!

;	1466	!	REQDESC = THE ADDRESS OF THE REQUEST DESCRIPTOR

;	1467	!	CLIADDR = THE ADDRESS OF THE CLI CALL BACK ROUTINE

;	1468	!

;	1469	! IMPLICIT INPUTS:

;	1470	!

;	1471	!	NONE

;	1472	!

;	1473	! IMPLICIT OUTPUTS:

;	1474	!

;	1475	!	NONE

;	1476	!

;	1477	! ROUTINE VALUE:	NONE

;	1478	!

;	1479	! COMPLETION CODES:

;	1480	!

;	1481	!	NONE

;	1482	!

;	1483	! SIDE EFFECTS:

;	1484	!

;	1485	!	AN ERROR MESSAGE IS PRODUCED AND THE UTILITY EXITS.

;	1486	!

;	1487	!--

;	1488	

;	1489	BEGIN

;	1490	SIGNAL(PAT$_CLIERR);						! CLI ERROR MESSAGE

;	1491	

;	1492	END;								! END OF CLIERROR











					 0000 00578 CLIERROR:

							    .WORD   Save nothing					      ; 1456

			    006D8154   8F  DD 0057A 	    PUSHL   #7176532						      ; 1490

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

					   04 00587 	    RET     							      ; 1456



; Routine Size:  16 bytes





;	1493	END								! END OF MODULE

;	1494	ELUDOM







; Bliss-32 7.352	Saturday 22-AUG-1978 02:54:49	DBB3:[PATCH.SRC]PATMAI.B32;19					Page 8-1

; Digital Equipment Corporation

;





							    .GLOBL  LIB$SIGNAL



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

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

;  _PAT$CODE      	  1416  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]STARLET.L32;1		      2688        38         1       133











; Size:		1416 code + 416 data bytes

; Run Time:	00:51.4

; Elapsed Time:	01:21.9

; Memory Used:	309 pages

; Compilation Complete

