comp.lang.ada
 help / color / mirror / Atom feed
* GNAT-DOS delay bug
@ 1999-08-11  0:00 Rob Allen
  1999-08-11  0:00 ` David C. Hoos, Sr.
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rob Allen @ 1999-08-11  0:00 UTC (permalink / raw)


Delay statements crash NTVDM under NT4.0 sp3 using the GNAT DOS
compiler.

Specifically I am using EZ2LOAD, that is, GNAT3.10 DOS with DJGPP 2.01
(Why not the 3.11 Win32 GNAT?  Because I also want to run the code on a
486 to control a model railroad -- to teach real-time programming
including interrupt handling.  Am I wrong in this approach?)  The bug
shows up on Pentium Pros and IIs all running NT4.0sp3.

The problem is that delay statements (except delay 0.0) produce illegal
memory refs to 0xFFFFFFFF immediately crashing the run whether running
the EXE directly or via the adacaps Run.
Specifically,
"ntvdm.exe - Application Error
The instruction at "0x0f003084" referenced memory at "0xffffffff".  The
memory could not be "read".
Click on OK to terminate ....
"

Is this a known bug?  Anyone else had experience with EZ2LOAD under NT ?

Thanks for any help you can give.  Please email as well as post reply.

rob

--
*********************************************************************************

Dr Rob Allen            Web: http://www.it.swin.edu.au/staff/rallen/
School of Information Technology    phone: +61 3 92148587
Swinburne University of Technology         Fax: +61 3 98190823
PO Box 218, Hawthorn, VICTORIA 3122 AUSTRALIA
EMail:RAllen@swin.edu.au
*********************************************************************************







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

* Re: GNAT-DOS delay bug
  1999-08-11  0:00 GNAT-DOS delay bug Rob Allen
@ 1999-08-11  0:00 ` David C. Hoos, Sr.
  1999-08-11  0:00 ` Robert Dewar
  1999-08-11  0:00 ` jerry
  2 siblings, 0 replies; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-11  0:00 UTC (permalink / raw)



Rob Allen <rob@it.swin.edu.au> wrote in message
news:37B1346B.4084A7D3@it.swin.edu.au...
> Delay statements crash NTVDM under NT4.0 sp3 using the GNAT DOS
> compiler.
>
> Specifically I am using EZ2LOAD, that is, GNAT3.10 DOS with DJGPP 2.01
> (Why not the 3.11 Win32 GNAT?  Because I also want to run the code on a
> 486 to control a model railroad -- to teach real-time programming
> including interrupt handling.  Am I wrong in this approach?)  The bug
> shows up on Pentium Pros and IIs all running NT4.0sp3.
>
> The problem is that delay statements (except delay 0.0) produce illegal
> memory refs to 0xFFFFFFFF immediately crashing the run whether running
> the EXE directly or via the adacaps Run.
> Specifically,
> "ntvdm.exe - Application Error
> The instruction at "0x0f003084" referenced memory at "0xffffffff".  The
> memory could not be "read".
> Click on OK to terminate ....
> "
>
> Is this a known bug?  Anyone else had experience with EZ2LOAD under NT ?
>

I would think the better course is to write as portable source code as
possible (isolating the interfaces to the railroad control ports, in case
they cannot be written in an entirely portable way across the platforms
of interest), and then use the compiler targeted to the actual host.

I have written a number of programs to run on DOS, Win95, NT, and Linux
platforms, where the source code differences were limited to screen
handling (due to lack of ANSI.SYS on NT), and serial port differences.

I used gnatprep to produce (from common source) the files compilable on
the target platform.

As a consequence of my approach, I never expected my DOS-targeted code
to run in the NT Command Prompt window.

You might also want to enquire at  gnatlist@SEAS.GWU.EDU which is the
mail list for GNAT on DOS.






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

* Re: GNAT-DOS delay bug
  1999-08-11  0:00 GNAT-DOS delay bug Rob Allen
  1999-08-11  0:00 ` David C. Hoos, Sr.
@ 1999-08-11  0:00 ` Robert Dewar
  1999-08-11  0:00   ` Aidan Skinner
  1999-08-11  0:00 ` jerry
  2 siblings, 1 reply; 5+ messages in thread
From: Robert Dewar @ 1999-08-11  0:00 UTC (permalink / raw)


In article <37B1346B.4084A7D3@it.swin.edu.au>,
  RAllen@swin.edu.au wrote:
> Specifically I am using EZ2LOAD, that is, GNAT3.10 DOS with
DJGPP 2.01
> (Why not the 3.11 Win32 GNAT?  Because I also want to run the
code on a
> 486 to control a model railroad -- to teach real-time
programming
> including interrupt handling.  Am I wrong in this approach?)
The bug
> shows up on Pentium Pros and IIs all running NT4.0sp3.
>
> The problem is that delay statements (except delay 0.0)
produce illegal
> memory refs to 0xFFFFFFFF immediately crashing the run whether
running
> the EXE directly or via the adacaps Run.

Yes, this is most certainly a bug. It is unlikely that it can
be fixed in the ancient version of the compiler you are using.
I don't know if the DOS version ever got upgraded to 3.11, you
could contact Mike Feldman for details -- or perhaps he will
see this and answer.

I would definitely switch to the NT/Win95 version, and then
figure out how to send the necessary control signals to your
model railroad stuff using the Win32 API. Of course if you
have specialized boards and so on that you are plugging in,
then you would have to write drivers for them, which is not
trivial (though certainly possible).


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: GNAT-DOS delay bug
  1999-08-11  0:00 GNAT-DOS delay bug Rob Allen
  1999-08-11  0:00 ` David C. Hoos, Sr.
  1999-08-11  0:00 ` Robert Dewar
@ 1999-08-11  0:00 ` jerry
  2 siblings, 0 replies; 5+ messages in thread
From: jerry @ 1999-08-11  0:00 UTC (permalink / raw)


Rob Allen <rob@it.swin.edu.au> wrote:

: Delay statements crash NTVDM under NT4.0 sp3 using the GNAT DOS
: compiler.

If you code runs fine under DOS, you might have run into a NT limitation.

You might want to post a example program to gnatlist...

-- 
-- Jerry van Dijk | Leiden, Holland
-- Team Ada       | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk




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

* Re: GNAT-DOS delay bug
  1999-08-11  0:00 ` Robert Dewar
@ 1999-08-11  0:00   ` Aidan Skinner
  0 siblings, 0 replies; 5+ messages in thread
From: Aidan Skinner @ 1999-08-11  0:00 UTC (permalink / raw)


On Wed, 11 Aug 1999 17:14:20 GMT, Robert Dewar
<robert_dewar@my-deja.com> wrote: 

>I don't know if the DOS version ever got upgraded to 3.11, you

I believe it did, although I don't think it had tasking implemented. I
think that the 3.10 version is complete, although don't hate me if
that's wrong. <g>

- Aidan
-- 
Gimme money, gimme sex, gimme UNIX and root access.
http://www.skinner.demon.co.uk/aidan/




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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-11  0:00 GNAT-DOS delay bug Rob Allen
1999-08-11  0:00 ` David C. Hoos, Sr.
1999-08-11  0:00 ` Robert Dewar
1999-08-11  0:00   ` Aidan Skinner
1999-08-11  0:00 ` jerry

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