From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d5d3f798891fda5a X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: GNAT-DOS delay bug Date: 1999/08/11 Message-ID: <7orod4$cmj@hobbes.crc.com>#1/1 X-Deja-AN: 511439962 References: <37B1346B.4084A7D3@it.swin.edu.au> Organization: Coleman Research Corporation X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Newsgroups: comp.lang.ada Date: 1999-08-11T00:00:00+00:00 List-Id: Rob Allen 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.