h55063
s 00064/00000/00000
d D 1.1 83/03/23 16:16:34 bog 1 0
c date and time created 83/03/23 16:16:34 by bog
e
u
4
U
t
T
I 1
#############################################################################
#									    #
#	This material is confidential and is furnished under		    #
#	a written license agreement.  It may not be used,		    #
#	copied or disclosed to others except in accordance		    #
#	with the terms of that agreement.				    #
#									    #
#	Copyright (C) 1982 Graphic Software Systems, Inc.		    #
#	All rights reserved.						    #
#									    #
#############################################################################
#									    #
#	Function:  							    #
#		Subroutine EmGBeg ()					    #
#		    Enter Graphic Input mode				    #
#									    #
#	Called By:							    #
#		Subroutine EmCntl (Ch)					    #
#			Input	Ch:	Character in [NUL..US]		    #
#		    Emulate all control characters.  LCE may be set.	    #
#									    #
#	Routines Called:						    #
#									    #
#############################################################################
 
Subroutine EmGBeg
 
CHARACTER Ch			# For termination
 
BEGINCOMMON
COMMON(BEAMSTATE)
COMMON(DRIVER)
COMMON(INITIALIZATION)
ENDCOMMON
 
#Start Gin
 
Mode = GIN
Bypass = TRUE
 
If (DLocDs > 0) {		# Locator devices available
  DdCntl(1) = 28		# Request locator
  DdCntl(2) = 1			# 1 x,y pair
  DdIntI(1) = 1			# Default locator device
  DdPtsI(1) = X			# Initially at X, Y
  DdPtsI(2) = Y
  Call GZDdOp(DdCntl,DdIntI,DdPtsI,DdIntO,DdPtsO)# Get Gin
  }
Else {				# No Gin device avail; fake it
  DdCntl(5) = 0			#  with unsuccessful Gin
  }
If (DdCntl(5) == 0) {		# Gin unsuccessful?
  DdPtsO(1) = X			# Return current location
  DdPtsO(2) = Y
  DdIntO(1) = SPACE		#  with space
  }
X = DdPtsO(1)
Y = DdPtsO(2)
Ch = DdIntO(1)
MOVE(X,Y)			# Beam is left where crosshair was
Call EmGTrm(Ch,X,Y)		# Terminate Gin here
 
Return
End
E 1
