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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db8388c6b42d398 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: How do I go about creating a minimal GNAT runtime? Reply-To: no to spamers (No@email.given.org) References: <0zPnl.16758$YU2.10131@nlpi066.nbdc.sbc.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sat, 21 Feb 2009 16:41:27 GMT NNTP-Posting-Host: 12.64.90.178 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1235234487 12.64.90.178 (Sat, 21 Feb 2009 16:41:27 GMT) NNTP-Posting-Date: Sat, 21 Feb 2009 16:41:27 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:4699 Date: 2009-02-21T16:41:27+00:00 List-Id: First, thing you need to do, is to decide on what you want your RTL system for. That we can not help you. As for the 64k RTL, Forget it. The size depends upon what you want the RTL to be able to do. And are you talking about Stand-Alone OS or using limited links into the OS. Well there are many ways to try to do the job. Here are a few ideas. First. Use "pagma Ravenscar ;". Limits some of the RTL. In some cases, it can reduce the dead code. Second, use "pragma Restrictions" and "pragma Suppress" to remove unused packages and checks that add a large group of routines that you may not need, such as exceptions. Which means, trap your own errors instead of letting the compiler do it. Third, use simple replacement packages like GNAT.IO instead of Ada.Text_IO which contains routines for files and stream I/O as well as exceptions. This, is not standard but it can remove alot of dead code. Fourth, you can always fall back and use mix languages, like using C for the RTL. But at some point you will use another lang. becase GNAT and other version of Ada mostly use links to the OS. for files and interrupts handling. One person, back in the late 1990s rewote the GNAT Ada RTL packages to use mostly "pragma Import" statement to the C and OS compiler libraries. But that not true Ada it C. And then there the obsolete feature "pragma No_Run_Time ;". This statement allows the 4K footprint. Note: Will this feature be there in the next version of GNAT Ada? Only time will tell. Now, for simpler full feature RTL (based on RM), you might rework the GNAT RTL, but there is not a lot that you can do. You might save a little memory but for the amount of time you spend, it not worth it. No where near the limits you are looking for. The only way is to write a miminal RTL is to write a Stand-Alone OS. But be prepared to spend years of research and writting code just to find out your OS will no longer work on those PC at that time. Outdated before you start! You need a plan wih team that can get job done within a year or so. But that's a full time job. In <0zPnl.16758$YU2.10131@nlpi066.nbdc.sbc.com>, Dimonax writes: >On Sat, 24 Jan 2009 12:47:54 -0800, Lucretia wrote: > >> Hi (again), >> > >Hi! > >Actually I've been learning my way around the Ada Runtime for similiar >reasons. I say similiar because the goal is different. > >I'm a demoscene hacker. Anyone who knows that is knows that a demo >usually requires a very small footprint.(Look up the 4k demos that have >been posted up online.) > >While my goals arent that lofty, I would like to build a runtime that I >could fit into a demo that's less than 1024k if at all possible. 64k is >preferred. > >I want the concurrency features mostly, but I love the power of the full >typing system. > >It's pretty easy to build executables using shared libraries (-bargs - >shared under gnat-gcc) that are tiny. But I need to get the whole system >down as tiny as possible. > >So, sound like we have similiar plans even though the goals are different? > >Anyone else here looking to do the same? > >Freejack >