	SUBROUTINE CSM11
C	DOES THE COMPUTATION REQUIRED
C	   TO EVALUATE THE DERIVATIVE VECTOR
C	   FOR ONE-HALF TIME STEP
	INTEGER TEST5,ORDER(76)
	LOGICAL RSAC
	DIMENSION INTG(25),C(76),F(3,11),Y(25),DYDT(25)
	DIMENSION MTRX1(75),MTRX2(75),MTRX3(75),MTRX4(75),MTRX5(75)
	DIMENSION PAR1(75),PAR2(75),PAR3(75)
	COMMON REALS(395),INTS(547)
	EQUIVALENCE (INTS(1),MTRX1(1)),(INTS(76),MTRX2(1))
	EQUIVALENCE (INTS(151),MTRX3(1)),(INTS(226),MTRX4(1))
	EQUIVALENCE (INTS(301),MTRX5(1))
	EQUIVALENCE (INTS(396),INTG(1)),(INTS(449),ORDER(1))
	EQUIVALENCE (INTS(529),TEST5),(INTS(534),NLIST)
	EQUIVALENCE (INTS(540),NCON),(INTS(542),NEQ),(INTS(546),IR)
	EQUIVALENCE (REALS(2),C(1)),(REALS(78),DT),(REALS(79),DTS2)
	EQUIVALENCE (REALS(81),PAR1(1)),(REALS(156),PAR2(1))
	EQUIVALENCE (REALS(231),PAR3(1)),(REALS(306),F(1,1))
	EQUIVALENCE (REALS(341),Y(1)),(REALS(366),DYDT(1))
C
	DO 10 I=1,NEQ
	J=INTG(I)
10	C(J)=Y(I)
	NEXT=NCON
20	I=ORDER(NEXT)
	P1=PAR1(I)
	P2=PAR2(I)
	P3=PAR3(I)
	J=MTRX2(I)
	K=MTRX3(I)
	L=MTRX4(I)
	IF (J.GE.0.AND.J.LE.76) CJ=C(J)
	IF (K.GE.0.AND.K.LE.76) CK=C(K)
	IF (L.GE.0.AND.L.LE.76) CL=C(L)
	M=MTRX1(I)
	IF (M.LE.10) GO TO (750,30,750,40,750,80,110,120,130,140),M
	M=M-10
	IF (M.LE.10) GO TO (650,150,180,190,210,220,230,240,270,290),M
	M=M-10
	GO TO (340,350,360,370,380,390,410,510,520),M
C	B - BANG-BANG
30	CI=SIGN(1.0,CJ)
	GO TO 600
C	D - DEAD SPACE
40	IF (CJ) 50,200,60
50	DIFF=CJ-P2
	IF (DIFF) 70,200,200
60	DIFF=CJ-P1
	IF (DIFF) 200,200,70
70	CI=DIFF
	GO TO 600
C	F - FUNCTION GENERATOR
80	NF=MTRX5(I)
	P3=P1-P2
	IF (P3.LE.0.0) GO TO 750
	P1=10.0*(CJ-P2)/P3
	IF (P1.GT.0.0) GO TO 90
	CI=F(NF,1)
	GO TO 600
90	NSECT=P1
	IF (NSECT.LT.10) GO TO 100
	CI=F(NF,11)
	GO TO 600
100	P2=NSECT
	P3=P1-P2
	P1=F(NF,NSECT+1)
	P2=F(NF,NSECT+2)
	CI=P1+P3*(P2-P1)
	GO TO 600
C	G - GAIN
110	CI=P1*CJ
	GO TO 600
C	H - HALF POWER (SQUARE ROOT)
120	IF (CJ.LT.0.0) GO TO 750
	CI=SQRT(CJ)
	GO TO 600
C	I - INTEGRATOR (MAXIMUM 25 ELEMENTS)
130	M=MTRX5(I)
	DYDT(M)=CJ+P2*CK+P3*CL
	GO TO 650
C	J - JITTER (RANDOM NUMBER GENERATOR BETWEEN + AND - 1)
140	IR=259*IR
	CI=FLOAT(IR)/131072.0
	GO TO 600
C	K - CONSTANT
C	L - LIMITER
150	IF (CJ.LT.P1) GO TO 160
	CI=P1
	GO TO 600
160	IF (CJ.GT.P2) GO TO 280
170	CI=P2
	GO TO 600
C	M - MAGNITUDE
180	CI=ABS(CJ)
	GO TO 600
C	N - NEGATIVE CLIPPER
190	IF (CJ.GT.0.0) GO TO 280
200	CI=0.0
	GO TO 600
C	O - OFFSET
210	CI=CJ+P1
	GO TO 600
C	P - POSITIVE CLIPPER
220	IF (CJ) 280,200,200
C	Q - QUIT
230	IF (CJ-CK) 650,650,850
C	R - RELAY
240	IF (CJ.LT.0.0) GO TO 260
250	CI=CK
	GO TO 600
260	CI=CL
	GO TO 600
C	S - SWITCH
270	M=P1
	IF (RSAC(M)) GO TO 250
280	CI=CJ
	GO TO 600
C	T -TIME PULSE GENERATOR
290	IF (TEST5-2) 300,200,330
300	MTRX5(I)=0
310	IF (CJ.LT.0.0) GO TO 200
	MTRX5(I)=1
320	PAR2(I)=-P1+DTS2+DT
	CI=1.0
	GO TO 600
330	IF (MTRX5(I).EQ.0) GO TO 310
	IF (P2.GE.0.0) GO TO 320
	PAR2(I)=P2+DT
	GO TO 200
C	U - UNIT DELAY
340	IF (TEST5.NE.1) C(I)=P2
	PAR2(I)=CJ
	GO TO 650
C	V - VACUOUS (USED IN CONJUNCTION WITH WYE ELEMENT)
350	IF (TEST5.EQ.1) MTRX5(I)=NEXT
	GO TO 650
C	W - WEIGHTED SUMMER
360	CI=CJ*P1+CK*P2+CL*P3
	GO TO 600
C	X - MULTIPLIER
370	CI=CJ*CK
	GO TO 600
C	Y - WYE(USED IN CONJUNCTION WITH VACUOUS ELEMENT)
380	IF (ABS(1.0-CK/CJ).LE.P1) GO TO 280
	IF (RSAC(0)) GO TO 800
	C(K)=(1.0-P2)*CJ+P2*CK
	NEXT=MTRX5(K)
	GO TO 20
C	Z - ZERO ORDER HOLD
390	IF (TEST5.NE.1) GO TO 400
	PAR2(I)=C(I)
	P2=C(I)
400	IF (CK.LE.0.0) GO TO 170
	PAR2(I)=CJ
	GO TO 280
C	+ - SUMMER
410	IF (J) 420,430,440
420	J=-J
	CI=-C(J)
	GO TO 450
430	CI=0.0
	GO TO 450
440	CI=CJ
450	IF (K) 460,480,470
460	K=-K
	CI=CI-C(K)
	GO TO 480
470	CI=CI+CK
480	IF (L) 490,600,500
490	L=-L
	CI=CI-C(L)
	GO TO 600
500	CI=CI+CL
	GO TO 600
C	- - SIGN INVERTER
510	CI=-CJ
	GO TO 600
C	/ - DIVIDER
520	IF (CK.EQ.0.0) GO TO 750
	CI=CJ/CK
C	1 - SPECIAL ELEMENT NUMBER 1
C	2 - SPECIAL ELEMENT NUMBER 2
C	3 - SPECIAL ELEMENT NUMBER 3
C	4 - SPECIAL ELEMENT NUMBER 4
C	5 - SPECIAL ELEMENT NUMBER 5
C	HAVE ALL BEEN DELETED
600	C(I)=CI
650	IF (NEXT-NLIST) 700,900,750
700	NEXT=NEXT+1
	GO TO 20
C	PROCESSING ERROR
750	TEST5=4
	RETURN
C	RUN TERMINATED BY SWITCH 0
800	TEST5=5
	RETURN
C	RUN TERMINATED BY QUIT ELEMENT
850	TEST5=6
900	RETURN
	END
