	PROGRAM VTEST1
C
C	THIS PROGRAM WRITES FOUR ARRAYS, ONE OF EACH DATA TYPE,
C	THEN READS THEM BACK AND COMPARES WITH WHAT WAS WRITEN.
C	NEXT, IT DOES A REAL ARRAY OF SQUARE ROOTS AND THEN
C	A DOUBLE PRECISION ARRAY OF SQUARES.
C	THE ACCESSES AND FAULTS ARE PRINTED AT END OF EACH GROUP.
C	THEN THE HIT RATIO FOR THE ENTIRE PROGRAM IS PRINTED.
C	THE HIT RATIO WILL ALWAYS BE HIGH BECAUSE OF THE
C	SEQUENTIAL NATURE OF THIS PARTICULAR PROGRAM.
C
	BYTE    BYTE,B
	INTEGER INTGER
	REAL*4  REAL,R
	REAL*8  DOUBLE,D
C
	VIRTUAL	BYTE(1000), INTGER(1000), REAL(1000), DOUBLE(1000)
C
	COMMON /VCOUNT/ IACCS0,IACCS1,IFALT0,IFALT1
C
	IACCS0=0
	IACCS1=0
	IFALT0=0
	IFALT1=0
	DO 10 I=1,1000
	B=I
   10	BYTE(I)=B
	DO 20 I=1,1000
   20	INTGER(I)=I
	DO 30 I=1,1000
	R=I
   30	REAL(I)=R
	DO 40 I=1,1000
	D=I
   40	DOUBLE(I)=D
	TYPE 200, IACCS0,IFALT0
C
	DO 110 I=1,1000
	B=I
	IF (BYTE(I) .NE. B)  TYPE 210, I,B
  110	CONTINUE
	DO 120 I=1,1000
	IF (INTGER(I) .NE. I)  TYPE 220, I,INTGER(I)
  120	CONTINUE
	DO 130 I=1,1000
	R=I
	IF (REAL(I) .NE. R)  TYPE 230, I,R
  130	CONTINUE
	DO 140 I=1,1000
	D=DOUBLE(I)
	IF (DOUBLE(I) .NE. D)  TYPE 240, I,D
  140	CONTINUE
	TYPE 200, IACCS0,IFALT0
C
	DO 150 I=1,1000
	R=I
	REAL(I)=SQRT(R)
  150	CONTINUE
	DO 160 I=1,1000
	D=I
	DOUBLE(I)=D*D
  160	CONTINUE
	TYPE 200, IACCS0,IFALT0
C
	DO 170 I=1,1000
	R=I
	IF (REAL(I) .NE. SQRT(R))  TYPE 270, I,R
  170	CONTINUE
	DO 180 I=1,1000
	D=I
	IF (DOUBLE(I) .NE. D*D)  TYPE 280, I,D
  180	CONTINUE
	TYPE 200, IACCS0,IFALT0
C
	ACC=IACCS0
	FALT=IFALT0
	HIT=100.0*(1.0-(FALT/ACC))
	TYPE 205, HIT
C
  200	FORMAT(' ACCESSES =',I5,'   FAULTS =',I5/)
  205	FORMAT(' HIT RATIO FOR THIS PROGRAM = ',F8.2,'%'/)
  210	FORMAT(' BYTE TEST ',2I5)
  220	FORMAT(' INTEGER TEST ',2I5)
  230	FORMAT(' REAL TEST ',I5,F8.0)
  240	FORMAT(' DOUBLE TEST ',I5,D8.0)
  270	FORMAT(' SQRT TEST ',I5,F8.0)
  280	FORMAT(' SQUARE TEST ',I5,D8.0)
C
	END
