C****************************************************************
C* 								*
C*								*
C*	DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY *
C*	EITHER FOR THE CREATION OR FOR THE CLINICAL EFFICACY	*
C*	OF THIS PROGRAM. USERS MUST ASSUME FULL RESPONSIBILITY	*
C*	FOR ANY RESULTS OR DIAGNOSES OBTAINED FROM THE USE	*
C*	OF THIS PROGRAM. QUESTIONS ON THE EXECUTION OF THIS	*
C*	PROGRAM MUST BE REFERRED BACK TO THE ORIGINAL AUTHOR.	*
C*								*
C* AUTHOR:	SALLY FORSTER					*
C*		C/O DEPARTMENT OF NUCLEAR MEDICINE		*
C*		GUY'S HOSPITAL				*
C*		LONDON, ENGLAND					*
C*								*
C*		TEL: 01-407-7600 EXT 2583/4			*
C*								*
C****************************************************************
	SUBROUTINE VMAN(IP,J,IE)
C*****DOES ARITHMETIC MANIPULATIONS ON CSR
C*****J=1..ADD
C*****J=2..SUBTRACT
C*****J=3..MULTIPLY
C*****J=4..DIVIDE
C*****J=5..SET
	IMPLICIT LOGICAL*1(A)
	IMPLICIT INTEGER*2(D-Z)
	COMMON /INPARA/CPAR(10)
	COMMON /CH/F(4),CSR(20)
	IE=12
	IF(J.EQ.5)GOTO 50
	IF(IP.NE.3)GOTO 600
	K=-INT(CPAR(3))
	IF(K.LE.0)GOTO 600
	GOTO (10,20,30,40),J
10	CSR(K)=CREPAR(1)+CREPAR(2)
	RETURN
20	CSR(K)=CREPAR(1)-CREPAR(2)
	RETURN
30	CSR(K)=CREPAR(1)*CREPAR(2)
	RETURN
40	CS=CREPAR(2)
	IF(CS.LT.0.005)GOTO 500
	CSR(K)=CREPAR(1)/CS
	RETURN
50	IF(IP.NE.2)GOTO 600
	K=-INT(CPAR(1))
	IF(K.LE.0)GOTO 600
	CSR(K)=CREPAR(2)
	RETURN
500	WRITE(7,550)
550	FORMAT(1X,'ZERO DIV')
600	IE=4
	RETURN
	END
