h40119
s 00065/00000/00000
d D 1.1 83/03/23 16:16:59 bog 1 0
c date and time created 83/03/23 16:16:59 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:  							    #
#		Character Function EmICom (Ch)				    #
#			Output	Ch:	Character in [NUL..DEL,EMPTY]	    #
#		    Get Ch from the communications port			    #
#									    #
#	Called By:							    #
#		Subroutine EmPoll ()					    #
#		    4012/4014 Emulator Main Polling Loop		    #
#									    #
#	Routines Called:						    #
#		Subroutine GETCOMMPORT (Ch)				    #
#			Output	Ch:	Character in [NUL..DEL,EMPTY]	    #
#		    Get Ch from the communications port.  Note that	    #
#		    EMPTY is returned if different from COMMPORTEMPTY	    #
#									    #
#############################################################################
 
CHARACTER Function EmICom(Ch)
CHARACTER Ch
ifelse(
CHARACTER,INTEGER,
`
	define(`CHAR',`Ch')
',
`
	define(`CHAR',`ICh')
	INTEGER CHAR
')
INTEGER Error
 
GETCOMMPORT(CHAR,Error)			# Ignore Parity and Overrun errors
 
ifelse(
CHARACTER,INTEGER,,
`
	Ch = CHAR
')
 
If (CHAR == COMMPORTEMPTY) {
ifelse(
EMPTY,COMMPORTEMPTY,,
`
    Ch = EMPTY
')
    }
Else {
    Ch = CAND(Ch,127)			# ????
    }
 
EmICom = Ch
 
Return
End
E 1
