Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11i-bm_tops20_v7_0_atpch_1-22 - autopatch/mscgen.c11
There are 2 other files named mscgen.c11 in the archive. Click here to see a list.
 REP 28/1	;11C1

 WIT
	;JEH	22-MAR-85	[1563] Fix 'set condition-name' code.
 REP 21/47	;11C2

		PUSH	PP,1(TC)	;SAVE ORIGINAL CONTAB ENTRY
		HRRM	TA,1(TC)	;FAKE OPERAND TO POINT TO DATAB
		MOVEI	LN,EBASEB	;SET IT UP AS "B" OPERAND
		PUSHJ	PP,SETOPN
		MOVE	TC,CUREOP	;RESTORE TC
		POP	PP,1(TC)	;PUT CONTAB LINK BACK
 WIT
	;movgen expects entries for at least two operands on eop stack.
	;Phase D has made one entry for the condition-name. This has
	;to be moved down in eoptab so the source operand can be build first,
	;and it has to be modified to be a datab operand, not a contab operand.
	;First, compute the size of the contab operand and move it.

		MOVE	TE,1(TC)	;[1564] GET SECOND WORD OF OPERAND
		LDB	TE,TESUBC	;[1564] GET NUMBER OF SUBSCRIPTS
		IMULI	TE,2		;[1564]  TIMES 2 WORDS PER SUB
		ADDI	TE,2		;[1564]  PLUS 2 WORDS FOR THE OPERAND
		MOVE	TA,EOPNXT	;[1564] END OF CURRENT EOP STACK
		MOVE	TB,TA		;[1564] 
		ADD	TB,[2,,2]	;[1564] NEW END OF EOP STACK
		MOVEM	TB,EOPNXT	;[1564]
		MOVEM	TB,EACA		;[1564]
	SETCD5:
		POP	TA,TC		;[1564] POP OFF CONTAB ENTRY
		MOVEM	TC,(TB)		;[1564] PLACE IT TWO WORDS LOWER
		SOS	TB		;[1564]
		SOJG	TE,SETCD5	;[1564]
		
	;Build dummy operand on eop stack for the source in the move, which is the
	;literal stored in %PARAM equal to the 88 level value.
	;
	;operand word one = %param entry for condition-name value

	SETCD6:	MOVE	TB,CUREOP	;[1564] STILL POINTS TO CONDITION-NAME
		HRRZ	TA,1(TB)	;[1564] GET THE CONTAB LINK
		MOVEM	TA,CURCON	;[1564] SAVE IT
		PUSHJ	PP,LNKSET	;[1564] ABSOLUTIZE IT
		LDB	TD,CO.FIG	;[1564] IS VALUE A FIGURATIVE CONSTANT?
		JUMPN	TD,SETCD7	;[1564] YES
		LDB	TD,CO.TAG	;[1564] GET THE %PARAM TAG
		IORI	TD,AS.TAG	;[1564] MARK IT AS A TAG
		HRLI	TD,22000	;[1564] SET 'IN PARAM' (GNPAR) AND GNNOTD
		MOVEM	TD,(TB)		;[1564]

	;operand word two = size, mode, nbr of decimal places, and 'not-datab' flag
		MOVSI	TD,GNOPNM	;[1564]
		LDB	TA,CO.DAT	;[1564]
		MOVEM	TA,CURDAT	;[1564]
		PUSHJ	PP,LNKSET	;[1564]
		LDB	TC,DA.USG	;[1564] GET DESTINATION USAGE
		DPB	TC,[POINT 4,TD,13]	;[1564]
		LDB	TC,DA.INS	;[1564] GET DESTINATION SIZE
		DPB	TC,ACSIZE##	;[1564]
		LDB	TC,DA.NDP##	;[1564] GET DESTINATION DEC. PLACES
		HRR	TD,TC		;[1564]
		TLO	TD,GNNOTD	;[1564] SET NOT DATAB FLAG
		MOVEM	TD,1(TB)	;[1564] OVERWRITE WORD 2 OF OPERAND
		JRST	SETCD8		;[1564] NOW FIX UP DESTINATION EOP ENTRY

	;[1564] source is a figurative constant
	FIGVAL:	HRLZI	TE,GNFCLV	;[1564] SET BIT FOR LOW-VALUES,
		HRLZI	TE,GNFCHV	;[1564]  HIGH-VALUES,
		HRLZI	TE,GNFCQ	;[1564]  QUOTES,
		HRLZI	TE,GNFCZ	;[1564]  ZEROS,
		HRLZI	TE,GNFCS	;[1564]  SPACES
	FIGTYP: POINT	5,2(TA),7	;[1564] 

	SETCD7:	LDB	TC,CO.DAT	;[1564] GET DATAB LINK
		MOVEM	TC,CURDAT	;[1564] AND SAVE IT
		SETZ	TC,		;[1564]
		TLO	TC,400000	;[1564] SET OPERAND BIT
		TLO	TC,GNLIT!GNFIGC	;[1564] SET LITERAL!FIGURATIVE CONSTANT BITS
		LDB	TD,FIGTYP	;[1564] GET TYPE OF FIGURATIVE CONSTANT
		SOSL	TD		;[1564]
		XCT	FIGVAL(TD)	;[1564] SET FLAG IN TE
		IOR	TC,TE		;[1564] MAP IT INTO TC
		LDB	TD,CO.ALL##	;[1564] IS 'ALL' SET?
		SKIPE	TD		;[1564]
		TLO	TC,GNALL	;[1564]  YES
		MOVEM	TC,(TB)		;[1564] FIRST WORD OF OPERAND
		
		SETZM	1(TB)		;[1564] SECOND WORD OF OPERAND

	;[1564] now fix up eop entry for destination
	SETCD8:	MOVE	TC,CUREOP	;[1564] 
		ADDI	TC,2		;[1564]
		MOVEM	TC,CUREOP	;[1564] NOW POINTS TO NEW OPERAND
		MOVE	TD,(TC)		;[1564] WORD 1 OF OPERAND
		MOVE	TA,CURDAT	;[1564]
		HRRM	TA,1(TC)	;[1564] REPLACE CONTAB WITH DATAB LINK
		PUSHJ	PP,LNKSET	;[1564]
		LDB	TB,DA.LKS##	;[1564] IS IT IN THE LINKAGE SECTION?
		SKIPE	TB		;[1564]
		TLO	TD,(LKSFLG)	;[1564] YES, SET FLAG
		LDB	TB,DA.USG	;[1564] GET THE USAGE MODE
		DPB	TB,[POINT 4,TD,13]	;[1564]
		MOVEM	TD,(TC)		;[1564]

		MOVEI	LN,EBASEB	;SET IT UP AS "B" OPERAND
		PUSHJ	PP,SETOPN
 REP 32/47	;11C3
		HRRZ	TA,1(TC)	;POINT TO CONTAB LINK
 WIT
		MOVE	TA,CURCON	;[1564] point to contab link
 REP 45/47	;11C4
		PUSHJ	PP,MXX.##	;DO THE MOVE

	SETCD2:	PUSHJ	PP,BMPEOP	;STEP UP TO NEXT ONE
		  POPJ	PP,		;NO MORE
		MOVE	TC,CUREOP
		JRST	SETCD1		;YES, GO PROCESS IT
 WIT
		HRRZ	TA,EOPLOC	;[1564] GET A-OP ADDRESS
		AOS	TA		;[1564]
		HRL	TA,CUREOP	;[1564] GET B-OP ADDRESS
		MOVSM	TA,OPERND	;[1564] STORE IN OPERND FOR MOVGEN AND SUBSCR
		PUSHJ	PP,MXX.##	;DO THE MOVE

	;Always only one operand, if more in the source statement, each
	;will be followed by its own operator
	SETCD2:	POPJ	PP,		;[1564] DONE

	;[1564]SETCD2:	PUSHJ	PP,BMPEOP	;STEP UP TO NEXT ONE
	;[1564]	  POPJ	PP,		;NO MORE
	;[1564]	MOVE	TC,CUREOP
	;[1564]	JRST	SETCD1		;YES, GO PROCESS IT
 SUM 67589