h63823
s 00075/00000/00000
d D 1.1 83/03/23 16:16:48 bog 1 0
c date and time created 83/03/23 16:16:48 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 EmGTrm (Ch,X,Y)				    #
#			Input	Ch:	Character in [NUL..DEL,EMPTY])	    #
#				X,Y:	Integer coordinates in XYSPACE	    #
#		    Terminate Graphic Input, maybe with Ch		    #
#									    #
#	Called By:							    #
#		Subroutine EmPoll ()					    #
#		    4012/4014 Emulator Main Polling Loop		    #
#									    #
#		Subroutine EmCntl (Ch)					    #
#			Input	Ch:	Character in [NUL..US]		    #
#		    Emulate all control characters.  LCE may be set.	    #
#									    #
#	Routines Called:						    #
#		Subroutine EmOCom (Ch)					    #
#			Output	Ch:	Character in [NUL..DEL,BREAK])	    #
#		    Send Ch out the communications port			    #
#									    #
#############################################################################
 
Subroutine EmGTrm(Ch,GinX,GinY)
CHARACTER Ch
INTEGER GinX,GinY
 
INTEGER LocalX,LocalY
 
BEGINCOMMON
COMMON(BEAMSTATE)
COMMON(STRAPS)
ENDCOMMON
 
LocalX = X4010(GinX)
LocalY = Y4010(GinY)
 
LocalX = ISHIFT(LocalX,-2)
LocalY = ISHIFT(LocalY,-2)
 
Bypass = TRUE
 
If ((Ch >= NUL) & (Ch <= DEL)) {		# Valid Ascii
    Call EmOCom(Ch)
    }
 
Call EmOCom(32+ISHIFT(LocalX,-5))
Call EmOCom(32+IAND(LocalX,31))
Call EmOCom(32+ISHIFT(LocalY,-5))
Call EmOCom(32+IAND(LocalY,31))
 
If (GinTrm != NOGINTERM) {
    Call EmOCom(CR)
    If (GinTrm == CREOTGINTERM) {
	Call EmOCom(EOT)
	}
    }
 
If (Mode == GIN) {
    Margn2 = FALSE
    Call EmAlfM
    }
 
Return
End
E 1
