%FOREIGN DEFINITION MODULE TEK;
(* 
   Interface with the tektronics PLOT10 Fortran Subroutine package 
   Not all the routines are defined; the additions
   should be trivial. The routine are not documented here. Please
   refer to the TEK reference manual.
                    Sohail Aslam CS Dept. 
*)

EXPORT QUALIFIED   
    Movea,Drawa,Dasha,Linef,Anstr,Chrsiz,Dwindo,Initt,Newpag,Finitt, Binitt,
    (* 4662 specific routines *)
    Plinit, Pspeed, Plon, Ploff, Swchar, Term, Plcopy;

PROCEDURE Initt(
    %REF baud : INTEGER  );

PROCEDURE Binitt( );

PROCEDURE Dwindo(
    %REF xmin : REAL;
    %REF xmax : REAL;
    %REF ymin : REAL;
    %REF ymax : REAL  );

PROCEDURE Newpag( );

PROCEDURE Chrsiz(
    %REF Ichar : INTEGER );

PROCEDURE Anstr(
    %REF Nchar : INTEGER;
    %REF Nade  : ARRAY OF INTEGER );

PROCEDURE Linef( );

PROCEDURE Movea(
    %REF x : REAL;
    %REF y : REAL );

PROCEDURE Drawa(
    %REF x : REAL;
    %REF y : REAL );

PROCEDURE Dasha(
    %REF x : REAL;
    %REF y : REAL;
    %REF rastpattern : INTEGER );

PROCEDURE Finitt(
    %REF x : INTEGER;
    %REF y : INTEGER  );

(* 4662 specific routines *)
PROCEDURE Plinit( 
    %REF Kdevice : INTEGER (* in *) );
    (*
    Kdevice = 1 = A, 2=B,.. 4=D on back panel switch 
    *)
PROCEDURE Pspeed(
    %REF Kcps : INTEGER (* in *) );
    (*
    Kcps = 0 Block mode
    *)
PROCEDURE Plcopy(
    %REF Kcopy : INTEGER (* in *) );
    (*
    0 = standard mode, 1=copy mode.
    *)
    
PROCEDURE Plon( );
PROCEDURE Ploff( );
PROCEDURE Swchar(
    %REF Inable : INTEGER (* in *) );
    (*
    Inable = 1 enable software characters.
    *)
PROCEDURE Term(
    %REF Iterm : INTEGER (* in *);
    %REF Iscal : INTEGER (* in *) );
    (*
    Iterm: 1=4006,4010,4012/4013, 2=4014/4015, 3=4014/4015 enhanced.
    Iscal: 1024, 4096.
    *)
END TEK.
