      SUBROUTINE S4(U,V)
C
C-----THIS ROUTINE RETURNS THE REAL VALUES OF THE CROSS
C     ON THE CRT DISPLAY  TO THE MAINLINE PROGRAM.
C
      CHARACTER*60F1(1),G1(1),F2(1)
      LOGICAL Q(10)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
      COMMON/AR/BRAY(4,600),STRESS(200,4)
      COMMON/SIHI/IVECT(1800)
      F1(1)='(''X COORD.= '',F10.3)'
      G1(1)='(''Y COORD.= '',F10.3)'
      F2(1)='(''SUBR. S4,..PUSH BUTTON 1 TO RETURN OR CONTINUE.'')'
C
C.....PUSH BUTTON (1), RETURNS VALUES OF (U,V)
C     TO MAINLINE PROGRAM.
      DO 1 I=1,10
    1 Q(I)=.FALSE.
      WRITE(7)(Q(I),I=1,10)
      CALL TEXT(2,20,0,0550,7,1,F2)
C
C.....PLACE CROSS AT PREVIOUS VALUE. IF (0,0) 
C     CROSS APPEARS AT CENTRE (512,512).
      SX=1024./(XMAX-XMIN)
      SY=1024./(YMAX-YMIN)
      IF(U.LT.0.55)U=XMIN
      IF(V.LT.0.55)V=YMIN
      X=(U-XMIN)*SX
      Y=(V-YMIN)*SY
C.....SET THE ABSOLUTE INTEGER VALUE FOR CROSS.
      I=IFIX(X)
      J=IFIX(Y)
C-----THE REAL X,Y POSITIONS OF THE CROSS ARE SHOWN
C     ON THE CRT AS THE PEN MOVES CROSS TO NEW POS.
C
    9 CONTINUE
      CALL CROSS(.TRUE.,I,J)
C
C-----ITAG VALUES OF 21,22 ARE LOCAL TO S4.
      CALL TEXT(3,21)
      CALL TEXT(3,22)
      U=FLOAT(I)
      V=FLOAT(J)
      SX=(XMAX-XMIN)/1024.
      SY=(YMAX-YMIN)/1024.
      U=U*SX+XMIN
      V=V*SY+YMIN
      CALL CROSS(.FALSE.,I,J)
      CALL TEXT(2,21,10,50,7,1,F1,U)
      CALL TEXT(2,22,10,10,7,1,G1,V)
      READ(7)Q(1)
      IF(Q(1))GO TO 22
      GO TO 9
   22 CONTINUE
      CALL TEXT(3,22)
      CALL TEXT(3,21)
      CALL TEXT(3,22)
      RETURN
      END
