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,7ca2a48dd8ded0e5 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: minimal hardware for ada (newbie) Date: 1999/04/13 Message-ID: <3713B19B.21D6B228@averstar.com>#1/1 X-Deja-AN: 466033068 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <370d1d3c.9231283@news.hrz.uni-kassel.de> <370E6EF2.AAA57538@averstar.com> <370F8179.BF571FDB@icon.fi> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-04-13T00:00:00+00:00 List-Id: Niklas Holsti wrote: > > Tucker Taft wrote: > > > > We have developed (and recently validated) a version of our > > AdaMagic technology which uses optimized ANSI C as its intermediate > > representation. One of the reasons was to allow a programming team to > > write their source code in Ada, while relying only on the availability > > of an ANSI C compiler for their chosen target. We also have > > a version of the Ada run-time that at the lowest level depends > > only on routines included in the standard ANSI C run-time. > > I'm working on an I8051 program to control a space-based instrument, > and have again experienced the pain of working in C. Using > AdaMagic-to-C would have been nice, however I think it would > only be practical if one can make the C code use the typical > I8051 C extensions to ANSI C, such as controlling the memory space > for each variable. In Keil C51, for example, one of the new > keywords 'data', 'idata', 'pdata' or 'xdata' is placed in the > variable declaration between the type-id and the variable-id > to determine the memory space. > > While one could implement one's own postprocessor to mutilate the > C code in this way, it would be simpler and safer to make the > necessary annotations in the Ada code, perhaps as pragmas on > the variables or types. Does AdaMagic provide anything like this? Not currently, though using pragma "Convention" for this might make sense. We have looked into something like this for a digital signal processor which has two memory spaces. Because we are generating C source as the intermediate, it is a relatively small effort to add this kind of thing. By constrast, if we were generating machine code directly, it would obviously be a big deal to add support for multiple memory spaces. > Moreover, given the limited architecture of the I8051, it seems > unlikely that a run-time using only ANSI C routines could perform > within an order of magnitude of a kernel designed for the > I8051. Any data on this? For example, how does your ANSI-C-based > run-time handle the stack when switching tasks? The run-time is in two layers, the upper layer is written in Ada, and is fully portable between targets. The lower layer is also mostly written in Ada, with a bit of assembler or C thrown in, and multiple versions exist, depending on the underlying kernel. The "pure C" version makes use of setjmp/longjmp for task stack switching. Other versions use the thread primitives provided by the underlying kernel. > TIA > > Niklas Holsti > Working at but not speaking for Space Systems Finland Ltd. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA