home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / os2pm / screen.def < prev    next >
Text File  |  2020-01-01  |  2KB  |  83 lines

  1. DEFINITION MODULE Screen;
  2. (* Module to perform "low level" screen functions (via AVIO) *)
  3.  
  4.    FROM PMAVIO IMPORT
  5.       HVPS;
  6.  
  7.    EXPORT QUALIFIED
  8.       NORMAL, HIGHLIGHT, REVERSE, attribute, ColorSet, hvps,
  9.       White, Green, Amber, Color1, Color2,
  10.       ClrScr, ClrEol, GotoXY, GetXY,
  11.       Right, Left, Up, Down, Write, WriteLn, WriteString,
  12.       WriteInt, WriteHex, WriteAtt;
  13.  
  14.  
  15.    VAR
  16.       NORMAL : CARDINAL;
  17.       HIGHLIGHT : CARDINAL;
  18.       REVERSE : CARDINAL;
  19.       attribute : CARDINAL;
  20.       ColorSet : CARDINAL;
  21.       hvps : HVPS;   (* presentation space used by screen module *)
  22.  
  23.  
  24.    PROCEDURE White;
  25.    (* Sets up colors: Monochrome White *)
  26.  
  27.    PROCEDURE Green;
  28.    (* Sets up colors: Monochrome Green *)
  29.  
  30.    PROCEDURE Amber;
  31.    (* Sets up colors: Monochrome Amber *)
  32.  
  33.    PROCEDURE Color1;
  34.    (* Sets up colors: Blue, Red, Green *)
  35.  
  36.    PROCEDURE Color2;
  37.    (* Sets up colors: Cyan Background; Black, Blue, White-on-Red *)
  38.  
  39.    PROCEDURE ClrScr;
  40.    (* Clear the screen, and home the cursor *)
  41.  
  42.    PROCEDURE ClrEol;
  43.    (* clear from the current cursor position to the end of the line *)
  44.  
  45.    PROCEDURE Right;
  46.    (* move cursor to the right *)
  47.  
  48.    PROCEDURE Left;
  49.    (* move cursor to the left *)
  50.  
  51.    PROCEDURE Up;
  52.    (* move cursor up *)
  53.  
  54.    PROCEDURE Down;
  55.    (* move cursor down *)
  56.  
  57.    PROCEDURE GotoXY (col, row : CARDINAL);
  58.    (* position cursor at column, row *)
  59.  
  60.    PROCEDURE GetXY (VAR col, row : CARDINAL);
  61.    (* determine current cursor position *)
  62.  
  63.    PROCEDURE Write (c : CHAR);
  64.    (* Write a Character, Teletype Mode *)
  65.  
  66.    PROCEDURE WriteString (str : ARRAY OF CHAR);
  67.    (* Write String, Teletype Mode *)
  68.  
  69.    PROCEDURE WriteInt (n : INTEGER; s : CARDINAL);
  70.    (* Write Integer, Teletype Mode *)
  71.  
  72.    PROCEDURE WriteHex (n, s : CARDINAL);
  73.    (* Write a Hexadecimal Number, Teletype Mode *)
  74.  
  75.    PROCEDURE WriteLn;
  76.    (* Write <cr> <lf>, Teletype Mode *)
  77.  
  78.    PROCEDURE WriteAtt (c : CHAR);
  79.    (* write character and attribute at cursor position *)
  80.  
  81. END Screen.
  82.  
  83.