comp.lang.ada
 help / color / mirror / Atom feed
* Re: NT,  ANSI.SYS, and Ada 95
  1999-01-08  0:00 NT, ANSI.SYS, and Ada 95 Russell E. Hixon
@ 1999-01-07  0:00 ` Hans Marqvardsen
  1999-01-08  0:00 ` Paul Whittington
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Marqvardsen @ 1999-01-07  0:00 UTC (permalink / raw)


Russell E. Hixon wrote:
> 
> I am using Feldman's book - Ada 95 Problem Solving and Program Design in an
> introductory Ada 95 course.  In the book, Feldman includes a package
> (Screen) which utilizes ansi.sys.  I have not found a way to get this to
> work in a Windows NT environment.  Any suggestions?
> 
> Russell E. Hixon, USAF
> Instructor
> REHixon@cwix.com

Quote from Jerry van Dijk 
at 
(http://stad.dsl.nl/~jvandyk/#FELDMAN):

A Win32 version of Mike Feldmans SCREEN package

A lot of example programs by Mike Feldman use his basic, ANSI based,
SCREEN package.
Unfortunately, MS does not support the use of ANSI escape sequences for
Windows
console programs.

This archive contains a modified version of the SCREEN package that
_does_ work on
Windows and NT. It schould work with both GNAT and ObjectAda and does
not require
a Win32 binding.

Download Win32 SCREEN package (win32_screen.zip, 2678 bytes)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* NT,  ANSI.SYS, and Ada 95
@ 1999-01-08  0:00 Russell E. Hixon
  1999-01-07  0:00 ` Hans Marqvardsen
  1999-01-08  0:00 ` Paul Whittington
  0 siblings, 2 replies; 5+ messages in thread
From: Russell E. Hixon @ 1999-01-08  0:00 UTC (permalink / raw)


I am using Feldman's book - Ada 95 Problem Solving and Program Design in an
introductory Ada 95 course.  In the book, Feldman includes a package
(Screen) which utilizes ansi.sys.  I have not found a way to get this to
work in a Windows NT environment.  Any suggestions?

Russell E. Hixon, USAF
Instructor
REHixon@cwix.com






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NT,  ANSI.SYS, and Ada 95
  1999-01-08  0:00 NT, ANSI.SYS, and Ada 95 Russell E. Hixon
  1999-01-07  0:00 ` Hans Marqvardsen
@ 1999-01-08  0:00 ` Paul Whittington
  1999-01-08  0:00   ` David C. Hoos, Sr.
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Whittington @ 1999-01-08  0:00 UTC (permalink / raw)


Try adding the line

device=%SystemRoot%\system32\ansi.sys

to the file

c:\winnt\system32\config.nt


"Russell E. Hixon" wrote:
> 
> I am using Feldman's book - Ada 95 Problem Solving and Program Design in an
> introductory Ada 95 course.  In the book, Feldman includes a package
> (Screen) which utilizes ansi.sys.  I have not found a way to get this to
> work in a Windows NT environment.  Any suggestions?
> 
> Russell E. Hixon, USAF
> Instructor
> REHixon@cwix.com

-- 
Paul Whittington
GrepNet, Inc.
(208)523-7375
paul@grep.net

"Even if you're on the right track you'll get
 run over if you stand still."

Will Rogers




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NT,  ANSI.SYS, and Ada 95
  1999-01-08  0:00 ` Paul Whittington
@ 1999-01-08  0:00   ` David C. Hoos, Sr.
  1999-01-08  0:00     ` Russell E. Hixon
  0 siblings, 1 reply; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-01-08  0:00 UTC (permalink / raw)



Paul Whittington wrote in message <3695BCBC.4B77C8E9@grep.net>...
>Try adding the line
>
>device=%SystemRoot%\system32\ansi.sys
>
>to the file
>
>c:\winnt\system32\config.nt
>
>
>"Russell E. Hixon" wrote:
>>
>> I am using Feldman's book - Ada 95 Problem Solving and Program Design in
an
>> introductory Ada 95 course.  In the book, Feldman includes a package
>> (Screen) which utilizes ansi.sys.  I have not found a way to get this to
>> work in a Windows NT environment.  Any suggestions?
>>
This advice regarding ANSI.SYS on NT is only useful for MS-DOS applications,
which gnat programs compiled under NT are not.  The gnat examples are NT
console applications, and it is possible to write NT GUI applications with
gnat, as well.

The quickest solution is to write a replacement body for Feldman's screen
package to call the subprograms in Jerry Van Dyke's NT_Console package
(8KB Zip) available at http://stad.dsl.nl/~jvandyk/nt_con02.zip

Such a body rewrite might look like:

--::::::::::
--screen.adb
--::::::::::
with Nt_Console;
package body Screen is

  procedure Beep is
  begin
    Nt_Console.Bleep;
  end Beep;

  procedure ClearScreen is
  begin
     Nt_Console.Clear_Screen;
  end ClearScreen;

  procedure MoveCursor (To: in Position) is
  begin
   Nt_Console.Goto_XY
     (X => To.Column,
      Y => To.Row);
  end MoveCursor;

end Screen;

Hope this helps.

David C. Hoos, Sr.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NT,  ANSI.SYS, and Ada 95
  1999-01-08  0:00   ` David C. Hoos, Sr.
@ 1999-01-08  0:00     ` Russell E. Hixon
  0 siblings, 0 replies; 5+ messages in thread
From: Russell E. Hixon @ 1999-01-08  0:00 UTC (permalink / raw)


I had tried adding this line to my config.nt file with no success.  I
downloaded the NT_Console package and it seems to work just great.  Thank
you pointing me in the right direction.

Russell E. Hixon,
Instructor

David C. Hoos, Sr. wrote in message <774rne$das$1@tsunami.traveller.com>...
>
>Paul Whittington wrote in message <3695BCBC.4B77C8E9@grep.net>...
>>Try adding the line
>>
>>device=%SystemRoot%\system32\ansi.sys
>>
>>to the file
>>
>>c:\winnt\system32\config.nt
>>
>>
>>"Russell E. Hixon" wrote:
>>>
>>> I am using Feldman's book - Ada 95 Problem Solving and Program Design in
>an
>>> introductory Ada 95 course.  In the book, Feldman includes a package
>>> (Screen) which utilizes ansi.sys.  I have not found a way to get this to
>>> work in a Windows NT environment.  Any suggestions?
>>>
>This advice regarding ANSI.SYS on NT is only useful for MS-DOS
applications,
>which gnat programs compiled under NT are not.  The gnat examples are NT
>console applications, and it is possible to write NT GUI applications with
>gnat, as well.
>
>The quickest solution is to write a replacement body for Feldman's screen
>package to call the subprograms in Jerry Van Dyke's NT_Console package
>(8KB Zip) available at http://stad.dsl.nl/~jvandyk/nt_con02.zip
>
>Such a body rewrite might look like:
>
>--::::::::::
>--screen.adb
>--::::::::::
>with Nt_Console;
>package body Screen is
>
>  procedure Beep is
>  begin
>    Nt_Console.Bleep;
>  end Beep;
>
>  procedure ClearScreen is
>  begin
>     Nt_Console.Clear_Screen;
>  end ClearScreen;
>
>  procedure MoveCursor (To: in Position) is
>  begin
>   Nt_Console.Goto_XY
>     (X => To.Column,
>      Y => To.Row);
>  end MoveCursor;
>
>end Screen;
>
>Hope this helps.
>
>David C. Hoos, Sr.
>
>
>






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-01-08  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-08  0:00 NT, ANSI.SYS, and Ada 95 Russell E. Hixon
1999-01-07  0:00 ` Hans Marqvardsen
1999-01-08  0:00 ` Paul Whittington
1999-01-08  0:00   ` David C. Hoos, Sr.
1999-01-08  0:00     ` Russell E. Hixon

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