From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Subject: Re: Clear screen command?
Date: 1998/03/05
Date: 1998-03-05T00:00:00+00:00 [thread overview]
Message-ID: <34FE8F35.1DD7ECFD@cl.cam.ac.uk> (raw)
In-Reply-To: 34FE7D3A.B247A1C1@uredd.sjo.statkart.no
To clear a screen on any ISO 6429 compatible terminal (that's
everything claiming to be VT100 or ANSI or xterm compatible),
just use procedures such as
-- warning: the following code is untested
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
procedure Clear_Screen is
begin
put(ESC & "[2J");
end;
procedure Goto_XY(Row, Column: Natural) is
begin
put(ESC & "[");
put(Row);
put(';');
put(Column);
put('H');
end;
For all the VT100/ISO 6429 commands, see for instance
http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html
Completing the above into a nice ISO6429 package for controlling
text terminals is left as a small exercise to the reader.
Hope this helped ...
Markus
--
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org, home page: <http://www.cl.cam.ac.uk/~mgk25/>
next prev parent reply other threads:[~1998-03-05 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-04 0:00 Clear screen command? Jeremy Mlazovsky
1998-03-05 0:00 ` Tarjei Tj�stheim Jensen
1998-03-05 0:00 ` Markus Kuhn [this message]
1998-03-06 0:00 ` Nick Roberts
1998-03-05 0:00 ` Juergen Pfeifer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox