comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Re: Ada as a first language
Date: 25 Mar 2009 10:51:44 GMT
Date: 2009-03-25T10:51:44+00:00	[thread overview]
Message-ID: <Xns9BD945C15C78pcc482719gmailcom@198.186.192.137> (raw)
In-Reply-To: r33fs4h5di2v0si3k8mi2vetqeglsdchfu@4ax.com

Brian Drummond <brian_drummond@btconnect.com> wrote in
news:r33fs4h5di2v0si3k8mi2vetqeglsdchfu@4ax.com: 

> which is why I suggested "fit and forget" for the C libraries. If they
> just work, you have saved time. If not... I'd rather use Ada for
> interfacing. Does AdaMagic have trouble translating low level code
> like interrupt handlers or representation clauses?

It has a configuration file where you describe the various 
characteristics of the underlying C compiler (sizes of the C basic 
types, endianness, etc). It uses this information to generate 
appropriate C code. When I set up the configuration file I had to run a 
few test programs using the C compiler to find out what it did in some 
cases. The documentation that came with the C compiler was not specific 
enough. In our project, which is fairly simple, we have not (yet) had 
the need to use representation clauses, but I assume they would work 
given the knowledge AdaMagic has about the C compiler's basic types, 
etc.

Also in our project we have only two simple interrupt handlers so we 
(the student) just wrote them in C. Essentially our device spends most 
of its time in a deep sleep mode and then is awakened by an interrupt. 
The Ada code calls a procedure, implemented in C, that puts the 
processor to sleep. That procedure won't return until it is awakened... 
something that is done in the interrupt handler. In fact that's 
basically all the interrupt handler does.


> AdaMagic doesn't look free, which may be a consideration for personal
> experiments.

That's right. It is a non-free product for sure. One nice think about 
working in academia is that I can often get commercial toys cheap. :-)


Peter



  reply	other threads:[~2009-03-25 10:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-22  2:26 Ada as a first language Chris
2009-03-22 10:36 ` mockturtle
2009-03-22 14:44 ` Brian Drummond
2009-03-23 11:03   ` Peter C. Chapin
2009-03-23 13:29     ` Brian Drummond
2009-03-25 10:51       ` Peter C. Chapin [this message]
2009-03-23 16:59   ` rolf.ebert_nospam_
2009-03-24 19:22   ` Tim Rowe
2009-04-04  1:42     ` Brian Gaffney
2009-04-07  9:50       ` Alex R. Mosteo
2009-03-22 15:21 ` Gary Scott
2009-03-23  8:28 ` Brian
2009-03-23  9:05   ` Jacob Sparre Andersen
2009-03-23 22:02     ` Brian
2009-03-24  1:41       ` Gautier
2009-03-24  5:56       ` Jacob Sparre Andersen
2009-03-24 22:30         ` Brian
2009-03-25  9:41           ` rmoldskr+usenet
2009-03-25 22:27             ` Brian
2009-03-25 17:58       ` John McCormick
2009-03-25 23:20         ` Brian
2009-03-23 12:08 ` Chris
2009-03-25 21:10   ` John McCormick
2009-04-11 16:40   ` Mike Silva
2009-03-23 23:05 ` jpwoodruff
2009-03-25  0:16 ` Martin
2009-03-25 15:54 ` John McCormick
  -- strict thread matches above, loose matches on Subject: below --
1997-07-03  0:00 Ada as a First Language RC
1997-07-03  0:00 ` Michael Feldman
1997-07-06  0:00 ` Alan Brain
1997-07-06  0:00   ` Robert Dewar
1997-07-16  0:00   ` Eric James DeArment
1997-07-07  0:00 ` Shmuel (Seymour J.) Metz
1992-12-29 15:40 agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!vx9000.weber.edu!
replies disabled

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