From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 11-JUL-1992 23:52:01.35
To:	info-vax@kl.sri.com
CC:	
Subj:	Re: Foreign terminals on VMS

In article <1992Jul9.232758.20237@av8r.uucp>, mrandall@av8r.uucp (Mark Randall) writes:
| 
| 	I'm looking to use IBM 3151 terminals on VMS (yes, blasphemy,
| I know). Could anyone endow on me the knowledge of
| 
| 		**** The Right Way (TM) ****
| 
| to make VMS recognize a foreign terminal? Is TFF the right way to go?
| Or is there a way to make VMS recognize the terminal in a SET
| TERM/INQUIRE so that a SHOW TERM will put a pretty little message next
| to terminal type?

The "right" way is to use the SMG facility to define foreign terminals.
Unfortunately, the vast majority of screen-oriented VMS utilities DON'T
use SMG, but have hardcoded dependence on the terminal being
a DEC VTxxx.  A few do use SMG, however (the symbolic debugger,
SHOW CLUSTER.)

Anyway, here's how you do it (documented in sec. 5.3 of the 
SMG$ manual.)

1. Build a file called TERMTABLE.TXT.  Put your foreign terminal definition
   into this file.
2. Compile with MCR SMGBLDTRM.  This produces a file called 
   TERMTABLE.EXE
3. Define the LNM TERM$TABLOC to point to your TERMTABLE.EXE.
4. Now you can do a SET TERM/DEVICE=ibm3151, and if you 
   do a SHOW TERM, you'll see "Device_Type: IBM3151" right up
   at the top (oh boy!)

Appended is a TERMTABLE.TXT entry I wrote up for an IBM3162,
which barely works, but may be enough to get you started.

Good luck,

Aaron

Aaron Leonard (AL104), <Leonard@Arizona.EDU>
University of Arizona Network Operations, Tucson AZ 85721
|>   If it ain't broke, break it.

---

! IBM 3162 in "native mode"
! from IBM 3162 ASCII Display Station Programmer's Guide and Reference 
! Information
!
! Last modified: 20-Apr-1988/al
!
! 20-Apr-1988	al	First version
!
NAME = 'IBM3162'
    BOOLEAN
    	advanced_video = 0,
    	ansi_crt = 0,
    	auto_margin = 0,
    	backspace = 1,
    	dec_crt = 0,
    	dec_crt = 0,
    	edit = 0,
    	eight_bit = 0,
    	fulldup = 1,
    	lowercase = 1,
    	no_scroll = 0,
    	overstrike = 0,
    	physical_ff = 0,
		physical_tabs = 0,
    	regis = 0,
    	scope = 1
    NUMERIC
    	columns = 80,
    	number_fn_keys = 24,
    	rows = 24,
    	wide_screen_columns = 132
    STRING
    	! the 3162's "Extended Set Cursor Address Command" is depraved.
    	! Try 3101-style addressing, which only can reach to col. 95.
    	! a la VT52
    	set_cursor_abs = "$Y(%1+31)(%2+31)",
    	cursor_down = "$B",		cursor_up = "$A",
    	cursor_right = "$C",		cursor_left = "$D",
    	home = "$H",			erase_whole_display = "$L",
    	erase_to_end_line = "$I",	erase_to_end_display = "$J",
    	key_down_arrow = "$B",		key_up_arrow = "$A",
    	key_right_arrow = "$C",		key_left_arrow = "$D",
    	key_f1 = "$a",	key_f2 = "$b",	key_f3 = "$c",	key_f4 = "$d",
    	key_f5 = "$e",	key_f6 = "$f",	key_f7 = "$g",	key_f8 = "$h",
    	key_f9 = "$i",	key_f10 = "$j",	key_f11 = "$k",	key_f12 = "$l",
    	key_f13 = "$_!a",	key_f14 = "$_!b",	key_f15 = "$_!c",
    	key_f16 = "$_!d",	key_f17 = "$_!e",	key_f18 = "$_!f",
    	key_f19 = "$_!g",	key_f20 = "$_!h"

    	! there's more stuff I could try, but this should be close enough
    	! for now ...

END

