h62168
s 00062/00000/00000
d D 1.1 83/03/23 16:18:28 bog 1 0
c date and time created 83/03/23 16:18:28 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 EmMSCh (Ch)					    #
#			Input	Ch:	CHARACTER of Ascii text to send	    #
#		    Show Ch on device.					    #
#									    #
#	Called By:							    #
#									    #
#	Routines Called:						    #
#									    #
#############################################################################
Subroutine EmMSCh(Ch)
CHARACTER Ch
 
INTEGER ChPtr
 
BEGINCOMMON
COMMON(BEAMSTATE)
COMMON(DRIVER)
COMMON(STRAPS)
ENDCOMMON
 
Equivalence	(ChPtr,		DdCntl(4))
 
If (LCE |			# If last char was ESC
    !Native |			#  or not native character spacing
    Bypass |			#  or Bypass on
    (Mode != ALPHA) |		#  or not alpha mode
    (X > XRight) |		#  or wrap on right
    (Ch < SPACE) |		#  or control character
    (Ch == DEL)) {		#  or DEL then I cannot queue up characters
  Call EmMSDm			# So dump any queued up characters
  Call EmAsci(Ch)		#  & send the character through the emulator
  }
 Else {				# Go ahead and queue up the characters
  If (ChPtr >= 72) {		# Dump buffer if full
    Call EmMSDm
    }
  If (ChPtr == 0) {		# Set up buffer if empty
    DdCntl(1) = 8		# Text opcode
    DdCntl(2) = 1		# 1 x,y pair
    DdPtsI(1) = X
    DdPtsI(2) = Y
    }
  ChPtr = ChPtr+1		# Bump count
  DdIntI(ChPtr) = Ch		# Stuff character
  X = X+XCh			# Bump x position
  LastX = X			#  & save last position (??)
  }
Return
End
E 1
