DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T v

⟦cb5e33076⟧ TextFile

    Length: 4264 (0x10a8)
    Types: TextFile
    Names: »vt640vdu.mod«

Derivation

└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./DVIware/crt-viewers/others/dvitovdu/src/vt640vdu.mod« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/crt-viewers/others/dvitovdu/src/vt640vdu.mod« 

TextFile

IMPLEMENTATION MODULE vt640vdu;

(* Author:         Andrew Trevorrow
   Implementation: Modula-2 under VAX/UNIX 4.2 BSD
   Date Started:   June, 1986

   Description:
   Implements the InitVT640 procedure that initializes the generic VDU
   routines and parameters used in DVItoVDU.
   The VT640 VDU has a Transparent mode in which it behaves like a VT100, but
   it can also emulate a Tektronix 4010 terminal in which the screen is
   1024 pixels wide by 780 pixels high.
   (The actual resolution of the VT640 screen is 640 by 480 pixels;
   the appropriate scaling is done automatically.)

   The bottom left pixel is the point (x=0,y=0). Note that x coordinates
   increase to the right and y coordinates increase up the screen.
   DVItoVDU uses a coordinate scheme in which horizontal (=h) coordinates
   also increase to the right but vertical (=v) coordinates increase DOWN the
   screen, i.e. the top left pixel on the screen is the point (h=0,v=0).
   This means that the Tektronix 4010 routines will have to do a
   simple translation of the vertical coordinates passed by DVItoVDU.
*)

FROM vduinterface IMPORT
   (* PROCEDURE variables: *)
   StartText,
   MoveToTextLine,
   ClearTextLine,
   ClearScreen,
   StartGraphics,
   LoadFont,
   ShowChar,
   ShowRectangle,
   ResetVDU,
   (* INTEGER variables: *)
   DVIstatusl,
   windowstatusl,
   messagel,
   commandl,
   bottoml,
   windowv,
   windowh,
   windowht,
   windowwd;

FROM tek4010vdu IMPORT
   TEK4010ClearScreen,
   TEK4010StartText,
   TEK4010StartGraphics,
   TEK4010LoadFont,
   TEK4010ShowChar,
   TEK4010ShowRectangle;

FROM ansivdu IMPORT
   MoveAbs;

FROM screenio IMPORT
   Write, WriteString;

CONST
   CAN = 30C;   (* VT100 mode *)
   ESC = 33C;
   GS  = 35C;   (* Tektronix mode *)

(******************************************************************************)

PROCEDURE InitVT640;

(* The dialog region will be the top 4 text lines in VT100 mode:
      Line 1 = DVI status line,
      Line 2 = window status line,
      Line 3 = message line,
      Line 4 = command line.
   The window region will be text lines 5 to 24 in VT100 mode.
*)

BEGIN
DVIstatusl    := 1;      (* DVItoVDU assumes top text line = 1 *)
windowstatusl := 2;
messagel      := 3;
commandl      := 4;
bottoml       := 24;     (* also number of text lines on screen *)
(* The above values assume the VT640 is in VT100 mode;
   the following values assume it is emulating a Tektronix 4010.
   Note that windowv must be given a value using DVItoVDU's coordinate scheme
   where top left pixel is (0,0).
*)
windowv  := 130;         (* approx. height in TEK4010 pixels of 4 text lines
                            i.e. 4 * 780/24 *)
windowh  := 0;
windowht := 780-windowv;
windowwd := 1024;

MoveToTextLine := VT640MoveToTextLine;
ClearTextLine  := VT640ClearTextLine;
ClearScreen    := VT640ClearScreen;
StartText      := TEK4010StartText;
StartGraphics  := TEK4010StartGraphics;
LoadFont       := TEK4010LoadFont;
ShowChar       := TEK4010ShowChar;
ShowRectangle  := TEK4010ShowRectangle;
ResetVDU       := VT640ResetVDU;
END InitVT640;

(******************************************************************************)

PROCEDURE VT640MoveToTextLine (line : CARDINAL);

BEGIN
Write(GS);    (* cannot send CAN if VT640 is already in VT100 mode *)
Write(CAN);   (* switch to VT100 mode *)
MoveAbs(line,1);
END VT640MoveToTextLine;

(******************************************************************************)

PROCEDURE VT640ClearTextLine (line : CARDINAL);

BEGIN
Write(GS);
Write(CAN);
MoveAbs(line,1);
Write(ESC);
WriteString('[K');   (* erase to end of line *)
END VT640ClearTextLine;

(******************************************************************************)

PROCEDURE VT640ClearScreen;

BEGIN
Write(GS);
Write(CAN);
Write(ESC);
WriteString('[2J');   (* erase all alphanumerics - need for VIS550! *)
TEK4010ClearScreen;
END VT640ClearScreen;

(******************************************************************************)

PROCEDURE VT640ResetVDU;

BEGIN
Write(GS);    (* cannot send CAN if VT640 is already in VT100 mode *)
Write(CAN);   (* switch to VT100 mode *)
END VT640ResetVDU;

(******************************************************************************)

BEGIN
END vt640vdu.