	SUBROUTINE GSGIN(X,Y,BCHAR,IERR)
	BYTE BCHAR
C
C	THIS DIGLIB SUBROUTINE TRIES TO GET GRAPHIC INPUT (GIN) FROM
C	THE CURRENTLY SELECTED DEVICE.   IF THE DEVICE IS NOT CAPABLE
C	OF GIN, IERR=-1.   FOR GIN DEVICES, IERR=0 AND:
C	  X	= X POSITION OF CURSOR IN ABSOLUTE SCREEN CM.
C	  Y	= Y POSITION OF CURSOR IN ABSOLUTE SCREEN CM.
C	  BCHAR	= CHARACTER STUCK AT TERMINAL TO SIGNAL CURSOR HAS
C			BEEN POSITIONED (BYTE).
C
	COMMON /GCDCHR/ DEVID, XLENCM, YLENCM, XRES, YRES,
	1   NDCLRS, IDVBTS, NFLINE, XCLIPD, YCLIPD
	COMMON /GCDPRM/ XS, YS, XT, YT, RCOS, RSIN, VXL, VXH, VYL, VYH
	DIMENSION ARRAY(3)
	BYTE SPACE
	DATA SPACE /' '/
C
C	SEE IF DEVICE SUPPORTS GIN
C
	IF ((IDVBTS .AND. 128) .EQ. 0) GO TO 900
C
C	NOW ASK FOR GIN FROM DEVICE DRIVER
C
	CALL GSDRVR(9,ARRAY,DUMMY)
C
C	CONVERT ABSOLUTE CM. COORD. TO VIRTUAL CM. COORDINATES
C
	CALL GSIRST(ARRAY(2),ARRAY(3),X,Y)
C
C	GET CHARACTER AS 7 BIT ASCII
C
	IF (ARRAY(1) .LT. 0.0 .OR. ARRAY(1) .GT. 127.0) GOTO 110
		BCHAR = ARRAY(1)
		GOTO 120
C	    ELSE
110		CONTINUE
		BCHAR = SPACE
C	ENDIF
120	CONTINUE
	IERR = 0
	RETURN
C
C	DEVICE DOESN'T SUPPORT GIN
C
900	IERR = -1
	RETURN
	END
