Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11f-bm_tops20_v7_0_atpch1_19 - autopatch/rpwgen.c11
There are 2 other files named rpwgen.c11 in the archive. Click here to see a list.
 REP 15/1	;11C1
		%%P==:%%P

 WIT
		XPNTST==:XPNTST		;[1570]
		%%P==:%%P
		IFN TOPS20,<SEARCH MONSYM,MACSYM>	;[1570]
 INS 26/1	;11C2
	;MJC	 4-APR-85	[1572] Fix CF to use previous value when control
	;JEH	28-MAR-85	[1570] Parse and process ref. mod. fields for
	;				fields that allow subscripting
 REP 34/18	;11C3
	STR75A:	MOVE	TE,.RWSRC+1(TA)	;GET 2ND WORD
 WIT
	;[1570] Not only could it be subscripted, it could be reference modified.
	;[1570] Handle the modifiers first.
	STR75A:
		MOVE	TE,.RWSRC(TA)	;[1570] GET FIRST WORD OF OPERAND
		TXNN	TE,GNREFM	;[1570] ANY REFERENCE MODIFICATION?
		JRST	STR75B		;[1570] NO, THEN BLT THE OPERAND AS IS
		PUSHJ	PP,SETR77	;[1570] YES, CALL REFMOD: TO ADJUST OPERAND
		MOVE	EACA,EOPNXT	;[1570] RESTORE EACA AND
		MOVE	TA,CURRPW	;[1570]  TA
		SETZ	EACC,		;[1570] ZERO OPERAND LNGTH SINCE EOPNXT UPDATED
		JRST	STR75C		;[1570] NOW GO SET UP DESTINATION OPERAND

	STR75B:	MOVE	TE,.RWSRC+1(TA)	;[1570] GET 2ND WORD
 REP 45/18	;11C4
		MOVEI	TD,(EACA)	;SETUP TD= START OF 2ND OPERAND
 WIT
	STR75C:	MOVEI	TD,(EACA)	;[1570] SETUP TD= START OF 2ND OPERAND
 INS 68/18	;11C5
	;[1570] 'SOURCE identifier' has reference modifying qualifiers

	SETR77:	MOVE	TB,EOPLOC	;[1570]
		MOVE	TD,.RWSRC(TA)	;[1570] GET FIRST OPERAND WORD (HAS DATAB LINK)
		MOVE	TE,.RWSRC + 1(TA)	;[1570] AND SECOND OPERAND WORD
		PUSH	TB,TD		;[1570] STORE FIRST OPERAND WORD IN EOPTAB
		LDB	TC,TESUBC##	;[1570] GET THE COUNT OF THE SUBSCRIPTS
		SOS	TC		;[1570] MINUS ONE FOR REF. MOD. OFFSET
		MOVE	TD,.RWSRC + 3(TA)	;[1570] SECOND WORD OF FIRST MODIFIER
		TXNE	TD,RFMLEN	;[1570] IS THERE A LENGTH MODIFIER?
		SOS	TC		;[1570] YES, DECREMENT SUBSCRIPT COUNT AGAIN
		DPB	TC,TESUBC	;[1570] RESET MODIFIER COUNT IN OPERAND WORD
		PUSH	TB,TE		;[1570] STORE SECOND OPERAND WORD IN EOPTAB
		JUMPLE	TC,STR77A	;[1570] NO SUBSCRIPTS TO MOVE

		LSH	TC,1		;[1570] DOUBLE MODIFIER COUNT (2 WORDS EACH)
		MOVEI	TE,.RWSRC + 4(TA)	;[1570] ADDRESS OF FIRST SUBSCRIPT,
		TXNE	TD,RFMLEN	;[1570]  UNLESS LENGTH MODIFIER PROVIDED
		ADDI	TE,2		;[1570]
		HRLZS	TE		;[1570] START SET-UP TO BLT SUBS INTO EOPTAB
		AOBJP	TB,KILL##	;[1570] ADJUST EOPTAB STACK POINTER
		HRR	TE,TB		;[1570] PUT DESTINATION IN BLT WORD (EOPNXT)
		SOS	TC		;[1570] SUBTRACT ONE FROM MODIFIER COUNT
		HRLS	TC		;[1570] MAKE IT [N,,N]
		ADD	TB,TC		;[1570] UPDATE STACK POINTER
		MOVEM	TB,EOPNXT	;[1570]  AND REPLACE IT 
		BLT	TE,(TB)		;[1570] BLT THE SUBSCRIPTS ONTO EOP STACK
		HRRZ	TA,CURRPW	;[1570] RE-GET RPW SOURCE FIELD ADDRESS

	;[1570] Now add offset reference modifier to eop stack
	STR77A:	MOVE	TD,.RWSRC + 3(TA)	;[1570] GET SECOND WORD OF MODIFIER
		ADDI	TA,2		;[1570]  AND ITS ADDRESS
		TXNE	TD,RFMLEN	;[1570] IF THERE ARE TWO MODIFIERS
		ADDI	TA,2		;[1570]  THE LENGTH IS FIRST, OFFSET SECOND
		MOVE	TC,.RWSRC(TA)	;[1570] GET THE FIRST WORD OF THE OFFSET
		PUSH	TB,TC		;[1570] PUSH IT ON THE STACK
		MOVEM	TB,CUREOP	;[1570] SAVE IT IN CUREOP FOR REFMOD:
		MOVE	TC,.RWSRC + 1(TA)	;[1570] GET THE SECOND WORD
		MOVE	W1,[176000,,0]	;[1570] SET UP OPERATOR TO FAKE OUT REFMOD:	
		TXZE	TC,RFMLEN	;[1570] SHUT OFF LENGTH BIT
		TXO	W1,RFMBTH	;[1570] IF LENGTH FOLLOWS, SET 'BOTH' FLAG
		PUSH	TB,TC		;[1570] PUSH IT ON STACK
		PUSH	TB,[XWD 2,2]	;[1570] ADD SIZE WORD THAT EXPGEN WOULD HAVE
		MOVEM	TB,EOPNXT	;[1570]  PUT THERE
		PUSHJ	PP,REFMOD##	;[1570] MODIFY THE STARTING OFFSET OF THE SOURC

		MOVE	TA,CURRPW	;[1570] REFRESH TA
		MOVE	TC,.RWSRC + 3(TA)	;[1570] GET SECOND WORD OF OFFSET AGAIN
		TXNN	TC,RFMLEN	;[1570] IS THERE A LENGTH TO PROCESS?
		POPJ	PP,		;[1570] NO, DONE

		MOVE	TB,EOPNXT	;[1570] YES, ADD IT TO EOP STACK
		MOVE	TC,.RWSRC + 2(TA)	;[1570] 1ST OPERAND WORD OF LENGTH MOD.
		PUSH	TB,TC		;[1570]
		MOVEM	TB,CUREOP	;[1570] SAVE MODIFIER START FOR REFMOD:
		MOVE	TC,.RWSRC + 3(TA)	;[1570] 2ND OPERAND WORD OF LENGTH MOD.
		PUSH	TB,TC		;[1570]
		PUSH	TB,[XWD 2,2]	;[1570] EXPGEN SIZE WORD
		MOVEM	TB,EOPNXT	;[1570]
		MOVE	W1,[176400,,0]	;[1570] REF MOD OPERATOR WITH LENGTH BIT SET
		PUSHJ	PP,REFMOD##	;[1570]
		POPJ	PP,		;[1570]

 REP 43/28	;11C6
	WRG31A:	MOVE	TE,.RWSRC+1(TA)	;GET 2ND WORD
 WIT
	WRG31A:
		MOVE	TE,.RWSRC(TA)	;[1570] GET FIRST OPERAND WORD
		TXNN	TE,GNREFM	;[1570] ANY REFERENCE MODIFICATIONS?
		JRST	WRG31B		;[1570] NO
		PUSHJ	PP,SETR77	;[1570] YES, PROCESS THEM FIRST
		MOVE	EACA,EOPNXT	;[1570] RESET EACA, TA, AND EACC
		MOVE	TA,CURRPW	;[1570]  FOR FOLLOWING ROUTINES
		SETZ	EACC,		;[1570]
		JRST	WRG31C		;[1570] GO SET UP DESTINATION OPERAND

	WRG31B:	MOVE	TE,.RWSRC+1(TA)	;[1570] GET 2ND WORD
 REP 54/28	;11C7
		MOVEI	TD,(EACA)	;SETUP TD= START OF 2ND OPERAND
 WIT
	WRG31C:	MOVEI	TD,(EACA)	;[1570] SETUP TD= START OF 2ND OPERAND
 INS 72/28	;11C8
		JRST	WRG32C		;[1572] DON'T BUMP TO BRO YET
 REP 75/28	;11C9
		HLRZ	TB,(TD)		; [315]  GET CONTROL ID DATAB ADR
 WIT
	WRG32C:	HLRZ	TB,(TD)		;[1572] GET CONTROL ID DATAB ADR
 SUM 54061