	SUBROUTINE CURSOR(X,Y,KEY)
	BYTE KEY
C
C	DISPLAY AND READ THE GRAPHICS CURSOR AND RETURN ITS POSITION
C	IN USER COORDINATES.
C
	LOGICAL*1 LOGX, LOGY
	COMMON /PLTCOM/ UX0, UDX, UY0, UDY, LOGX, LOGY
	COMMON /PLTSIZ/ XVSTRT, YVSTRT, XVLEN, YVLEN
C
C	GET CURSOR POSITION IN VIRTUAL COORDINATES.
C
	CALL GSGIN(X,Y,KEY,IERR)
	IF (IERR .GE. 0) GO TO 50
	X = XVSTRT
	Y = YVSTRT
50	X = (X-XVSTRT)*UDX/XVLEN + UX0
	IF (LOGX) X = 10.0**X
	Y = (Y-YVSTRT)*UDY/YVLEN + UY0
	IF (LOGY) Y = 10.0**Y
	RETURN
	END
