next up previous
Next: Who's Using EMME/2? Up: EMME/2 News 10 October 1990 Previous: Bugs + Fixes

VAX Corner: Device Table Strings in SSSTART and SSEND Files

Each device table entry (file D002.DAT) contains a string that is used to initialize the terminal on which EMME/2 is run. When EMME/2 is run interactively, the terminal initialization string from the appropriate device table entry is sent to the terminal in order to set it up correctly for EMME/2. The string is limited to 32 characters which may not be sufficient for the string necessary for some terminals. (For full information on the device table file (D002.DAT) please see the EMME/2 User's Manual Chapter II, Section 2.7 and Chapter V, Section 5.)

The following solution was contributed by Bob Dean of Deschutes County Public Works Dept in Bend, Oregon, USA. This solution consists of sending part of the initialization string to the terminal using commands in an SSSTART procedure. (For more information on SSSTART (and SSEND) procedures, see the System Specific notes: EMME/2 on VAX/VMS, Section 3.2.)

The partial string in the example shown below sets up a Tektronix 4207 to use a mouse. The terminal in question is manually set up to give an "Answerback" of "T4207M" The SSSTART procedure does the following:

The partial string is constructed from a series of Tektronix commands, each contained in a symbol. Additional documentation of these commands can be found in a Tektronix manual for a terminal that allows mouse mode.

$! SSSTART.COM - invoked from EMME2.COM before running EMME/2
$! This procedure will setup the mouse on a TEK 4207 terminal for use in EMME/2
$! The answer back message on the terminal must be set to "T4207M"
$! 
$ IF F$MODE() .NES. "INTERACTIVE" THEN GOTO END
$!
$! Assign symbols
$!
$ EQ[0,8] = 5                                            !Sent by host to query terminal for answerback
$ ESC[0,8] = 27                                          !Escape character
$ CODE_TEK = "''ESC'%!0"                                 !Set terminal's host command mode to TEK
$ MOUSEMAP_YES = "''ESC'IB02344_o+_o-_o._o/431110"       !Allow mouse to be used as the GIN device
$ BUTTON_SP = "''ESC'KDI+1B0''ESC'KDI-1B0''ESC'KDI/1B0"  !Define mouse buttons as space character
$ KEYEXPAND_YES = "''ESC'KW1"                            !Allow key macros to be expanded
$ KEYMODE_TEK = "''ESC'KJ213"                            !Set TEK key to TEK mode and lock
$ SEND = "WRITE SYS$OUTPUT"                              !Send string to terminal
$!
$! Query terminal for answerback
$!
$ READ/ERROR=NOANSWER/TIME_OUT=5/PROMPT="''EQ'" SYS$COMMAND ANSWERBACK
$                                                        !The prompt is the answerback query character
$!
$! If the answerback is T4207M then set the terminal up for use with the mouse
$!
$ IF ANSWERBACK .EQS. "T4207M"
$  THEN                                                  !The terminal is a TEK 4207 with a mouse
$   SEND "''CODE_TEK'''MOUSEMAP_YES'''BUTTON_SP'''KEYEXPAND_YES'''KEYMODE_TEK'"
$                                                        !Setup terminal to use mouse
$   GOTO DONE
$ ENDIF
$NOANSWER:
$ ANSWERBACK = ""                                        !The terminal is not a TEK 4207 with a mouse
$DONE:
$!
$! Save ANSWERBACK as a global symbol so that it can be checked in SSEND.COM
$!
$ ANSWERBACK == ANSWERBACK
$!
$END:
$ EXIT

$! SSEND.COM - invoked from EMME2.COM after exiting EMME/2
$!This procedure will unmap the mouse if previously mapped
$!
$ IF F$MODE() .NES. "INTERACTIVE" THEN GOTO END
$!
$! Assign symbols
$!
$ ESC[0,8] = 27                                          !Escape character
$ CODE_TEK = "''ESC'%!0"                                 !Set terminal's host command mode to TEK
$ CODE_ANSI = "''ESC'%!1"                                !Set terminal's host command mode to ANSI
$ MOUSEMAP_NO = "''ESC'IB02123_o-_o._o/421110"           !Disallow mouse to be used as the GIN device
$ BUTTON_DEF = "''ESC'KDI+0''ESC'KDI-0''ESC'KDI/0"       !Delete previous mouse button macros
$ KEYMODE_DEC = "''ESC'KJ214"                            !Set TEK key to DEC mode and unlock
$ SEND = "WRITE SYS$OUTPUT"                              !Send string to terminal
$!
$! If the answerback is T4207M then disable the use of the mouse
$!
$   IF ANSWERBACK .EQS. "T4207M" THEN -                  !The terminal is a TEK 4207 with a mouse
$      SEND "''CODE_TEK'''MOUSEMAP_NO'''BUTTON_DEF'''KEYMODE_DEC'''CODE_ANSI'"
$                                                        !Send these sequences to terminal
$!
$END:
$ EXIT


next up previous
Next: Who's Using EMME/2? Up: EMME/2 News 10 October 1990 Previous: Bugs + Fixes


Heinz Spiess, EMME/2 Support Center, Thu Jun 6 14:22:53 MET DST 1996