PRAGMA inside_op
(operation_name => --|*|--)
PRAGMA line_feed
(option => 1)
PRAGMA line_feed
(option => 2)
PRAGMA compiler
(name => gnat,
options => --| |--)
This design provides a Windows 95 / NT implementation for a screen interface.
The interface is the same as the one defined in Michael Feldman's "simple ANSI terminal emulator", The George Washington University, 1995.
The implementation is the one of Jerry van Dijk's"nt_console", 1998.
ATTRIBUTES NONE
ENUMERATION NONE
subtype Height is nt_console.Y_Pos;
ATTRIBUTES NONE
ENUMERATION NONE
subtype Width is nt_console.X_Pos;
ATTRIBUTES Row : Height, Column : Width
ENUMERATION NONE
type Position is record
Row : Height := 1;
Column : Width := 1;
end record;
ScreenHeight : constant INTEGER := 24;
ScreenWidth : constant INTEGER := 80;
Pre: none
Post: the terminal beeps once
Beep;
WCET
Pre: none
Post: the terminal screen is cleared
ClearScreen;
WCET
Pre: To is defined
Post: the terminal cursor is moved to the given position
MoveCursor(To : in Position);
WCET
OBJECT nt_console;
TYPES
Y_Pos; X_Pos;
CONSTANTS
NONE
OPERATION_SETS
NONE
OPERATIONS
Bleep; Clear_Screen; Goto_XY;
EXCEPTIONS
NONE
OBJECT standard;
TYPES
Integer;
CONSTANTS
NONE
OPERATION_SETS
NONE
OPERATIONS
NONE
EXCEPTIONS
NONE
OBJECT TEXT_IO;
TYPES
NONE
CONSTANTS
INTEGER_IO;
OPERATION_SETS
NONE
OPERATIONS
NONE
EXCEPTIONS
NONE
package Int_IO is new Text_IO.Integer_IO(Num => Integer);
(da) screen.Int_IO IS USED BY NONE
(da) screen.Int_IO IS USED BY NONE
(da) screen.Int_IO IS USED BY NONE
(da) screen.Int_IO IS USED BY NONE
nt_console.Bleep
begin
nt_console.Bleep;
nt_console.Clear_Screen
begin
nt_console.Clear_Screen;
nt_console.Goto_XY
begin
nt_console.Goto_XY(To.Column, To.Row);