DEFINITION MODULE Screen; (* Module to perform "low level" screen functions (via AVIO) *) FROM PMAVIO IMPORT HVPS; EXPORT QUALIFIED NORMAL, HIGHLIGHT, REVERSE, attribute, ColorSet, hvps, White, Green, Amber, Color1, Color2, ClrScr, ClrEol, GotoXY, GetXY, Right, Left, Up, Down, Write, WriteLn, WriteString, WriteInt, WriteHex, WriteAtt; VAR NORMAL : CARDINAL; HIGHLIGHT : CARDINAL; REVERSE : CARDINAL; attribute : CARDINAL; ColorSet : CARDINAL; hvps : HVPS; (* presentation space used by screen module *) PROCEDURE White; (* Sets up colors: Monochrome White *) PROCEDURE Green; (* Sets up colors: Monochrome Green *) PROCEDURE Amber; (* Sets up colors: Monochrome Amber *) PROCEDURE Color1; (* Sets up colors: Blue, Red, Green *) PROCEDURE Color2; (* Sets up colors: Cyan Background; Black, Blue, White-on-Red *) PROCEDURE ClrScr; (* Clear the screen, and home the cursor *) PROCEDURE ClrEol; (* clear from the current cursor position to the end of the line *) PROCEDURE Right; (* move cursor to the right *) PROCEDURE Left; (* move cursor to the left *) PROCEDURE Up; (* move cursor up *) PROCEDURE Down; (* move cursor down *) PROCEDURE GotoXY (col, row : CARDINAL); (* position cursor at column, row *) PROCEDURE GetXY (VAR col, row : CARDINAL); (* determine current cursor position *) PROCEDURE Write (c : CHAR); (* Write a Character, Teletype Mode *) PROCEDURE WriteString (str : ARRAY OF CHAR); (* Write String, Teletype Mode *) PROCEDURE WriteInt (n : INTEGER; s : CARDINAL); (* Write Integer, Teletype Mode *) PROCEDURE WriteHex (n, s : CARDINAL); (* Write a Hexadecimal Number, Teletype Mode *) PROCEDURE WriteLn; (* Write , Teletype Mode *) PROCEDURE WriteAtt (c : CHAR); (* write character and attribute at cursor position *) END Screen.