	SUBROUTINE CSM10
C	CONTROLS THE COMPUTATION AND OUTPUT
	INTEGER TEST5,ORDER(76)
	LOGICAL RSAC
	DIMENSION INTG(25),C(76),PAR1(75),Y(25),DYDT(25),YK(25)
	COMMON REALS(395),INTS(547)
	EQUIVALENCE (INTS(388),KEY9)
	EQUIVALENCE (INTS(396),INTG(1)),(INTS(449),ORDER(1))
	EQUIVALENCE (INTS(529),TEST5),(INTS(534),NLIST)
	EQUIVALENCE (INTS(542),NEQ),(INTS(546),IR)
	EQUIVALENCE (REALS(2),C(1)),(REALS(77),T),(REALS(78),DT)
	EQUIVALENCE (REALS(79),DTS2),(REALS(80),TTOT)
	EQUIVALENCE (REALS(81),PAR1(1)),(REALS(341),Y(1))
	EQUIVALENCE (REALS(366),DYDT(1)),(REALS(391),TSAMP)
C	NORMAL SETUP
	DO 10 NEXT=2,NLIST
	I=ORDER(NEXT)
10	C(I)=PAR1(I)
	T=0.0
	TZERO=0.0
	DO 20 NEXT=1,NEQ
	I=INTG(NEXT)
20	Y(NEXT)=C(I)
	IR=7243
	EPSLN=DTS2/(TSAMP*2.0)
	TEST5=1
	N=1
	NN=T/TSAMP+1.0
	CALL CSM11
C
C	START EXECUTION
30	IF (RSAC(0)) GO TO 110
40	GO TO (50,80,100,110,110,110),TEST5
50	CALL CSM8
C	FIRST HALF-STEP
60	TEST5=2
	DO 70 NEXT=1,NEQ
	YK(NEXT)=Y(NEXT)
70	Y(NEXT)=Y(NEXT)+DTS2*DYDT(NEXT)
	AXX=N
	TNEXT=AXX*DT+TZERO
	T=TNEXT-DTS2
	CALL CSM11
	GO TO 40
C	SECOND HALF STEP
80	TEST5=3
	DO 90 NEXT=1,NEQ
90	Y(NEXT)=YK(NEXT)+DT*DYDT(NEXT)
	T=TNEXT
	N=N+1
	CALL CSM11
	GO TO 30
C	TIME TO PRINT
100	M=T/TSAMP+EPSLN
	IF (M.LT.NN) GO TO 120
110	CALL CSM8
	NN=M+1
C	IS RUN FINISHED
120	IF (TEST5.GT.3) GO TO 150
130	IF (RSAC(0)) GO TO 140
	IF (T-TTOT+DTS2) 60,150,150
140	TEST5=5
150	IF (KEY9.EQ.1) WRITE(8,160)
160	FORMAT(//1H1)
	RETURN
	END
