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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c5f189513e1f5f8a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada as a first language From: "Peter C. Chapin" References: <01d59695$0$20632$c3e8da3@news.astraweb.com> Message-ID: User-Agent: Xnews/5.04.25 Date: 25 Mar 2009 10:51:44 GMT Organization: SoVerNet (sover.net) NNTP-Posting-Host: 98901e81.news.sover.net X-Trace: DXC=jA_RekMX:M7hPH]YHR;=o6K6_LM2JZB_3j6UVU5EV[H33?@`i3kGa5;\de^QGV Brian Drummond 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