Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0135/06/mmista.sim
There are 2 other files named mmista.sim in the archive. Click here to see a list.
00030	COMMENT* package for control of display terminals*; OPTIONS(/l/e);
00060	COMMENT* Copyright (c) Swedish National Defense Research Institute*;
00120	COMMENT COMMENT%IF SIMULATION marks places to be modified to put
00150	vista as a subclass to simulation;
00180	COMMENT COMMENT%IF MVISTA marks places to give simplified
00210	minivista for use by VIDED package;
00240	COMMENT COMMENT%IF MACRO generates MACRO-10 program code defining
00270	global variables only;
00300	COMMENT COMMENT%IF CALLMAC generates SIMULA code calling MACRO
00330	versions of some procedures;
00360	
00900	
00960	EXTERNAL CHARACTER PROCEDURE getch;
00990	EXTERNAL TEXT PROCEDURE maketext;
01110	EXTERNAL CHARACTER PROCEDURE fetchar;
01140	EXTERNAL PROCEDURE depchar, outstring, forceout;
01170	EXTERNAL PROCEDURE echo, abort, outchr;
01200	EXTERNAL INTEGER PROCEDURE trmop, gettab, checkint;
01230	EXTERNAL BOOLEAN PROCEDURE meny;
01260	EXTERNAL TEXT PROCEDURE storbokstav, scanto;
01290	EXTERNAL CLASS termty;
01350	EXTERNAL PROCEDURE vtmcur, vtsynk, vtisng;
01380	EXTERNAL PROCEDURE outche; EXTERNAL INTEGER PROCEDURE iondx;
01680	CLASS mmista;
01950	BEGIN
02070	CLASS mvistax
02250	(width, height, terminalin, terminalout, q_echoenabled,
02280	terminaltype
02490	,trmspeed);
02580	INTEGER width; ! Screen width or less;
02610	INTEGER height; ! Screen height or less;
02670	REF (infile) terminalin; ! From the terminal, usually sysin;
02700	REF (printfile) terminalout; ! To the terminal, usually sysout;
02730	BOOLEAN q_echoenabled; ! TRUE = monitor echo, FALSE = program echo;
02910	INTEGER terminaltype; ! Number of terminal type, 0 for not given;
03060	INTEGER trmspeed;
     
04350	VIRTUAL: PROCEDURE restore_the_whole_screen;
04410	BEGIN
04440	
04470	
04860	BOOLEAN scrollallow; ! Allow <LF> to scroll the screen;
04920	BOOLEAN direct_cursor_addressing; ! Move cursor that way;
04950	BOOLEAN allow_cr; ! Allow sending of <CR> code to the terminal;
05100	BOOLEAN synka; ! Cursor may be at wrong place on terminal screen;
05130	BOOLEAN unknownchar; ! Last read character was untreated char < ' ';
05160	BOOLEAN synchronizing; ! True during "synchronize" action only;
05190	INTEGER cpunumber; ! From monitor tables;
05220	INTEGER vt52; ! code for DEC VT52 terminal type;
05250	INTEGER minitec; ! code for TEC minitec terminal type;
05280	INTEGER elite; ! code for elite 2500 with auto-<LF> at <CR>;
05310	INTEGER kthelite; ! code for elite 2500 without auto-<LF> at <CR>;
05340	INTEGER infoton; ! code for infoton vista terminal type;
05370	INTEGER newelite; ! code for elite 1500 with auto-<LF> at <CR>;
05400	INTEGER newkthelite; ! code for elite 1500 without auto-<LF> at <CR>;
05430	INTEGER teletec; ! code for TEC teletec terminal type;
05460	INTEGER sattelite; ! code for INFOTON vistar sattelite;
05490	INTEGER tandberg; ! code for TANDBERG TDV 2000 terminal type;
05520	INTEGER beehive; ! code for minibee and BEEHIVE B 100 terminals;
05580	INTEGER cdc71310s; ! CDC 713-10 terminals, scroll mode;
05610	INTEGER cdc71310p; ! CDC 713-10 terminals, page mode;
05760	INTEGER elite3025; ! Datamedia Elite 3025 terminal;
05790	INTEGER elite1521; ! Datamedia Elite 1521 terminal;
05850	INTEGER volkerd404; ! Volker 404 terminal;
05880	INTEGER volker414h; ! Volker 414h terminal;
06030	INTEGER buginfoton; ! Infoton without erase line feature;
06060	INTEGER i200; ! Infoton I 200 terminal;
06090	INTEGER adm3a; ! ADM 3 A terminal;
06120	INTEGER vt100; ! Digital VT 100 terminal in Vt52 mode;
06150	INTEGER fut3; ! Reserved for future terminal models;
06180	INTEGER fut2; ! Reserved for future terminal models;
06210	INTEGER fut1; ! Reserved for future terminal models;
06240	INTEGER otherdisplay; ! Unknown display terminal;
06270	INTEGER maxterminals; ! 1 more than highest terminal type number;
06300	INTEGER ttyform; ! tty form setting before being called;
06450	INTEGER q_verticalpos; ! Current cursor position vertically;
06480	INTEGER q_horizontalpos; ! Current cursor position horizontally;
06630	INTEGER widthm1; ! One less than screen width;
06660	INTEGER heightm1; ! One less than screen height;
06810	INTEGER ioindex; ! comment for sysout, used by outche;
06840	CHARACTER lowintens; ! change to low intensity on screen;
06870	CHARACTER highintens; ! change to high intensity on screen;
06900	CHARACTER up; ! cursor up;
06930	CHARACTER left; ! cursor left;
06960	CHARACTER right; ! cursor right;
06990	CHARACTER down; ! cursor movement codes;
07020	CHARACTER formfeed; ! ASCII character;
07050	CHARACTER eraseline; ! Erases rest of line on some terminals;
07080	CHARACTER delayer;
07110	CHARACTER home; ! code to move cursor to upper left screen corner;
07140	COMMENT* ON CDC 713-10, this code moves to lower left corner*;
07170	CHARACTER carriagereturn; ! ASCII character;
07200	CHARACTER altmode; ! ASCII ESCAPE character, decimal 27;
07230	CHARACTER restorechar; ! code which, when given from terminal
07260	;! causes screen to be restored (usually = altmode);
07290	CHARACTER linefeed; ! ASCII character;
07320	CHARACTER verttab; ! ASCII vertical tab character;
07350	CHARACTER null; ! ASCII character with decimal 0 value;
07380	CHARACTER tab; ! ASCII horizontal tab (HT) character;
07410	CHARACTER insline; ! inserts line on some terminal models;
07440	CHARACTER delline; ! deletes line on some terminal models;
07470	CHARACTER inschar; ! inserts character on some terminal models;
07500	CHARACTER delchar; ! deletes character on some terminal models;
07560	CHARACTER q_gotchar; ! Character inputted from the terminal;
07680	CHARACTER startblink; ! Code to start blinking on terminal screen;
07710	CHARACTER bell; ! ASCII character;
07740	CHARACTER stopblink; ! Code to stop blinking on terminal screen;
07770	CHARACTER fill; ! Character with decimal value 127, RUB OUT code;
07800	CHARACTER erasescreen; ! Code to make the whole screen blank;
07860	CHARACTER address_screen; ! Code to start direct cursor addressing;
07890	
07920	BOOLEAN line_erasable; ! True if eraseline is effective;
07950	INTEGER lineinsfillers; ! Number of fillers after insert line;
08160	BOOLEAN addaltmode; ! Terminal control codes to be preceded by ESC;
08190	BOOLEAN upsingle; ! TRUE = no escape in front of cursor up;
08220	BOOLEAN downsingle;
08250	BOOLEAN leftsingle;
08280	BOOLEAN rightsingle;
08310	BOOLEAN homesingle;
08340	BOOLEAN clearsingle; ! TRUE = no escape in front clear screen;
08370	BOOLEAN linesingle; ! TRUE = no escape in front of clear line;
08430	BOOLEAN q_display_output; ! Screen is to be output to the terminal;
08550	BOOLEAN badscreen; ! Terminal screen may be jumbled;
08580	BOOLEAN controlchar; ! Last input char was terminal control code;
08610	BOOLEAN ttyqz; ! Local for QZ computer centre;
08640	BOOLEAN ttyzq; ! Local for QZ computer centre;
08670	
08730	TEXT deleteline; ! Removes line, scrolls rest of screen up;
08760	TEXT insertline; ! Adds blank line, scroll rest down;
08790	TEXT deletechar; ! Removes char, shifts rest to the left;
08820	TEXT eraseeol; ! Erase to end of line;
08850	TEXT insertchar; ! insert character;
09120	TEXT leftimage; ! Image with left code in first position;
09390	TEXT extraparameters;
09420	
09540	TEXT ARRAY screen[0:height-1]; ! Internal copy of screen contents;
     
10320	PROCEDURE echon;
10350	BEGIN COMMENT to start monitor echoing of input characters;
10380	  !z_t(1); !z_t(-2); q_echoenabled:= TRUE;
10410	  IF q_display_output THEN echo(terminalin,4);
10440	END;
10470	
10500	PROCEDURE echoff;
10530	BEGIN COMMENT to start program echoing of input characters;
10560	  !z_t(-1); !z_t(2); q_echoenabled:= FALSE;
10590	  IF q_display_output THEN echo(terminalin,2);
10620	END;
     
10650	PROCEDURE resume_display;
10680	COMMENT to start displaying the picture on the terminal screen;
10710	IF NOT q_display_output THEN
10740	BEGIN !z_t(3); !z_t(-4); q_display_output:= TRUE;
10860	  echo(terminalin,IF q_echoenabled THEN 4 ELSE 2);
10890	END;
10920	
10950	PROCEDURE cancel_display;
10980	COMMENT to stop displaying the picture on the terminal screen;
11010	IF q_display_output THEN
11040	BEGIN !z_t(-3); !z_t(4); COMMENT erase screen;
11070	  IF addaltmode AND NOT homesingle THEN
11100	  outchr(terminalout,altmode,1);
11130	  outchr(terminalout,home,1);
11160	  IF addaltmode AND NOT clearsingle
11190	  THEN outchr(terminalout,altmode,1);
11220	  outchr(terminalout,erasescreen,1); outchr(terminalout,delayer,10);
11250	  forceout(terminalout);
11280	  q_display_output:= FALSE;
11310	  echo(terminalin,4);
11340	END;
     
11670	CHARACTER PROCEDURE get_char_from_screen(h, v);
11700	  COMMENT: If (h,v) indicates a position on the screen, then the
11730	  character in that position is returned. If (h, v) indicates a
11760	  position outside the screen, then char(0) is returned;
11790	INTEGER h, v;
11820	IF v >= 0 AND v <= height THEN
11850	BEGIN
11880	  get_char_from_screen:= fetchar(screen(v),h+1);
11910	END;
     
11970	PROCEDURE specialtext;
12000	COMMENT depending on terminal type, this procedure may give
12030	text which is low intensity, inverse video or underlined. Does
12060	not work on all terminal types;
12090	IF lowintens NE char(0) THEN
12120	BEGIN
12150	  IF addaltmode THEN outchr(terminalout,altmode,1);
12180	  IF terminaltype = elite3025 THEN outchr(terminalout,'O',1);
12210	  outchr(terminalout,lowintens,1);
12240	END;
12270	
12300	PROCEDURE normaltext;
12330	IF highintens NE char(0) THEN
12360	BEGIN
12390	        COMMENT indicate normal text again by intensity
12420	        shift or normal video;
12450	  IF addaltmode THEN outchr(terminalout,altmode,1);
12480	  IF terminaltype = elite3025 THEN outchr(terminalout,'O',1);
12510	  outchr(terminalout,highintens,1);
12540	  outchr(terminalout,delayer,1);
12570	END;
12600	
     
13890	PROCEDURE synchronize(hnew, vnew);
13920	  COMMENT: If there is a risk that the program does not know where
13950	  the cursor is on the screen, then this procedure will anyway for
13980	  sure move the cursor to the position (hnew, vnew);
14010	INTEGER hnew, vnew;
14310	vtsynk(heightm1,hnew,vnew);
     
16440	PROCEDURE move_the_cursor_to(horiz, vertic);
16470	  COMMENT: Will move the cursor to the position(horiz, vertic) on
16500	  the screen;
16530	INTEGER horiz, vertic;
16590	  vtmcur(cpunumber,horiz,vertic);
     
20550	PROCEDURE outchar(setchar);
20580	  COMMENT  Will output the character "setchar" onto the place where
20610	  the cursor is on the screen. Thereafter, the cursor is advanced to
20640	  the position after the outputted character;
20670	CHARACTER setchar;
20700	BEGIN
20730	  BEGIN
20760	    IF setchar = fill THEN setchar:= ' ' ELSE
20790	    IF setchar < ' ' THEN
20820	    BEGIN
20850	      IF terminaltype <= 2 THEN !infoton or vt52;
20880	      BEGIN
20910	        IF setchar NE startblink AND setchar NE stopblink
20940	        THEN setchar:= ' ' ELSE outchr(terminalout,bell,1);
20970	      END ELSE setchar:= ' ';
21000	    END;
21030	    IF q_display_output THEN outchr(terminalout,setchar,1);
21060	    depchar(screen[q_verticalpos],q_horizontalpos+1,setchar);
21090	  END;
21120	  q_horizontalpos:= q_horizontalpos+1;
21150	  IF q_horizontalpos = width THEN
21180	  BEGIN
21210	    synchronize(0,q_verticalpos+1);
21240	  END;
21270	END;
     
21900	PROCEDURE outimage;
21930	  COMMENT: Will output any characters in the terminalout.image
21960	  buffer and will then move the cursor to the beginning of the
21990	  next line on the screen;
22020	INSPECT terminalout DO
22050	BEGIN
22080	  CHARACTER lastout;
22110	  IF q_display_output THEN
22140	  BEGIN
22170	    IF allow_cr AND terminaltype NE tandberg THEN
22200	    BEGIN outchr(terminalout,carriagereturn,1);
22230	      outchr(terminalout,linefeed,1);
22260	    END ELSE
22290	    BEGIN
22320	      move_the_cursor_to(0,q_verticalpos+1);
22350	      q_verticalpos:= q_verticalpos-1;
22380	    END;
22410	  END;
22440	  IF allow_cr OR NOT q_display_output THEN
22470	  q_verticalpos:= q_verticalpos+1;
22500	  IF q_verticalpos >= height THEN q_verticalpos:=
22530	  q_verticalpos-height;
22560	  q_horizontalpos:= 0;
22590	  forceout(terminalout);
22620	END;
     
22650	PROCEDURE outtext(tt); NAME tt; TEXT tt;
22680	COMMENT: Will output a text string onto the screen;
22710	BEGIN TEXT screenpart;
22740	  ! screenpart is part of screen to which t is to be output;
22770	  IF tt.length+q_horizontalpos <=width THEN
22800	  BEGIN
22830	    !z_t(6);
22860	    screenpart:- screen[q_verticalpos].
22890	    sub(q_horizontalpos+1,tt.length);
22920	    screenpart:= tt;
22950	    IF q_display_output THEN
22980	    BEGIN
23010	      outstring(terminalout,screenpart);
23040	    END;
23070	    q_horizontalpos:= q_horizontalpos+tt.length;
23220	    !z_t(-6);
23250	  END;
23280	END;
     
23310	PROCEDURE make_blank(size); INTEGER size;
23340	  COMMENT will make part of the screen blank, beginning at the
23370	  current cursor position, and continuing size characters;
23400	BEGIN
23430	  TEXT notblankpart;
23460	  notblankpart:- screen[q_verticalpos]
23490	  .sub(q_horizontalpos+1,size).strip;
23520	  notblankpart:= NOTEXT;
23550	  IF q_display_output THEN
23580	  BEGIN
23610	    IF (IF line_erasable THEN
23640	    size + q_horizontalpos >= width ELSE FALSE) THEN
23670	    BEGIN IF terminaltype = i200 THEN
23700	      BEGIN IF q_horizontalpos > 0 THEN GOTO blankit;
23730	      END; ! since erase line blanks the whole line;
23760	      outstring(terminalout,eraseeol);
23790	    END ELSE blankit: outchr(terminalout,' ',notblankpart.length);
23820	  END;
23850	  q_horizontalpos:= q_horizontalpos+notblankpart.length;
23880	END;
     
37170	PROCEDURE home_the_cursor;
37200	  COMMENT: Will move the cursor to the position (0,0),
37230	  the upper left corner of the screen;
37260	BEGIN
37290	  IF q_display_output THEN
37320	  BEGIN
37350	    IF addaltmode AND NOT homesingle THEN
37380	    outchr(terminalout,altmode,1) ELSE
37410	    outchr(terminalout,home,1);
37440	    outchr(terminalout,home,1);
37470	    IF terminaltype = cdc71310s THEN outchr(terminalout,up,heightm1);
37500	  END;
37530	  q_verticalpos:= q_horizontalpos:= 0;
37560	END;
     
37590	PROCEDURE blank_the_screen;
37620	COMMENT: Will make the whole screen blank.;
37650	BEGIN
37680	  INTEGER h, v;
37710	  FOR v:= 0 STEP 1 UNTIL heightm1 DO
37740	  screen[v]:= NOTEXT;
37770	  IF q_display_output THEN
37800	  BEGIN
37830	    home_the_cursor;
37860	    IF addaltmode AND NOT clearsingle
37890	    THEN outchr(terminalout,altmode,1);
37920	    outchr(terminalout,erasescreen,1); outchr(terminalout,delayer,10);
37950	    home_the_cursor;
37980	    echo(terminalin,IF q_echoenabled THEN 4 ELSE 2);
38010	  END;
38040	END;
     
38070	COMMENT Execution of the CLASS VISTA starts here with initialization
38100	of local variables;
38400	trmop(8r2017,terminalout,0); !.TTY FILL 0, please monitor no fill
38430	 chars;
38460	allow_cr:= TRUE; infoton:= 1; vt52:= 2;
38490	minitec:= 3; elite:= 4; kthelite:= 5;
38520	newelite:= 6; newkthelite:= 7; teletec:= 8;
38550	sattelite:= 9; tandberg:= 10; beehive:= 11; cdc71310s:= 12;
38580	cdc71310p:= 13; elite3025:= 14; elite1521:= 15;
38610	volkerd404:= 16; volker414h:= 17; buginfoton:= 18;
38640	i200:= 19; adm3a:= 20; vt100:= 21;
38670	
38700	cpunumber:= gettab(8r11,8r20); ! Get CPU number from monitor tables;
38730	IF cpunumber = 1215 !QZ computer centre in Stockholm; THEN
38760	BEGIN
38790	  ttyqz:= trmop(8r1777,terminalout,1) = 1 !.TTY QZ = TRUE;;
38820	  ttyzq:= trmop(8r1776,terminalout,1) = 1 !.TTY ZQ = TRUE;;
38850	END;
38880	IF trmspeed <= 0 THEN
38910	BEGIN
38940	  trmspeed:= trmop(8r1031,terminalout,0);
38970	  trmspeed:= IF trmspeed = 1 THEN 50 ELSE IF trmspeed = 2 THEN
39000	  75 ELSE IF trmspeed = 3 THEN 110 ELSE IF trmspeed = 4 THEN 135
39030	  ELSE IF trmspeed = 5 THEN 150 ELSE IF trmspeed = 6 THEN 200
39060	  ELSE IF trmspeed = 7 THEN 300 ELSE IF trmspeed = 8 THEN 600
39090	  ELSE IF trmspeed = 9 THEN 1200 ELSE IF trmspeed = 9 THEN 1800
39120	  ELSE IF trmspeed = 10 THEN 1800 ELSE IF trmspeed = 11 THEN 2400
39150	  ELSE IF trmspeed = 12 THEN 4800 ELSE IF trmspeed = 13 THEN 9600
39180	  ELSE 2400;
39210	END;
39240	
39270	lineinsfillers:= trmspeed*trmspeed*0.0000011464+trmspeed*0.0040327
39300	-2.548; IF lineinsfillers < 0 THEN lineinsfillers:= 0;
39330	
39360	ioindex:= iondx(terminalout);
39390	IF terminalout.image.length < width THEN terminalout.image:-
39420	blanks(width);
39450	IF terminalin.image.length < width THEN terminalin.image:-
39480	blanks(width);
39510	restorechar:= altmode:= char(27); linefeed:= char(10);
39540	bell:= char(7); verttab:= char(11); null:= char(0);
39570	delayer:=
39600	fill:= char(127); tab:= char(9); carriagereturn:= char(13);
39630	formfeed:= char(12); ttyform:= -1;
     
40200	INSPECT terminalout DO INSPECT terminalin DO
40230	BEGIN CHARACTER c; TEXT typec; BOOLEAN tmpfound;
40260	  IF FALSE THEN bad:
40290	  BEGIN
40320	    outtext("I cannot cope with your terminal specification."
40350	    ); outimage; terminaltype:= 0;
40380	  END;
     
41760	  zeroterminal: IF terminaltype = 0 OR
41790	  terminaltype = otherdisplay THEN
41820	  BEGIN
41850	    terminaltype:= otherdisplay;
41880	    outtext(
41910	    "Push the following keys in sequence on your terminal:"
41940	    ); outimage;
41970	    outtext(
42000	    "Cursor down, cursor up, cursor right, cursor left,");
42030	    outimage;
42060	    outtext("cursor home, erase screen, carriage return.");
42090	    outimage;
42120	    extraparameters:- blanks(20);
42150	    loop:
42210	    c:= getch;
42330	    IF c NE carriagereturn THEN
42360	    BEGIN extraparameters.putchar(c); GOTO loop;
42390	    END;
42420	    extraparameters:-
42450	    extraparameters.sub(1,extraparameters.pos-1);
42510	    c:= getch;
42630	    IF extraparameters = NOTEXT THEN GOTO bad;
42660	    terminaltype:= maxterminals-1;
42690	  END;
     
42720	  IF terminaltype = maxterminals-1
42750	  AND extraparameters =/= NOTEXT THEN
42780	  BEGIN
42810	    CHARACTER PROCEDURE find(single);
42840	    NAME single; BOOLEAN single;
42870	    BEGIN IF NOT extraparameters.more THEN GOTO bad;
42900	      c:= extraparameters.getchar;
42930	      IF c = altmode THEN
42960	      BEGIN addaltmode:= TRUE;
42990	        IF NOT extraparameters.more THEN GOTO bad;
43020	        c:= extraparameters.getchar;
43050	      END ELSE single:= TRUE;
43080	      find:= c;
43110	    END;
43140	    extraparameters.setpos(1);
43170	    down:= find(downsingle); up:= find(upsingle); right:=
43200	    find(rightsingle); left:= find(leftsingle); home:=
43230	    find(homesingle); erasescreen:= find(clearsingle);
43260	  END ELSE
     
43290	  IF terminaltype = infoton OR terminaltype = sattelite
43320	  OR terminaltype = buginfoton THEN
43350	  BEGIN COMMENT Infoton Vista Standard or VISTAR Sattelite;
43380	    IF terminaltype EQ buginfoton THEN
43410	    terminaltype:= infoton ELSE
43440	    BEGIN line_erasable:= TRUE; eraseline:= char(11);
43470	    END;
43500	    IF terminaltype = infoton THEN
43530	    BEGIN
43560	      startblink:= char(31); stopblink:= char(15);
43590	    END ELSE startblink:= stopblink:= ' ';
43620	    up:= char(28); down:= char(29); right:= char(25);
43650	    left:= char(26); home:= char(8); erasescreen:= char(12);
43680	  END ELSE IF terminaltype = vt52 OR terminaltype = vt100 THEN
43710	  BEGIN COMMENT VT52;
43740	    IF terminaltypet= vt100 THEN
43770	    BEGIN COMMENT set terminal to VT52 mode;
43800	      outchr(terminalout,altmode,1);
43830	      forceout(sysout); outche(ioindex,char(91));
43860	      outchr(terminalout,'?',1);
43890	      outchr(terminalout,'2',1);
43920	      outchr(terminalout,'l',1);
43950	    END;
43980	    eraseline:= 'K'; address_screen:= 'Y';
44010	    line_erasable:= direct_cursor_addressing:= addaltmode:= TRUE;
44040	    up:= 'A'; down:= 'B'; right:= 'C'; left:= 'D';
44070	    home:= 'H'; erasescreen:= 'J';
44100	  END ELSE IF terminaltype = minitec OR terminaltype = teletec
44130	  THEN
44160	  BEGIN COMMENT minitec 2402 or teletec;
44190	    IF terminaltype = minitec THEN
44220	    BEGIN
44250	      address_screen:= 'F';
44280	      startblink:= char(16r42); stopblink:= char(16r53);
44310	      erasescreen:= char(28);
44340	    END ELSE erasescreen:= char(12);
44370	    up:= char(11); down:= char(10); right:= char(31);
44400	    left:= char(8); home:= char(30);
44430	  END ELSE IF terminaltype = elite OR terminaltype = kthelite
44460	  THEN
44490	  BEGIN
44520	    BEGIN
44715	      line_erasable:= TRUE; eraseline:= char(23);
44730	      address_screen:= formfeed; direct_cursor_addressing:= TRUE;
44760	    END;
44790	    up:= char(26); down:= char(10);
44820	    right:= char(28); left:= char(8);
44850	    home:= char(2); erasescreen:= char(31);
44880	    startblink:= char(14);
44910	    stopblink:= ' '; !in reality = home;
44940	  END ELSE IF terminaltype = newelite OR terminaltype =
44970	  newkthelite OR terminaltype = elite1521 THEN
45000	  BEGIN
45030	    IF terminaltype = elite1521 THEN
45060	    BEGIN lowintens:= char(4); highintens:= char(24);
45090	    END;
45120	    address_screen:= char(30); direct_cursor_addressing:= TRUE;
45150	    up:= char(31); down:= char(10);
45180	    right:= char(28); left:= char(8);
45210	    home:= char(25); erasescreen:= char(12);
45240	    startblink:= char(14);
45270	    stopblink:= ' '; !in reality = home;
45300	    line_erasable:= TRUE; eraseline:= char(29);
45330	  END ELSE IF terminaltype = tandberg THEN
45360	  BEGIN
45390	    highintens:= char(15);
45420	    lowintens:= char(14);
45540	    tab:= char(30);
45570	    up:= char(28); down:= char(11); left:= char(8);
45600	    right:= char(9);
45630	    home:= char(29); erasescreen:= char(25);
45660	  END ELSE IF terminaltype = beehive THEN
45690	  BEGIN
45720	    addaltmode:= TRUE;
45750	    up:= 'A'; down:= 'B'; left:= 'D'; right:= 'C';
45780	    home:= 'H'; erasescreen:= 'E';
45810	    startblink:= 'l'; stopblink:= 'm';
45840	    address_screen:= 'F'; direct_cursor_addressing:= TRUE;
45870	  END ELSE IF terminaltype = cdc71310s OR
45900	  terminaltype = cdc71310p THEN
45930	  BEGIN
45960	    up:= char(26); down:= linefeed;
45990	    left:= char(8); right:= char(21);
46020	    startblink:= char(14); stopblink:= char(15);
46050	    home:= char(25); ! lower left corner for cdc71310s;
46080	    erasescreen:= char(24);
46110	    delayer:= char(0);
46140	  END ELSE IF terminaltype = elite3025 THEN
46170	  BEGIN
46200	    highintens:= char(48); lowintens:= char(49);
46230	    startblink:= char(16r34); stopblink:= char(16r30);
46260	    line_erasable:= TRUE;
46290	    addaltmode:= leftsingle:= downsingle:= TRUE;
46320	    up:= 'A'; down:= linefeed; right:= 'C';
46350	    left:= char(8); home:= 'H';
46380	    erasescreen:= 'J'; eraseline:= 'K';
46410	    deleteline:- maketext(fill,6+trmspeed*0.013);
46440	    deleteline.putchar(altmode); deleteline.putchar('P');
46470	    deleteline.putchar(altmode); deleteline.putchar(up);
46500	    deleteline.putchar(altmode); deleteline.putchar('Q');
46530	    insertline:- copy(deleteline); insertline.setpos(3);
46560	    insertline.putchar(fill); insertline.putchar(down);
46590	    deletechar:- copy(insertline.sub(1,6+trmspeed*0.0006));
46620	    deletechar.setpos(4); deletechar.putchar(left);
46650	    insertchar:- copy(deleteline.sub(1,deletechar.length));
46680	    insertchar.setpos(4); insertchar.putchar(right);
46710	    address_screen:= 'Y'; direct_cursor_addressing:= TRUE;
46740	  END ELSE
46770	  IF terminaltype = i200 THEN
46800	  BEGIN
46830	    home:= char(26); up:= char(28); down:= char(29);
46860	    left:= char(8); right:= char(25);
46890	    erasescreen:= formfeed;
46920	    ! note eraseline always blanks the whole line;
46950	    line_erasable:= TRUE; eraseline:= char(11);
46980	    address_screen:= char(23); direct_cursor_addressing:= TRUE;
47010	  END ELSE IF terminaltype = adm3a THEN
47040	  BEGIN
47070	    down:= char(10); up:= char(11); right:= char(12);
47100	    left:= char(8); home:= char(30); erasescreen:= char(26);
47130	  END ELSE
47160	  IF terminaltype = volkerd404 THEN
47190	  BEGIN
47220	    home:= char(25); up:= char(26); down:= linefeed; left:= char(8);
47250	    right:= char(21); eraseline:= char(22); erasescreen:= char(24);
47280	    address_screen:= char(16);
47310	    direct_cursor_addressing:= line_erasable := TRUE;
47340	  END ELSE IF terminaltype = volker414h THEN
47370	  BEGIN
47400	    highintens:= char(31); lowintens:= char(25);
47430	    up:= char(12); down:= char(11); left:= char(8); right:= char(16);
47460	    eraseline:= char(15); erasescreen:= char(28);
47490	    address_screen:= char(17); home:= char(18);
47520	    direct_cursor_addressing:=
47550	    line_erasable:= leftsingle:=
47580	    rightsingle:= addaltmode:= TRUE;
47610	    delline:= char(19); insline:= char(26);
47640	    insertline:- maketext(fill,lineinsfillers+2);
47670	    insertline.putchar(altmode); insertline.putchar(insline);
47700	    deleteline:- copy(insertline);
47730	    deleteline.setpos(2); deleteline.putchar(delline);
47760	    delchar:= '3'; inschar:= ':';
47790	    deletechar:- maketext(fill,lineinsfillers//2+2);
47820	    deletechar.putchar(altmode); deletechar.putchar(delchar);
47850	    insertchar:- copy(deletechar); insertchar.setpos(2);
47880	    insertchar.putchar(inschar);
47910	  END ELSE GOTO bad;
47940	
47970	  IF line_erasable THEN
48000	  BEGIN
48030	    eraseeol:- maketext(fill,2+lineinsfillers//28);
48060	    IF addaltmode AND NOT linesingle THEN eraseeol.putchar(altmode);
48090	    eraseeol.putchar(eraseline);
48120	  END;
48780	
48810	  q_display_output:= TRUE;
48930	  leftimage:- blanks(terminalin.length);
48960	  depchar(leftimage,1,left);
48990	  terminalout.linesperpage(-1);
49020	  trmop(8r2010,terminalout,1); ! .TTY NO CRLF;
49050	  widthm1:= width-1; heightm1:= height-1;
49080	  FOR q_verticalpos:= heightm1 STEP -1 UNTIL 0 DO
49110	  screen[q_verticalpos]:- blanks(width);
49230	  blank_the_screen;
49260	END;
49320	END OF CLASS mvistax;
49380	END;