Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/getitm.c04
There are no other files named getitm.c04 in the archive.
 INS 4/2	;04C1
	;V12B***************
	;JSM	 1-Oct-81	[1316] Copy Repl gives spurious Fatal when Comment
	;				followed by Paragraph Name
	;WTK	30-SEP-81	[1314] CONTIN. CHAR AFTER "(" GIVES BAD SUBSCRIPT
	;PV/JM	24-SEP-81	[1310] Compiler forgets first of two LIB devices.
	;DMN	13-JUL-81	[1304] 68274 Converter fails if very first word in a 
	;				library has to be replaced by COBOL-74 syntax.

 REP 46/3	;04C2
		CAIGE	TE,^D12		;IN A-MARGIN?
		IORI	CT,AMRGN.	;YES--SET FLAG
 WIT
		SKIPN	AMARFL		;[1316] FLAG ON FOR COPY REPL "LF" KLUDGE?
					;[1316] TELL SQURL. USER-NAME IS IN A-MARGIN
		CAIGE	TE,^D12		;IN A-MARGIN?
		IORI	CT,AMRGN.	;YES--SET FLAG
		SETZM	AMARFL		;[1316] TURN OFF FLAG FOR COPY REPL "LF" KLUDGE
 REP 19/10	;04C3
		PUSHJ	PP,GETCH	;GET NEXT CHARACTER

		TSWF	FRTST		;[557] JUST DOING REPLACEMENT TEST?
 WIT
	GTWD1Z:	PUSHJ	PP,GETCH	;[1314] GET NEXT CHARACTER
		CAIE	CH,"-"		;[1314] MAKE SURE WE ARE NOT
		JRST	GTWD1Y		;[1314] LOOKING AT A
		CAIN	CP,7		;[1314] CONTINUATION CHARACTER
		JRST	GTWD1Z		;[1314]

	GTWD1Y:	TSWF	FRTST		;[557] JUST DOING REPLACEMENT TEST?
 REP 45/29	;04C4
		JRST	FINLIN		;YES
 WIT
	;[D1316]	JRST	FINLIN		;YES
	;[1316] AT THIS POINT, WE HAVE THE LF AND WE HAVE TO DECIDE WHETHER TO
	;[1316] TO PUT IT ON THE LISTING. IT GOES ON LISTING IF THE FOLLOWING
	;[1316] FIVE SWITCHES HAVE THE APPROPRIATE SETTINGS: FCOPY - OFF,
	;[1316] FRLIB - ON, FNOCPY - ON, FRTST - ON, NOCONT - ON. (CONTINUATIONS
	;[1316] ARE FORTUITOUSLY DISALLOWED FOR * COMMENT LINES.)
	;[1316] OTHERWISE FINLIN WILL BE ALLOWED TO BEHAVE AS BEFORE.
	;[1316]
		JRST	[SKIPN	NOCONT		;[1316] CONTIN'S DISALLOWED?
			 JRST	FINLIN		;[1316] NO
			 TSWF	FRLIB		;[1316] READING LIB FILE?
			 TSWF	FCOPY		;[1316] COPY REPL IN PROGRESS?
			 JRST	FINLIN		;[1316]
			 TSWF	FRTST		;[1316] TESTING FOR REPL MATCH?
			 TSWT	FNOCPY		;[1316] NOT PUTTING LF TO LISTING?
			 JRST	FINLIN		;[1316]
			 SWOFF	FNOCPY		;[1316] FORCE IT TO LISTING
			 SWON	FNCOFF		;[1316] NOTE THAT WE FORCED IT
			 JRST	FINLIN]		;[1316] GO FORCE IT
						;[1316]
 INS 17/30	;04C5
	;[1316] IF WE FORCED THE LF TO THE LISTING, WE HAVE TO RESET FNOCPY SO
	;[1316] THAT IT WON'T CAUSE PROBLEMS BEFORE WE GET TO GETSQ9
	;[1316]
		TSWFZ	FNCOFF		;[1316] DID WE FORCE LF TO LISTING?
		SWON	FNOCPY		;[1316] YES, ALSO RESET FNOCPY
					;[1316]
 REP 17/33	;04C6

	GETSQ9:	TSWF	FNOCPY		;IGNORE IF NOT OUTPUTING TO CPYFIL
 WIT
	;[1316] HERE WE HAVE TO DO THE SAME RAIN DANCE AS AT GETCH5 ABOVE. THIS
	;[1316] TIME THE OBJECTIVE IS TO GET THE SIX SPACES IN FRONT OF THE NEW
	;[1316] LINE ONTO THE LISTING. ALSO, NOT SURPRISINGLY, WE HAVE TO HOLD
	;[1316] OFF ON PUTTING THE FIRST CHARACTER OF THE USER NAME TO THE LISTING
	;[1316] IN SITUATIONS WHERE THE FIVE CONDITIONS ARE MET.
	;[1316]
	;[D1316] GETSQ9:	TSWF	FNOCPY	;IGNORE IF NOT OUTPUTING TO CPYFIL
	;[1316]
	GETSQ9:				;[M1316]
		SKIPN	NOCONT		;[1316] CONTIN'S DISALLOWED?
		JRST	GTSQ9A		;[1316] NO
		TSWF	FRLIB		;[1316] READING LIB FILE?
		TSWF	FCOPY		;[1316] COPY REPL IN PROGRESS?
		JRST	GTSQ9A		;[1316]
		TSWF	FRTST		;[1316] TESTING FOR REPL MATCH?
		TSWT	FNOCPY		;[1316] NOT PUTTING SPACES TO LISTING?
		JRST	GTSQ9A		;[1316]
		SWOFF	FNOCPY		;[1316] FORCE THEM TO LISTING
		SWON	FNCOFF		;[1316] NOTE THAT WE FORCED THEM
	GTSQ9A:				;[1316]
		TSWF	FNOCPY		;[M1316] IGNORE IF NOT PUTTING OUT TO CPYFIL
 INS 25/33	;04C7
	;[1316] IF WE ARE FORCING SPACES TO LISTING, PUT IN TWO MORE TO TIDY IT UP.
		TSWF	FNCOFF		;[1316]
		ADDI	TD,2		;[1316]
					;[1316]
 REP 29/33	;04C8
		PUSHJ	PP,PUTCPY
 WIT
	;[1316] IF WE ARE FORCING SPACES TO LISTING, SUPPRESS FIRST CHARACTER OF
	;[1316] USER NAME FOR NOW. IT WILL GET ONTO LISTING LATER.
		TSWT	FNCOFF		;[1316]
					;[1316]
		PUSHJ	PP,PUTCPY
	;[1316] NOW WE SET SWITCH TO INDICATE USER NAME IS IN A-MARGIN, AND THEN
	;[1316] RESTORE FNOCPY AND FNCOFF SWITCHES.
		TSWF	FNCOFF		;[1316] ARE WE FORCING SPACES TO LISTING?
		SETOM	AMARFL		;[1316] SET A-MARGIN FLAG FOR KLUDGE
		TSWFZ	FNCOFF		;[1316] CLEAR THIS FLAG, IF SET
		SWON	FNOCPY		;[1316] AND RE-SET THIS ONE, IF NECESSARY
					;[1316]
 REP 75/41	;04C9
	CPLB57:	CAMN	TA,DEVFIL(TC)	;SEE IF FILE NAME MATCH
		CAME	TB,DEVEXT(TC)	;AND EXTENSION
 WIT
	CPLB57:				;[M1310]
		HLLZ	TD,DEVEXT(TC)	;[1310] GET FILE EXTENSION BY ITSELF
		SKIPN	TD		;[1310] NULL EXTENSION?
		MOVSI	TD,'LIB'	;[1310] YES, ALLOW 'LIB' TO MATCH NULL
		CAMN	TA,DEVFIL(TC)	;SEE IF FILE NAME MATCH
		CAME	TB,TD		;[M1310] AND EXTENSION
 INS 37/59	;04C10
		MOVE	TD,[POINT 7,CVTLBF,6]	;[1304]
		MOVEM	TD,CVTSCP	;[1304] LDB POINTER TO START OF CURRENT LINE
		MOVEM	TD,CVTSNP	;[1304] RESET NEXT WORD POINTER ALSO
 INS 20/76	;04C11
	EXTERN	AMARFL		;[1316] IF -1 FORCE A-MARGIN AFTER LF FOLLOWING
				;[1316]  * COMMENT
 SUM 194568