comp.lang.ada
 help / color / mirror / Atom feed
* ObjectAda and ANSI.SYS
@ 1998-06-17  0:00 Hans Marqvardsen
  1998-06-17  0:00 ` Hans Marqvardsen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hans Marqvardsen @ 1998-06-17  0:00 UTC (permalink / raw)



I am reading Feldman&Koffman:Ada95 and would like to use their SCREEN
package on Windows NT4.0 (and also Windows 95).

The book says I have to install ANSI.SYS first.

Can anybody please give specific directions on how to do this?

Thanks in advance for any help, Hans.




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

* Re: ObjectAda and ANSI.SYS
  1998-06-17  0:00 ObjectAda and ANSI.SYS Hans Marqvardsen
@ 1998-06-17  0:00 ` Hans Marqvardsen
  1998-06-18  0:00   ` Steve Doiel
  1998-06-18  0:00   ` Jerry van Dijk
  1998-06-18  0:00 ` John Herro
  1998-06-19  0:00 ` ������
  2 siblings, 2 replies; 10+ messages in thread
From: Hans Marqvardsen @ 1998-06-17  0:00 UTC (permalink / raw)



Hans Marqvardsen wrote:
> 
> I am reading Feldman&Koffman:Ada95 and would like to use their SCREEN
> package on Windows NT4.0 (and also Windows 95).
> 
> The book says I have to install ANSI.SYS first.
> 
> Can anybody please give specific directions on how to do this?
> 
> Thanks in advance for any help, Hans.

Sorry, forgot to mention, I HAVE included the line
	device=c:\winnt40\system32\ansi.sys
in CONFIG.NT.

When I open a DOS window, and use the MEM /P command, the output
confirms that ANSI.SYS is in fact installed;
	Name:ANSI, SIZE:1060, Type:DEVICE=

However, 
when I run Feldmans SMILEY procedure, 
the output merely lists the escape sequenses
without interpretation. 

IE the first line starts:
<-[2J<-[7;34fHave a Nice Day!<-[9;34f___

("<-" represents one-character arrow-left, meaning escape)

Please, what have I forgotten to do, to make the 
Ada-console-window ANSI-aware?  		-- Hans




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

* Re: ObjectAda and ANSI.SYS
  1998-06-17  0:00 ObjectAda and ANSI.SYS Hans Marqvardsen
  1998-06-17  0:00 ` Hans Marqvardsen
@ 1998-06-18  0:00 ` John Herro
  1998-06-19  0:00   ` Kevin Radke
  1998-06-19  0:00 ` ������
  2 siblings, 1 reply; 10+ messages in thread
From: John Herro @ 1998-06-18  0:00 UTC (permalink / raw)



Hans Marqvardsen <hm@ddre.dk>
is having trouble running a program
that requires ANSI.SYS under Windows NT.

Running a program that needs ANSI.SYS under Windows NT is a hassle, but it can
be done.  My AdaTutor program is one such program, and, while it's easy to
install ANSI.SYS for Windows 95, several customers called me because of
difficulty running the program under Windows NT.  (BTW, we're working on a
Windows version, to be called AdaEase, which of course won't need ANSI.SYS). 
Here are the steps to follow:

1.  Make a subdirectory and copy your executable and all related files to it.
2.  Copy CONFIG.NT to this directory from C:\WINNT\SYSTEM32\CONFIG.NT.
3.  Edit the copy of CONFIG.NT in this directory, adding the line
         device=C:\WINNT\SYSTEM32\ANSI.SYS
4.  Right click on the icon for the executable file.
5.  Click Properties, then click the Program tab.
6.  Click the button at the bottom that says Windows NT ...
7.  Change the Config filename to the CONFIG.NT file in this directory.  For
example, if this directory is C:\TEMP, change the Config filename to
C:\TEMP\CONFIG.NT.
8.  Double click the icon for the executable file to run the program.

It's a mess compared to doing the same thing with Windows 95, but it can be
done.

- John Herro
You can download a shareware AdaTutor program at
http://members.aol.com/AdaTutor




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

* Re: ObjectAda and ANSI.SYS
  1998-06-17  0:00 ` Hans Marqvardsen
@ 1998-06-18  0:00   ` Steve Doiel
  1998-06-19  0:00     ` falis
  1998-06-18  0:00   ` Jerry van Dijk
  1 sibling, 1 reply; 10+ messages in thread
From: Steve Doiel @ 1998-06-18  0:00 UTC (permalink / raw)



Hans Marqvardsen wrote in message <3587B2D4.489C@ddre.dk>...
>Hans Marqvardsen wrote:
>>
>> I am reading Feldman&Koffman:Ada95 and would like to use their SCREEN
>> package on Windows NT4.0 (and also Windows 95).
>>
>> The book says I have to install ANSI.SYS first.
>>

I spent an hour or so trying to get this to work, then found an indication
in the NT help files that ANSI.SYS and CONFIG.NT don't apply to 32 bit NT
applications.

What follows is my implementation of the Screen package body that works.  It
is not optimal but it does the job.  It also requires Win32Ada which may be
obtained from the AdaIC.  Patches are available from Pascal Obry's web page.

SteveD
=========================================================


pragma Linker_Options( "-lkernel32" );
WITH Win32;
WITH Win32.WinNt;
WITH Win32.WinBase;
WITH Win32.WinCon;
WITH Ada.Text_Io;
WITH System;
PACKAGE BODY Screen IS
------------------------------------------------------------------------
--| Body of screen-handling package
--| Author: Michael B. Feldman, The George Washington University
--| Last Modified: July 1995
--| Modified SJD, Oct 1997 - NT Version
------------------------------------------------------------------------
  PACKAGE WinBase RENAMES Win32.Winbase;
  PACKAGE WinCon RENAMES Win32.WinCon;
  PACKAGE WinNt RENAMES Win32.WinNt;
  PACKAGE Text_Io RENAMES Ada.Text_Io;

  USE type Winnt.Handle;
  USE type Win32.BOOL;

  PROCEDURE Beep IS
  BEGIN
    Text_IO.Put (Item => ASCII.BEL);
  END Beep;
  PROCEDURE ClearScreen IS
  BEGIN
    FOR ii IN 1..Screen_Depth LOOP
      MoveCursor( 1, ii );
      Text_Io.Put( String'(1..Screen_Width => ' ') );
    END LOOP;
  END ClearScreen;
  PROCEDURE MoveCursor (Column : Width; Row : Depth) IS
    handle : Winnt.Handle;
    result : Win32.BOOL;
  BEGIN
    handle := WinBase.GetStdHandle( WinBase.STD_OUTPUT_HANDLE );
    result := WinCon.SetConsoleCursorPosition(
                  handle,
                  WinCon.COORD'( X => Win32.Short( Column ),
                                 y => Win32.Short( Row ) ) );
  END MoveCursor;
END Screen;







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

* Re: ObjectAda and ANSI.SYS
  1998-06-17  0:00 ` Hans Marqvardsen
  1998-06-18  0:00   ` Steve Doiel
@ 1998-06-18  0:00   ` Jerry van Dijk
  1998-06-19  0:00     ` Tom Grosman
  1 sibling, 1 reply; 10+ messages in thread
From: Jerry van Dijk @ 1998-06-18  0:00 UTC (permalink / raw)



Hans Marqvardsen (hm@ddre.dk) wrote:

: When I open a DOS window, and use the MEM /P command, the output
: confirms that ANSI.SYS is in fact installed;
: 	Name:ANSI, SIZE:1060, Type:DEVICE=

: However, 
: when I run Feldmans SMILEY procedure, 
: the output merely lists the escape sequenses
: without interpretation. 

Adding the ansi.sys driver will enable usage of ansi escape
sequences for DOS programs. MS does not support the use of
ansi for console based windows programs.

I modified Mike Feldmans SCREEN package to run on a Win32
system, you can find it on my homepage:

http://stad.dsl.nl/~jvandyk

Success,
Jerry.

-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada




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

* Re: ObjectAda and ANSI.SYS
  1998-06-17  0:00 ObjectAda and ANSI.SYS Hans Marqvardsen
  1998-06-17  0:00 ` Hans Marqvardsen
  1998-06-18  0:00 ` John Herro
@ 1998-06-19  0:00 ` ������
  2 siblings, 0 replies; 10+ messages in thread
From: ������ @ 1998-06-19  0:00 UTC (permalink / raw)



On Wed, 17 Jun 1998 11:06:25 +0100, Hans Marqvardsen <hm@ddre.dk>
wrote:

>I am reading Feldman&Koffman:Ada95 and would like to use their SCREEN
>package on Windows NT4.0 (and also Windows 95).
>
>The book says I have to install ANSI.SYS first.
>
>Can anybody please give specific directions on how to do this?
>
>Thanks in advance for any help, Hans

Add in your CONFIG.SYS file

...
DEVICE = C:\WINDOWS\COMMAND\ANSI.SYS
...

that's all

Anyway you should search "ANSI.SYS" file, first.
then DO apply it like above line in config.sys file.

Remind!!
  after all those acts, U must reboot your machine :-)




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

* Re: ObjectAda and ANSI.SYS
  1998-06-18  0:00   ` Jerry van Dijk
@ 1998-06-19  0:00     ` Tom Grosman
  1998-06-19  0:00       ` Tarjei Tj�stheim Jensen
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Grosman @ 1998-06-19  0:00 UTC (permalink / raw)



On Thu, 18 Jun 1998 22:49:47 GMT, jerry@jvdsys.nextjk.stuyts.nl (Jerry
van Dijk) wrote:

>Adding the ansi.sys driver will enable usage of ansi escape
>sequences for DOS programs. MS does not support the use of
>ansi for console based windows programs.
>
>I modified Mike Feldmans SCREEN package to run on a Win32
>system, you can find it on my homepage:
>
>http://stad.dsl.nl/~jvandyk
>
>Success,
>Jerry.

Actually, Windows95 DOES support using the ansi.sys driver for console
applications (I've successfully done this with an ObjectAda app.) Put
your ansi.sys declaration in config.sys and reboot (not just open a
new DOS command window.)

NT, as pointed out, does not support the ansi.sys driver. Don't ask me
why it's included in the NT system directory though.  I found a note
on the MicroSoft support site which says ansi.sys will not work for
NT. It is under consideration for future inclusion. That note was
several years old and referred to NT3.x. Perhaps MS is still
considering?

-Tom Grosman
Aonix




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

* Re: ObjectAda and ANSI.SYS
  1998-06-19  0:00     ` Tom Grosman
@ 1998-06-19  0:00       ` Tarjei Tj�stheim Jensen
  0 siblings, 0 replies; 10+ messages in thread
From: Tarjei Tj�stheim Jensen @ 1998-06-19  0:00 UTC (permalink / raw)





Tom Grosman  wrote:
NT, as pointed out, does not support the ansi.sys driver. Don't ask me
why it's included in the NT system directory though.  I found a note
on the MicroSoft support site which says ansi.sys will not work for
NT. It is under consideration for future inclusion. That note was
several years old and referred to NT3.x. Perhaps MS is still
considering?


NT has a ansi.sys driver for "dos" windows. It is just that you have to
enable it. Jerry van Dijk just posted a note on how to enable the ansi
dirver on NT.


Greetings,







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

* Re: ObjectAda and ANSI.SYS
  1998-06-18  0:00 ` John Herro
@ 1998-06-19  0:00   ` Kevin Radke
  0 siblings, 0 replies; 10+ messages in thread
From: Kevin Radke @ 1998-06-19  0:00 UTC (permalink / raw)



In article <1998061820484300.QAA03489@ladder03.news.aol.com>,
John Herro <johnherro@aol.com> wrote:
>Hans Marqvardsen <hm@ddre.dk>
>is having trouble running a program
>that requires ANSI.SYS under Windows NT.
>
>Running a program that needs ANSI.SYS under Windows NT is a hassle, but it can
>be done.  My AdaTutor program is one such program, and, while it's easy to
>install ANSI.SYS for Windows 95, several customers called me because of
>difficulty running the program under Windows NT.  (BTW, we're working on a
>Windows version, to be called AdaEase, which of course won't need ANSI.SYS). 
>Here are the steps to follow:
>
>1.  Make a subdirectory and copy your executable and all related files to it.
>2.  Copy CONFIG.NT to this directory from C:\WINNT\SYSTEM32\CONFIG.NT.
>3.  Edit the copy of CONFIG.NT in this directory, adding the line
>         device=C:\WINNT\SYSTEM32\ANSI.SYS
>4.  Right click on the icon for the executable file.
>5.  Click Properties, then click the Program tab.
>6.  Click the button at the bottom that says Windows NT ...
>7.  Change the Config filename to the CONFIG.NT file in this directory.  For
>example, if this directory is C:\TEMP, change the Config filename to
>C:\TEMP\CONFIG.NT.
>8.  Double click the icon for the executable file to run the program.
>
>It's a mess compared to doing the same thing with Windows 95, but it can be
>done.

This doesn't work with 32bit windows "console" applications, which
is what OA is producing.  I.E. 32bit programs do not have a "program"
tab in properties...

Kevin






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

* Re: ObjectAda and ANSI.SYS
  1998-06-18  0:00   ` Steve Doiel
@ 1998-06-19  0:00     ` falis
  0 siblings, 0 replies; 10+ messages in thread
From: falis @ 1998-06-19  0:00 UTC (permalink / raw)



> Hans Marqvardsen wrote in message <3587B2D4.489C@ddre.dk>...
> >Hans Marqvardsen wrote:
> >>
> >> I am reading Feldman&Koffman:Ada95 and would like to use their SCREEN
> >> package on Windows NT4.0 (and also Windows 95).
> >>
> >> The book says I have to install ANSI.SYS first.
> >>
> 
> I spent an hour or so trying to get this to work, then found an indication
> in the NT help files that ANSI.SYS and CONFIG.NT don't apply to 32 bit NT
> applications.
> 
> What follows is my implementation of the Screen package body that works.  It
> is not optimal but it does the job.  It also requires Win32Ada which may be
> obtained from the AdaIC.  Patches are available from Pascal Obry's web page.
> 
> SteveD


Since Hans asked about ObjectAda, note that Win32Ada is shipped as part of the OA distribution.

- Ed Falis
Aonix




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

end of thread, other threads:[~1998-06-19  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-17  0:00 ObjectAda and ANSI.SYS Hans Marqvardsen
1998-06-17  0:00 ` Hans Marqvardsen
1998-06-18  0:00   ` Steve Doiel
1998-06-19  0:00     ` falis
1998-06-18  0:00   ` Jerry van Dijk
1998-06-19  0:00     ` Tom Grosman
1998-06-19  0:00       ` Tarjei Tj�stheim Jensen
1998-06-18  0:00 ` John Herro
1998-06-19  0:00   ` Kevin Radke
1998-06-19  0:00 ` ������

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