-- Last Modification: 24/May/98 by J.Miranda -- Incorporation of Set_Attribute -- Save_Cursor -- Restore_Cursor -- ClrEol -- -- Invalid_Position (exception) package Screen is -- simple ANSI terminal emulator -- Michael Feldman, The George Washington University -- July, 1995 ScreenHeight : constant Integer := 24; ScreenWidth : constant Integer := 80; subtype Height is Integer range 1 .. ScreenHeight; subtype Width is Integer range 1 .. ScreenWidth; type Position is record Row : Height := 1; Column : Width := 1; end record; type Attribute is (normal, bold, inverse, blink); procedure Clearall; -- Pre: none -- Post: Clear the terminal screen and restores normal parameters procedure Beep; -- Pre: none -- Post: the terminal beeps once procedure Clear; -- Pre: none -- Post: the terminal screen is cleared procedure Move_Cursor (To : in Position); -- Pre: To is defined -- Post: the terminal cursor is moved to the given position procedure Set_Attribute (The_Attribute : Attribute); -- Pre: The_Attribute has a value. -- Post: Subsequent text will be displayed using The_Attribute. procedure Save_Cursor; -- Pre : nothing -- Post: the current position of the cursor is saved. procedure Restore_Cursor; -- Pre : nothing -- Post: the cursor is restored to it's previously saved position. -- procedure ClrEol; -- Pre: nothing -- Post: Clears the current line (from the current column to the end -- of the line) Invalid_Position : exception; end Screen;