Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50034/t6.c3
There are no other files named t6.c3 in the archive.
	SUBROUTINE GSOR(I,J)
C	GET SOURCE OPERAND.
C	OUTPUT: I=VALUE.
C	J=0-OK; NOT ZERO-ERROR
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/GEN3/SOUR,DEST,SD,DD,SM,DM,SREG,DREG
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
	COMMON /GEN4/ DE,SE

1	J=0
	IF(SM.EQ.0.AND.SD.EQ.0)GOTO 2
	IF(SG.EQ.0)GOTO3
	CALL FME(SE,I,J)
	RETURN
3	CALL FMW(SE,I,J)
	CALL ODD(SE,K)
	J=J+K
	RETURN
2	CALL GREG(SREG,I)
	IF(SG.NE.0)CALL LAND(I,ML)
	RETURN
	END

	SUBROUTINE GDEST(I,J)
C	GET DESTINATION OPERAND
C	OUTPUT: SAME AS GSOR
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/GEN3/SOUR,DEST,SD,DD,SM,DM,SREG,DREG
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
	COMMON /GEN4/ DE,SE


1	J=0
	IF(DM.EQ.0.AND.DD.EQ.0)GOTO2
	IF(SG.EQ.0)GOTO 3
	CALL FME(DE,I,J)
	RETURN
3	CALL FMW(DE,I,J)
	CALL ODD(DE,K)
	J=J+K
	RETURN
2	CALL GREG(DREG,I)
	IF(SG.NE.0)CALL LAND(I,ML)
	RETURN
	END


	SUBROUTINE SDEST(I,J)
C	STORE IN DESTINATION OPERATION.
C	INPUT: I=VALUE TO STORE.
C	OUTPUT: J=0-OK; NOT 0-ERROR.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/GEN3/SOUR,DEST,SD,DD,SM,DM,SREG,DREG
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
	COMMON /GEN4/ DE,SE



1	J=0
	IF(DM.EQ.0.AND.DD.EQ.0)GOTO 2
	IF(SG.EQ.0)GOTO 3
	CALL SME(DE,I,J)
	RETURN
3	CALL ODD(DE,J)
	IF(J.NE.0)RETURN
	CALL SMW(DE,I,J)
	RETURN
2	IF(SG.EQ.0)CALL PREG(DREG,I)
	IF(SG.NE.0)CALL PREGB(DREG,I)
	RETURN
	END

	SUBROUTINE GREG(A,BB)
C	GET REGISTER
C	INPUT: A=REGISTER NUMBER.
C	OUTPUT: BB=VALUE.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)


1	BB=REGISTER(A+2)
	CALL LAND(BB,MAL)
	RETURN
	END

	SUBROUTINE PREGB(A,BB)
C	STORE BYTE IN REGISTER.
C	INPUT: A=REGISTER NUMBER.
C	BB=VALUE TO STORE.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)


1	CALL GREG(A,C)
	CALL BTX(C,WM7,WM0,BB)
	REGISTER(A+2)=C
	RETURN
	END
	SUBROUTINE PREG(A,BB)
C	STORE WORD IN REGISTER.
C	INPUT: A=REGISTER NUMBER.
C	BB=VALUE TO STORE.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)


1	C=BB
	CALL LAND(C,MAL)
	REGISTER(A+2)=C
	RETURN
	END


	SUBROUTINE GETMOD(A,BB,C,D)
C	UNPACK 6-BIT ADDRESS MODE FIELD.
C	INPUT: A=FIELD.
C	OUTPUT: BB=DEFER
C	C=MODE.
C	D=REGISTER.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION


	CALL BXT(BB,A,WM3,WM3)
	CALL BXT(C,A,WM5,WM4)
	CALL BXT(D,A,WM2,WM0)
	RETURN
	END
	SUBROUTINE GETSE(A,E)
C	GET SOURCE EFF ADR.
C	OUTPUT: A=EFF ADR.
C	E=0-OK; NOT 0-ERROR.
	IMPLICIT INTEGER (A-Z)


1	I=1
	CALL GETEFA(A,E,I)
	RETURN
	END

	SUBROUTINE GETDE(A,E)
C	GET DEST EFF ADR.
	IMPLICIT INTEGER (A-Z)


1	I=2
	CALL GETEFA(A,E,I)
	RETURN
	END


	SUBROUTINE GETEFA(A,E,I)
C	COMMON EFF ADR CALCULATOR.
C	OUTPUT: A=EFF ADR.
C	E=0-OK; NOT 0-ERROR.
C	INPUT: I=1-SOURCE
C	=2-DEST.
	IMPLICIT INTEGER (A-Z)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
      COMMON/GEN3/SOUR,DEST,SD,DD,SM,DM,SREG,DREG
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)
	COMMON/LPOVAD/LPOVAD,LPOVFL,TRAF,WAITF



1	E=0
C	GET SOURCE OR DEST PARAMETERS.
	BB=SM
	C=SD
	D=SREG
	IF(I.EQ.1)GOTO 8
	BB=DM
	C=DD
	D=DREG
C	TEST FOR REGISTER MODE.
8	IF(BB.EQ.0)GOTO 2
C	TEST FOR FULL INDEX MODE.
	IF(BB.EQ.3)GOTO 3

C	AUTOINDEX MODES.
	AX=2
	IF( D.LT.6 .AND.SG.EQ.1.AND.C.EQ.0)AX=1
	IF(BB.EQ.2)AX=-AX
	CALL GREG(D,T1)
C	TEST FOR SP OVERFLOW.
	IF(D.EQ.6.AND.AX.EQ.-2.AND.T1.LE.LPOVAD)LPOVFL=1
	IF(AX)4,5,5
4	T1=T1+AX
	A=T1
	GOTO 6
5	A=T1
	T1=T1+AX
6	CALL PREG(D,T1)
	GOTO 7
C	REGISTER.
2	IF(C.EQ.0)RETURN
	CALL GREG(D,A)
	RETURN
C	FULL INDEX.
3	T1=PC
	PC=PC+2
	CALL LAND(T1,MAL)
	CALL LAND(PC,MAL)
	CALL GREG(D,T2)
	CALL FMW(T1,T3,E)
	IF(E.NE.0)RETURN
	A=T2+T3
7	CALL LAND(A,MAL)
C	TEST FOR DEFERRED.
	IF(C.EQ.0)RETURN
	CALL ODD(A,E)
	IF(E.NE.0)RETURN
	T1=A
	CALL FMW(T1,A,E)
	RETURN
	END

	SUBROUTINE ADD(A,BB,C,D,E)
C	DO AN ADD.
C	INPUT: A=OPERAND.
C	BB=OPERAND.
C	OUTPUT: C=A+BB
C	D=CARRY.
C	E=OVERFLOW.
	IMPLICIT INTEGER (A-Z)
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION


C	GET BYTE OR WORD MASKS.
1	T1=MLC
	IF(SG.EQ.0)T1=MALC
	T2=T1-1
	T3=T1/2

	CALL LAND(A,T2)
	CALL LAND(BB,T2)
	T4=T3
	CALL LAND(T4,A)
	T5=T3
	CALL LAND(T5,BB)
	C=A+BB
	T6=T3
	CALL LAND(T6,C)
	D=T1
	CALL LAND(D,C)
	E=0
	CALL LXOR(T4,T5)
	IF(T4.EQ.0.AND.T6.NE.T5)E=1
	CALL LAND(C,T2)
	RETURN
	END
	SUBROUTINE ODD(A,E)
C	TEST FOR ODD NUMBER.
C	INPUT: A=NUMBER.
C	OUTPUT: E=LOW ORDER BIT(ODD/EVEN BIT)
	IMPLICIT INTEGER (A-Z)


1	E=A
	CALL LAND(E,1)
	RETURN
	END

	SUBROUTINE PUSHLP(A,E)
C	PUSH A WORD ONTO SP STACK.
C	INPUT: A=VALUE TO PUSH.
C	OUTPUT: E=0-OK; NOT 0-ERROR.
	IMPLICIT INTEGER (A-Z)
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION
	COMMON/LPOVAD/LPOVAD,LPOVFL,TRAF,WAITF



1	LP=LP-2
	CALL LAND(LP,MAL)
	CALL ODD(LP,E)
	CALL SMW(LP,A,F)
	E=E+F
C	CHECK FOR SP OVERFLOW.
	IF(LP.LT.LPOVAD)LPOVFL=1
	RETURN
	END

	SUBROUTINE POPLP(A,E)
C	POP A WORD FROM SP STACK.
C	OUTPUT: A=VALUE.
C	E=0-OK; NOT ZERO-ERROR.
	IMPLICIT INTEGER (A-Z)
      COMMON/SCRATCH/REGISTER(9),SAV(9)
      EQUIVALENCE (LP,REGISTER(8)),(PC,REGISTER(9)),(ST,REGISTER(1))
      EQUIVALENCE (ST,STATUS)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION


1	CALL ODD(LP,E)
	CALL FMW(LP,A,F)
	E=E+F
	LP=LP+2
	CALL LAND(LP,MAL)
	RETURN
	END

	SUBROUTINE SUB(A,BB,C,D,E)
C	DO A SUBTRACT.
C	INPUT: A,BB=OPERANDS.
C	OUTPUT: C=BB-A
C	D=CARRY.
C	E=OVERFLOW.
	IMPLICIT INTEGER(A-Z)
      COMMON/GEN1/ IC,OP,IR,IOLINK,STOP(8),STOPC(8),CAR,RESULT,BW,CAD,
     1    BRKN,DEV,FIL,FILN,IRET,NOTYO,NOTYI,SG,SGA,SUBOPA,
     2    TYEQTY,ADSTOP,ADSTCL,ADSTFL,ADSTAD,TR1,TR2,TR3,TIME,TIMES,
     3    TTYSRC,SERMSK,SERLOW,SERHI,TYOERR,TDEV,TFIL,GROUP,GROUPA,OVR
      EQUIVALENCE(TI,T1)
      COMMON/CONST/MH,ML,MAL,MALC,MLC,M7,M8,SCRBEG,SCREND,C2T7,C2T15,
     1    TYO,CON,TYI,BIN,TTYNAM,PTRNAM,DSKNAM,TTOFIL,TTIFIL,
     2    NUMINW,CR,LF,TAB,CHRLEN,WRDLEN,B,DOL,BLANK,EQUALS,COMMA,
     3    WM0,WM1,WM2,WM3,WM4,WM5,WM6,WM7,WM8,WM9,WM10,WM11,WM12,
     4    WM13,WM14,WM15,SL8,APC,ACC,ADR0,
     5    TSTION

1	T1=C2T7
	IF(SG.EQ.0)T1=C2T15
	T4=A
	CALL LXOR(T4,MAL)
	T2=T4
	T3=BB
	CALL LAND(T2,T1)
	CALL LAND(T3,T1)
	CALL ADD(T4,BB,T7,T5,T6)
	CALL ADD(1,T7,C,T8,T6)
	T5=T5+T8
	D=0
	IF(T5.EQ.0)D=1
	CALL LXOR(T2,T3)
	T4=C
	CALL LAND(T4,T1)
	E=0
	IF(T2.EQ.0.AND.T3.NE.T4)E=1
	RETURN
	END