h32647
s 00099/00000/00000
d D 1.1 83/03/23 16:17:29 bog 1 0
c date and time created 83/03/23 16:17:29 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 EmInit ()					    #
#		    Environment initializer				    #
#									    #
#	Called By:							    #
#		Program Em4010						    #
#		    Tektronix 4010 Series Terminal Emulator		    #
#									    #
#	Routines Called:						    #
#		Subroutine EmRest ()					    #
#		    Reset Emulator as if just powered up		    #
#									    #
#############################################################################
 
Subroutine EmInit
 
INTEGER IParm(6)
LOGICAL LParm(6)
INTEGER RBaud(BAUDDIM),TBaud(BAUDDIM)
INTEGER DBit(DATABITDIM),SBit(STOPBITDIM)
INTEGER Error
CHARACTER C
CHARACTER MenStr(265)
 
INTEGER EmMStr			# Put out a menu-format string; return length
External EmMStr
 
BEGINCOMMON
COMMON(COMMSTATE)
COMMON(COMMCAPABILITY)
COMMON(SPECIALKEYS)
COMMON(CONFIG)		# Note that `MENUMACHINE' is precluded by the use
ENDCOMMON		#  of MenStr in the strings below
 
define(`MStringPc',1)dnl
define(`MSBytePc',1)dnl
 
MSByte(ESC)MSByte(FF)							#  2
MString(`--------------------------------------------------')MCrLf	# 52
MString(`GSS-ACCESS10  Terminal Emulator  'VDateTime)
		 ifelse(len(VDateTime),10,`MString(` ')MSpDump')
				            MString(`  vb.1')MCrLf      # 52
MString(`Serial No. G104-0000-654321    All Rights Reserved')MCrLf	# 52
MString(`Copyright ')MSByte(LEFTPAREN)
           MString(`c')MSByte(RIGHTPAREN)
             MString(` 'substr(VDateTime,eval(len(VDateTime)-4)))
                  MString(`  Graphic Software Systems')
                                MSByte(COMMA)MString(` Inc.')MCrLf	# 52
MString(`--------------------------------------------------')MCrLf	# 52
MCrLf`'MEos								#  3
 
define(`MStringPc',1)dnl
define(`MSBytePc',1)dnl
 
# Enquire Comm capabilities & set local Comm Capability Common
IParm(1) = BAUDDIM
IParm(2) = BAUDDIM
IParm(3) = DATABITDIM
IParm(4) = STOPBITDIM
Call GHInqC(IParm,LParm,RBaud,TBaud,DBit,SBit,Error)
define(MOVEARRAY,
`dnl
For (C = 1; C <= $1; C = C+1) {
    $2(C) = $3(C)
    }
')dnl
MOVEARRAY(6,CCmCp,IParm)		# Integer communications capabilities
MOVEARRAY(6,LCmCp,LParm)		# Logical communications capabilities
MOVEARRAY(RBdCpL,RxBdCp,RBaud)		# Receive baud rates
MOVEARRAY(TBdCpL,TxBdCp,TBaud)		# Transmit baud rates
MOVEARRAY(DtBCpL,DtBtCp,DBit)		# Number of data bits/char
MOVEARRAY(StBCpL,StBtCp,SBit)		# Number of stop bits/char
 
If (TBkTCp) {			# If break time controllable
  CmParS(MBreakMs) = 200	#  set to 200 milliseconds
  }
 
Going = FALSE			# Must reconfigure
CfgPtr = 1			# Reread configuration text
Edting = FALSE			# Not editing a string
ComChg = TRUE			# So that menumachine will open comm
Call EmStrp			# Do configuration menu
 
Error = EmMStr(MenStr(1))	# Show signon message
 
Return
End
E 1
