Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap4_198111 - decus/20-0125/getptr.for
There is 1 other file named getptr.for in the archive. Click here to see a list.
	SUBROUTINE GETPTR(DISNUM, X, Y)
C***********************************************************
C
C  THIS ROUTINE IS USED TO RETURN THE USER CO-ORDINATES
C  OF A POINTER.
C
C  POSSIBLE ERRORS:
C	?REQUESTING INVALID POINTER (I.E. BAD USER CALL)
C	?INVALID REPLY TO A POINTER REQUEST
C
C  ROUTINES CALLED:
C	SEND   - SENDS A COMMAND TO THE GT40
C	GET    - RECEIVES A STATUS TRANSMISSION FROM THE GT40
C	USERX  - CONVERTS RASTER IX TO USER X
C	USERY  - CONVERTS RASTER IY TO USER Y
C	ERROR  - ERROR LOGGING ROUTINE
C
C***********************************************************
	INTEGER DISNUM, DNUM, STATUS

100	IF(DISNUM.NE.4 .AND. DISNUM.NE.5) GO TO 200
	CALL SEND(DISNUM, DISNUM, 0, 0)
	CALL GET(STATUS, IX, IY, DNUM)
	IF(STATUS .EQ. "66) GO TO 100
	IF(STATUS .NE. 0) GO TO 300
	X = USERX(IX)
	Y = USERY(IY)
	RETURN

200	CALL ERROR('?TRYING TO REQUEST INVALID POINTER =',DISNUM)
	RETURN

300	CALL ERROR('?INVALID REPLY TO POINTER REQUEST, STATUS=',STATUS)
	RETURN
	END