with Text_IO; package body Screen is package Int_IO is new Text_IO.Integer_IO (Num => Integer); procedure Clearall is begin Screen.Clear; Screen.Set_Attribute (Screen.normal); Screen.Move_Cursor (To => (1, 1)); end Clearall; procedure Beep is begin Text_IO.Put (Item => Ascii.Bel); end Beep; procedure Clear is begin Text_IO.Put (Item => Ascii.Esc); Text_IO.Put (Item => "[2J"); end Clear; procedure Move_Cursor (To : in Position) is begin Text_IO.Put (Item => Ascii.Esc); Text_IO.Put ("["); Int_IO.Put (Item => To.Row, Width => 1); Text_IO.Put (Item => ';'); Int_IO.Put (Item => To.Column, Width => 1); Text_IO.Put (Item => 'f'); end Move_Cursor; procedure Set_Attribute (The_Attribute : Attribute) is use Text_IO; begin Text_IO.Put (Ascii.Esc); case The_Attribute is when normal => Put ("[0m"); when bold => Put ("[1m"); when inverse => Put ("[7m"); when blink => Put ("[5m"); end case; end Set_Attribute; procedure Save_Cursor is begin Text_IO.Put (Item => Ascii.Esc); Text_IO.Put (Item => "7"); end Save_Cursor; procedure Restore_Cursor is begin Text_IO.Put (Item => Ascii.Esc); Text_IO.Put (Item => "8"); end Restore_Cursor; end Screen;