comp.lang.ada
 help / color / mirror / Atom feed
From: "B. Douglas Hilton" <doug.hilton@engineer.com>
Subject: Re: for a beginner...
Date: Thu, 05 Jul 2001 23:21:31 -0400
Date: 2001-07-05T23:21:31-04:00	[thread overview]
Message-ID: <3B452EBB.88763BDD@engineer.com> (raw)
In-Reply-To: 000901c105c6$288d58e0$03000004@p4g4r3

ANSI was a terminal driver code that was used by a lot of
old BBS and terminal software. If you had ANSI.SYS loaded
or used and ANSI terminal then you could use escape codes
to control the screen. I will use ^[ to represent ESC, which
is octal code \033, for example ^[[ is \033[[

Clear screen: ^[[2J
Clear to end of line: ^[[K
Save cursor position: ^[[s
Go to saved location: ^[[u
Jump to screen 3:30: ^[[3:30H
Turn subsequent text bright blue: ^[[1;34m
Set text to gray: ^[[0m

Take a look at this link:

http://enterprise.aacc.cc.md.us/~rhs/ansi.html

It explains the codes. From c, if you did:

    printf( "\033[1;34mThis is blue text\033[0m!\n")

You would indeed have blue text assuming that you had an ansi driver working.

Cheers!
- Doug



Beau Elliott wrote:

> that ansi.sys thing can you explain that to me? because my prof said that to
> see and use some of the screen pakcages that came with the book. do you know
> what I am talking about? if you do, can you tell me how to use it?
> ~Beau~
> beau@hiwaay.net
>
> ----- Original Message -----
> From: "B. Douglas Hilton" <doug.hilton@engineer.com>
> Newsgroups: comp.lang.ada
> Sent: Thursday, July 05, 2001 8:35 PM
> Subject: Re: for a beginner...
>
> > Ah, hey dude, whats happenin!
> >
> > If you have gnat, then use, argh.. I forget... Gnat.OS?
> >
> > use Gnat.OS
> >
> >     ...
> >     Gnat.OS.System("cls");
> >
> > Help me out here vets, I forget the exact Annex...
> >
> > If you have ANSI.SYS loaded, the code is ESC[2J
> >
> > There is a small annex called "screen" that acts like
> > an ANSI terminal emulator and even works with Win2k,
> > which Win2k has more or less disables ANSI.SYS if
> > you use CMD.EXE, old COMMAND.COM still has
> > it but there are problems using it.
> >
> >     I hate M$! When they screwed up ANSI.SYS that
> > was the final straw. Now I can't even have a colorized
> > DOS-Box prompt thanks to those idiots. With the kind
> > of work I do, I need super automatic batch-mode, not
> > click "OK" ten thousand times in a row every ten seconds.
> >
> > ( And I'm sure as sh!t not going to buy "Visual Studio" when
> > I already have gnat / gtkAda working! )
> >
> > Cheers!
> > - Doug
> >
> >
> > Beau wrote:
> >
> > > Is there an easy way to do a clear screen for the dos prompt?
> > > like I have a bunch of data that I have put pauses in. It would be very
> > > helpful if I could clear the screen after every pause. thanks,
> > > --
> > > ~Beau~
> > > beau@hiwaay.net
> >




  parent reply	other threads:[~2001-07-06  3:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-06  0:51 for a beginner Beau
2001-07-06  1:35 ` B. Douglas Hilton
2001-07-06  2:48   ` Beau
     [not found]   ` <000901c105c6$288d58e0$03000004@p4g4r3>
2001-07-06  3:21     ` B. Douglas Hilton [this message]
2001-07-06  3:55       ` B. Douglas Hilton
2001-07-06 14:28   ` Ted Dennison
2001-07-06 18:15     ` Darren New
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox