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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac55ec18f7b0a53c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-05 21:18:41 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3B1DACF1.C643AF4A@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada and embedded applications References: <9fh0v9$dob$1@nh.pace.co.uk> <9finbs$2ft$1@nh.pace.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 06 Jun 2001 04:09:48 GMT NNTP-Posting-Host: 209.86.208.108 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 991800588 209.86.208.108 (Tue, 05 Jun 2001 21:09:48 PDT) NNTP-Posting-Date: Tue, 05 Jun 2001 21:09:48 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Tue, 05 Jun 2001 21:07:51 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:8206 Date: 2001-06-06T04:09:48+00:00 List-Id: Marin David Condic wrote: > > I wouldn't say that it is *impossible* to get an Ada program into 512 bytes > of memory, but you'd have to have a compiler that made it possible to build > code with no runtime (like GNORT) or you might find yourself dragging along > way too much other stuff. Technically speaking, I don't think this is a > *language* problem - more one of a *linkage* problem. There may be some > language issues such as this: I write a single procedure to run in my 512 > bytes of memory. Will Ada demand that there be some kind of > elaboration/initialization/finalization that takes place such that I've got > to drag along more stuff than I need? Could a compiler be built (and would > it be *legal* Ada or a subset?) that was smart enough to detect that my > single procedure program required nothing but jumping to the starting > address and executing from there? I'd suspect thjat the answer is "Yes, but > it may require bending language rules and will certainly require you don't > use specific features." Pragma Preelaborate exists to allow the elimination of elaboration, including initialization. Obviously you can't use controlled types in a pre-elaborable unit, so finalization disappears, too. I would think that if you can get the compiler to accept your procedure with pragma Preelaborate that it would do what you want. -- Jeff Carter "I blow my nose on you." Monty Python & the Holy Grail