

I.	INTRODUCTION

		THE "COMPARE LOAD MODULE" PROGRAM, COMPLM.TSK, WAS WRITTEN TO
	RUN UNDER THE RSX-11M OPERATING SYSTEM.  THIS PROGRAM IS DESIGNED TO
	GENERATE A LIST OF DIFFERENCES BETWEEN TWO DOS/BATCH LOAD MODULES.




II.	COMMAND LINE SPECIFICATIONS

		THE INSTALLED TASK NAME IS CLM, AND THE PROGRAM IS INITIATED
	LIKE ANY OTHER RSX-11M UTILITY.  INDIRECT COMMAND FILES, OF STANDARD
	RSX-11M FORMAT, MAY BE USED WITH THIS UTILITY.




		THE FORMAT FOR SPECIFYING THE CLM COMMAND LINE IS:

			OUTFILE/SW = INFILE1,INFILE2/SW




	OUTFILE - FILE SPECIFICATION FOR THE OUTPUT FILE (STANDARD
		  RSX-11M FORMAT).  THE DEFAULT FILE SPECIFICATION IS
		  SY0:COMPLM.DAT.  THE OUTPUT FILE MUST BE SPECIFIED THROUGH
		  THE USE OF AN EQUAL SIGN.

			ERROR.DAT=TEST1.R00,TEST2.R00
				OUTPUT IS TO FILE SY0:ERROR.DAT

			TI:=TEST1.R00,TEST2.R00
				OUTPUT IS TO THE OPERATORS TERMINAL

			=TEST1.R00,TEST2.R00
				OUTPUT IS TO THE DEFAULT FILE (SY0:COMPLM.DAT)




	/SW	-  SWITCHES APPLIED TO THE OUTFILE SPECIFICATION
		   (SEE SECTION III)




	INFILE1	-  THE FILE SPECIFICATION (STANDARD RSX-11M FORMAT) OF THE
		   FILE TO BE COMPARED TO INFILE2.  THE FILE NAME MUST BE
		   SPECIFIED.  THE DEFAULT FILE TYPE IS .LDA.

			DK2:[100,10]ERROR.DAT=DK1:[100,11]TEST,DK1:TEST.R00
				INFILE1 DEFAULTS TO AN EXTENTION OF .LDA







  




	INFILE2	-  THE FILE SPECIFICATION (STANDARD RSX-11M FORMAT) OF THE
		   FILE TO BE COMPARED TO INFILE1.  THE FILE NAME MUST BE
		   SPECIFIED.  THE DEFAULT FILE TYPE IS .LDA.
			



	/SW	-  SWITCHES APPLIED TO THE INFILE2 SPECIFICATION
		   (SEE SECTION IV)




III. 	CLM SWITCHES FOR THE OUTFILE SPECIFICATION




	/HA	-  SPECIFIES THAT THE OUTPUT ADDRESSES WILL BE IN HONEYWELL   
		   WORD ADDRESSING FORMAT.  (FOR EXAMPLE: HONEYWELL 1000,1001,
		   1002,1003 VERSUS DEC 1000,1002,1004,1006)  THIS SWITCH MUST
		   BE USED WHEN THE INFILES ARE HONEYWELL 516 LOAD MODULES.
		   THE DEFAULT IS /-HA (DEC BYTE ADDRESSING).

				TI:/HA=ALR0,ALR1
					COMPARE THE H-516 MAIN LOAD MODULES



	/SP	-  SPECIFIES THAT THE OUTPUT FILE WILL BE SPOOLED TO THE LINE
		   PRINTER UPON COMPLETION OF THE COMPARE.  THE DEFAULT IS
		   /-SP (DO NOT SPOOL THE OUTPUT FILE)

				/SP=TEST1,TEST2
					SPOOL THE OUTPUT FILE (COMPLM.DAT)




	/VI	-  SPECIFIES THAT THE ADDRESSES OF ANY DISCREPENCIES WILL BE 
		   VIRTUAL ADDRESSES INSTEAD OF PHYSICAL ADDRESSES.  THIS
		   SWITCH DISABLES THE MEMORY MANAGEMENT PORTION OF COMPLM.TSK
		   THE DEFAULT IS /-VI (OUTPUT PHYSICAL ADDRESSES)

				TI:/VI=TEST1.R00,TEST2.R00
					ERROR ADDRESSES ARE VIRTUAL




















	/PP	-  SPECIFIES THAT POST-PROCESSING WILL BE PERFORMED ON ANY
		   ERRORS ENCOUNTERED DURING THE COMPARE.  POST-PROCESSING
		   IS A TOOL TO HELP DETERMINE ACTUAL FILE DIFFERENCES FROM
		   THOSE THAT ARE A RESULT OF THOSE DIFFERENCES. THE POST-
		   PROCESSING OUTPUT SHOULD BE USED IN CONJUCTION WITH THE
		   ACTUAL ERROR OUTPUT TO GET A TRUE PICTURE OF THE
		   DIFFERENCES BETWEEN FILE 1 AND FILE 2. POST-PROCESSING
		   SORTS THE ERRORS INTO NUMERICAL ORDER (BY ADDRESS) AND
		   ELIMINATES THE FIRST OF ANY ADDRESSES WHICH HAVE BEEN
		   LOADED MORE THAN ONCE.  ANOTHER COMPARE OF THESE SORTED
		   ERRORS IS PERFORMED AND THE RESULTS SENT TO THE OUTPUT
		   FILE.  THE DEFAULT IS /-PP (NO POST-PROCESSING PERFORMED)
		   (SEE SECTION VI FOR MORE INFORMATION ON THE POST-
		   PROCESSING PROCESS.)

				TI:/PP=TEST1.R00,TEST2.R00
					PERFORM POST-PROCESSING ON THE
					RESULTS OF THE COMPARE.



IV.	CLM SWITCHES FOR INPUT FILE SPECIFICATION 2 (INFILE2)
		   



	/O1:N	-  SPECIFIES THE OFFSET (+ AND -) THAT WILL BE APPLIED
		   TO THE DATA OF FILE 2 DURING THE COMPARE.  WHERE N IS
		   ANY OCTAL NUMBER.  THE DEFAULT IS /-O1:N (NO OFFSET)

	/O2:N	-  SPECIFIES THE OFFSET (+ AND -) THAT WILL BE APPLIED
		   TO THE DATA OF FILE 2 DURING THE COMPARE.  WHERE N IS
		   ANY OCTAL NUMBER.  THE DEFAULT IS /-O2:N (NO OFFSET)

	/O3:N	-  SPECIFIES THE OFFSET (+ AND -) THAT WILL BE APPLIED
		   TO THE DATA OF FILE 2 DURING THE COMPARE.  WHERE N IS
		   ANY OCTAL NUMBER.  THE DEFAULT IS /-O3:N (NO OFFSET)

	/O4:N	-  SPECIFIES THE OFFSET (+ AND -) THAT WILL BE APPLIED
		   TO THE DATA OF FILE 2 DURING THE COMPARE.  WHERE N IS
		   ANY OCTAL NUMBER.  THE DEFAULT IS /-O4:N (NO OFFSET)

	/O5:N	-  SPECIFIES THE OFFSET (+ AND -) THAT WILL BE APPLIED
		   TO THE DATA OF FILE 2 DURING THE COMPARE.  WHERE N IS
		   ANY OCTAL NUMBER.  THE DEFAULT IS /-O5:N (NO OFFSET)

		   THE OFFSET SWITCHES ARE USED TO ELIMINATE SOME 
		   EXTRANEOUS ERRORS.  WHEN LOCATIONS ARE EITHER ADDED TO,
		   OR DELETED FROM ONE OF THE FILES BEING COMPARED, SOME
		   OF THE RELATIVE ADDRESSES MAY BE OFFSET BY THE AMOUNT
		   OF THE ADDITION OR DELETION.  THESE RELATIVE ADDRESSES
		   WILL BE OUTPUT AS DIFFERENCES AND WHILE THEY ARE TRUE
		   ERRORS,THEY DISTRACT FROM THE MAIN CAUSE OF THE ERRORS,
		   NAMELY THE ORIGINAL ADDITION OR DELETION.  THE PROGRAM
		   USES THE OFFSET SWITCH VALUES ONLY WHEN THE ORIGINAL
		   DATA DOES NOT COMPARE.  SEE SECTION VII FOR MORE INFOR-
		   MATION ON THE USE OF THE OFFSET SWITCHES.









				TI:=TEST1,TEST2/O1:4
					IF THE ORIGINAL DATA DOES NOT COMPARE,
					ADD 4 TO FILE 2'S DATA AND TRY AGAIN
					IF THE DATA STILL DOES NOT COMPARE 
					SUBTRACT 4 FROM FILE 2'S DATA AND TRY
					AGAIN.

				TI:=TEST1,TEST2/O1:4/O2:10
					IF THE ORIGINAL DATA DOES NOT COMPARE,
					ADD 4 TO FILE 2'S DATA AND TRY AGAIN
					IF THE DATA STILL DOES NOT COMPARE 
					SUBTRACT 4 FROM FILE 2'S DATA AND TRY
					AGAIN.  IF THERE IS STILL NO COMPARE,
					ADD 10 TO FILE 2'S DATA AND TRY AGAIN
					IF THE DATA STILL DOES NOT COMPARE 
					SUBTRACT 10 FROM FILE 2'S DATA AND TRY
					AGAIN.

				TI:=TEST1,TEST2/O1:4/O2:10/O3:50/O4:1000/O5:20
					IF THE ORIGINAL DATA DOES NOT COMPARE,
					TRY EACH OF THE OFFSETS IN TURN UNTIL
					EITHER THE DATA COMPARES OR THERE ARE 
					NO MORE OFFSETS.




V.	EXPLANATION OF SOME NON-SELF EXPLANATORY ERROR AND ADVISORY MESSAGES


	CLM -- FILE 1 AND FILE 2 ARE DIFFERENT SIZE

			THIS MESSAGE, GIVEN AT THE BEGINING OF THE COMPARE,
		IS THE RESULT OF COMPARING THE POSITION OF THE FIRST FREE 
		BYTE IN EACH OF THE FILES.  ALTHOUGH THIS IS A GOOD
		INDICATION OF A DISCREPENCY BETWEEN THE TWO MODULES THE
		DIFFERENT SIZE MAY BE DUE TO THE DOUBLE STORAGE OF SOME
		LOCATION BY THE LINKER.  SOMETIMES THE LINKER WILL FIRST
		STORE A RELATIVE ADDRESS, THEN LATER IN THE MODULE STORE A
		PHYSICAL ADDRESS, SO ALTHOUGH THE SIZE OF THE MODULE WILL
		BE DIFFERENT THE END RESULT WILL BE THE SAME.  THE /PP
		SHOULD RESOLVE THIS QUESTION BY ELIMINATING ALL BUT THE
		LAST DATA STORED IN ANY ONE PARTICULAR LOCATION.


	FILE 1	XXXXXX - YYYYYY

			INDICATES THAT FILE 1 CONTAINES DATA THAT FILE 2
		DOES NOT.  XXXXXX IS THE ADDRESS, YYYYYY IS THE DATA THAT
		WAS TO BE STORED IN THAT ADDRESS.   


						FILE 2	XXXXXX - YYYYYY

			INDICATES THAT FILE 2 CONTAINES DATA THAT FILE 1
		DOES NOT.  XXXXXX IS THE ADDRESS, YYYYYY IS THE DATA THAT
		WAS TO BE STORED IN THAT ADDRESS.   









	FILE 1	XXXXXX - YYYYYY			FILE 2	XXXXXX - YYYYYY  ZZZZZ

			INDICATES THAT FILE 1 AND FILE 2'S DATA DOES NOT
		MATCH.  XXXXXX IS THE ADDRESS, YYYYYY IS THE DATA THAT
		WAS TO BE STORED IN THAT ADDRESS.  ZZZZZ IS THE DIFFERENCE
		BETWEEN THE DATA OF FILE 1 AND THE DATA OF FILE 2.  THIS
		FIGURE IS HELPFUL IN DETERMINING ANY OFFSETS TO BE INCLUDED
		IN SUBSEQUENT COMPARES OF THESE FILES.



	****** FILE 1 AT ADDRESS - XXXXXX	FILE 2 AT ADDRESS - XXXXXX

			THE COMPARE PROGRAM KEEPS TRACK OF THE ADDRESSES
		INTO WHICH THE DATA BEING COMPARED IS STORED.  IF FOR ANY
		REASON THESE ADDRESSES BECOME UNEQUAL THE ABOVE MESSAGE IS
		OUTPUT.  THE COMPARE PROGRAM THEN DETERMINES AN ADDRESS
		OFFSET AND CONTINUES MONITERING THE ADDRESSES.  IF THE
		ADDRESSES, PLUS THE ADDRESS OFFSET, AGAIN BECOME UNEQUAL
		THE MESSAGE IS OUTPUT AGAIN, AND A NEW OFFSET CALCULATED.
		THE "ADDRESS OFFSET" SHOULD NOT BE CONFUSED WITH THE OFFSET
		SWITCHES (/O1:N.../O5:N) WHICH ARE APPLIED TO THE DATA
		WHICH GOES INTO THE ADDRESSES.  TWO REASONS FOR THE ADDRESSES
		TO BECOME UNEQUAL ARE AN ADDITION OR DELETION TO ONE OF THE
		LOAD MODULES OR ONE MODULE BOTTOMED AT A DIFFERENT LOCATION
		THAN THE OTHER.  A "BSZ" INSTRUCTION IN ONE OF THE MODULES
		WILL SHIFT THE ADDRESS OF THAT MODULE AND PRODUCE THE ABOVE
		MESSAGE. (THE LOAD MODULE DOES NOT STORE ZEROS FOR A "BSZ",
		IT JUST BUMPS THE ADDRESS)




	FILE 1 AT EOF       OR        FILE 2 AT EOF

			INDICATES THAT THE END OF THE FILE WAS REACHED
		WHILE OUTPUTING ERRORS. (THE ERRORS CONTINUED UP TO THE
		END OF THE FILE)




	POINTLESS TO CONTINUE

			WHEN THE THE COMPARE PROGRAM CANNOT REMATCH THE
		FILES AFTER AN ERROR, AND THE END OF FILE IS MORE THAN 256
		LOCATIONS AWAY, THE ERROR OUTPUT IS LIMITED TO 10 LOCATIONS
		AND THE ABOVE ADVISORY MESSAGE IS GIVEN.



	CLM -- TOO MANY ERRORS FOR POST-PROCESSING BUFFER
	       PROGRAM WILL OUTPUT MORE THAN ONE ERROR LIST

			THE POST-PROCESSER WILL SPLIT ITS COMPUTAION
		INTO TWO OR MORE PARTS AND OUTPUT THE DATA AS EACH
		PORTION IS COMPLETED.









	CLM -- BEGIN POST-PROCESSING OUTPUT

			THE FOLLOWING DATA IS FROM THE POST-PROCESSING
		PROCESS.




	CLM -- FINISHED WITH COMPARE

			THE CLM UTILITY IS FINISHED WITH THE CURRENT
		COMMAND LINE AND IS READY TO ACCEPT ANOTHER INPUT.



VI.	EXAMPLE OF POST-PROCESSING

			IN THE FOLLOWING EXAMPLE, THE NUMBERS IN PARENTHESIS,
		SHOW THE ERRORS THAT OCCUR WHEN THE LINKER DOUBLE STORES SOME 
		OF THE LOCATIONS [SEE NUMBERS (1) AND (8)].  IT ALSO SHOWS HOW
		THE COMPARE PROGRAM CAN BECOME CONFUSED WHEN THE ORDER OF
		STORAGE IS CHANGED [SEE NUMBERS (4),(5),(6), AND (7)].  THE
		REASON THE COMPARE PROGRAM CONSIDERS THESE AS ERRORS, IS THAT
		IT TAKES FIVE CONSECUTIVE SUCCESSFUL DATA COMPARES BEFORE IT
		CONSIDERS THE FILES REMATCHED.  IN THE CASE BELOW, THE MOST IT
		COULD EVER GET WAS TWO. POST-PROCESSING RESOLVED THESE ERRORS
		BY ORDERING THEM NUMERICALY BY ADDRESS, ELIMINATING THE DOUBLE
		STORES AND USING AN OFFSET OF 24. OF COURSE THE NUMBERS IN
		PARENTHESIS ARE THERE JUST FOR THIS EXAMPLE.



******************************************
ERROR.LST/PP=B44C0B.C0,B44C1.C1/O1:24
******************************************

CLM -- FILE 1 AND FILE 2 ARE DIFFERENT SIZE

	FILE 1	130660 - 001435		FILE 2	130660 - 001430   5

	FILE 1	130702 - 001424		FILE 2	130702 - 001417   5

	FILE 1	130714 - 020127

	FILE 1	130716 - 001010

	FILE 1	130720 - 003402

	FILE 1	130722 - 012701

	FILE 1	130724 - 001010

****** FILE 1 AT ADDRESS - 130726	FILE 2 AT ADDRESS - 130714

	FILE 1	130772 - 002730		FILE 2	130760 - 002735   -5

	FILE 1	131046 - 001534(1)   (1)FILE 2	131034 - 125534   54000

****** FILE 1 AT ADDRESS - 131046	FILE 2 AT ADDRESS - 131076









	FILE 1	131046 - 125534(1)

	FILE 1	131056 - 125532(2)

****** FILE 1 AT ADDRESS - 131110	FILE 2 AT ADDRESS - 131076

****** FILE 1 AT ADDRESS - 131122	FILE 2 AT ADDRESS - 131044

				     (2)FILE 2	131044 - 125532

****** FILE 1 AT ADDRESS - 131122	FILE 2 AT ADDRESS - 131110

	FILE 1	131224 - 000764(3)   (3)FILE 2	131212 - 124764   54000

	FILE 1	131244 - 020027

	FILE 1	131246 - 000030

	FILE 1	131250 - 002002

	FILE 1	131252 - 012700

	FILE 1	131254 - 000030

****** FILE 1 AT ADDRESS - 131256	FILE 2 AT ADDRESS - 131232

****** FILE 1 AT ADDRESS - 131224	FILE 2 AT ADDRESS - 131246

	FILE 1	131224 - 124764(3)   (6)FILE 2	131246 - 001003   -54017

	FILE 1	131236 - 005222(4)   (7)FILE 2	131250 - 005737   -515

	FILE 1	131262 - 134530(5)   (8)FILE 2	131252 - 001140   -44410

	FILE 1	131272 - 001003(6)

	FILE 1	131274 - 005737(7)

	FILE 1	131276 - 125140(8)

****** FILE 1 AT ADDRESS - 131300	FILE 2 AT ADDRESS - 131254

****** FILE 1 AT ADDRESS - 131316	FILE 2 AT ADDRESS - 131224

				     (4)FILE 2	131224 - 005222

				     (5)FILE 2	131236 - 134504

  				     (8)FILE 2	131252 - 125140

******************************************
CLM -- BEGIN POST-PROCESSING OUTPUT
******************************************

	FILE 1	130660 - 001435		FILE 2	130660 - 001430

	FILE 1	130702 - 001424		FILE 2	130702 - 001417







  

	FILE 1	130714 - 020127

	FILE 1	130716 - 001010

	FILE 1	130720 - 003402

	FILE 1	130722 - 012701

	FILE 1	130724 - 001010

					FILE 2	130760 - 002735

	FILE 1	130772 - 002730

	FILE 1	131244 - 020027

	FILE 1	131246 - 000030

	FILE 1	131250 - 002002

	FILE 1	131252 - 012700

	FILE 1	131254 - 000030



VII.	EXAMPLE OF THE USE OF THE OFFSET SWITCH (O1:N)

			THE EXAMPLE BELOW, SHOWS HOW THE ADDITION OF
		THREE WORDS IN FILE 2 CREATED NUMEROUS RELATIVE
		ADDRESSING ERRORS.  NOTICE THAT MANY OF THE ERRORS 
		SHOW A DIFFERENCE OF AN OCTAL 6 BETWEEN FILES 1 AND 2.
		THIS OCTAL 6 IS DIRECTLY RELATED TO THE THREE ADDED
		INSTRUCTIONS.  HOWEVER BECAUSE THERE ARE SO MANY ERRORS
		IT IS DIFFICULT TO DETERMINE EXACTLY WHERE THE THREE
		INSTRUCTIONS WERE ADDED.

  
******************************************
ERROR.LST=MON.,MON2.
******************************************

CLM -- FILE 1 AND FILE 2 ARE DIFFERENT SIZE

					FILE 2	000202 - 012345

****** FILE 1 AT ADDRESS - 000202	FILE 2 AT ADDRESS - 000204

	FILE 1	360006 - 076350		FILE 2	360006 - 076356   -6

	FILE 1	365206 - 076744		FILE 2	365206 - 076752   -6

	FILE 1	365210 - 005037		FILE 2	365210 - 000240   4577

	FILE 1	365212 - 076742		FILE 2	365212 - 000240   76502

	FILE 1	365214 - 105037		FILE 2	365214 - 000240   -73201









	FILE 1	365216 - 076745		FILE 2	365216 - 005037   71706

	FILE 1	365220 - 105037		FILE 2	365220 - 076750   6067

	FILE 1	365222 - 076746		FILE 2	365222 - 105037   -6071

					FILE 2	365224 - 076753

					FILE 2	365226 - 105037

					FILE 2	365230 - 076754

****** FILE 1 AT ADDRESS - 365224	FILE 2 AT ADDRESS - 365232

	FILE 1	365272 - 066014		FILE 2	365300 - 066022   -6

	FILE 1	365400 - 066014		FILE 2	365406 - 066022   -6

	FILE 1	365440 - 066014		FILE 2	365446 - 066022   -6

	FILE 1	365446 - 066050		FILE 2	365454 - 066056   -6

	FILE 1	365452 - 066154		FILE 2	365460 - 066162   -6

CLM -- FINISHED WITH COMPARE



			THE PROGRAM WAS RUN AGAIN, WITH AN OFFSET OF 6.
		AS YOU CAN SEE, IT BECOMES CLEAR WHERE THE EXTRA INTRUCTIONS 
		WERE INSERTED.


******************************************
ERROR.LST=MON.,MON2./O1:6
******************************************

CLM -- FILE 1 AND FILE 2 ARE DIFFERENT SIZE

					FILE 2	000202 - 012345

****** FILE 1 AT ADDRESS - 000202	FILE 2 AT ADDRESS - 000204

					FILE 2	365210 - 000240

					FILE 2	365212 - 000240
  
					FILE 2	365214 - 000240

****** FILE 1 AT ADDRESS - 365210	FILE 2 AT ADDRESS - 365216

CLM -- FINISHED WITH COMPARE






