ObjectAda and ANSI.SYS 
Author Message
 ObjectAda and ANSI.SYS

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.



Sun, 03 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS

Quote:

> 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



Sun, 03 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS


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



Mon, 04 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS

Quote:


>> 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;



Mon, 04 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS

: 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.

--

-- Leiden, Holland | member Team-Ada



Mon, 04 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS

Quote:


> >> 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



Tue, 05 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS



Quote:
>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 :-)



Tue, 05 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS


Quote:

>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



Tue, 05 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS

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,



Tue, 05 Dec 2000 03:00:00 GMT  
 ObjectAda and ANSI.SYS


Quote:


>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



Tue, 05 Dec 2000 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Ansi.sys for REXX

2. ANSI.SYS Install Detection

3. ANSI.SYS Install Detection

4. ANSI.SYS

5. ANSI.SYS Install Detection

6. ANSI.SYS Install Detection

7. Ansi.sys

8. NT, ANSI.SYS, and Ada 95

9. Goofy behavior with ANSI.SYS

10. Using DOSKEY with ANSI.sys?

11. Using ANSI.SYS

12. DVF6.0, NT and ANSI.SYS

 

 
Powered by phpBB® Forum Software