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-Thread: 103376,7d661b6f053d692e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!aioe.org!not-for-mail From: Xianzheng Zhou Newsgroups: comp.lang.ada Subject: Re: Help writing ada booting kernel Date: Mon, 16 Jul 2007 21:16:35 +1000 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: Brjar1TMMVF3nEKPGBV4Hg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org In-Reply-To: User-Agent: Thunderbird 1.5.0.12 (X11/20070604) Xref: g2news1.google.com comp.lang.ada:16487 Date: 2007-07-16T21:16:35+10:00 List-Id: Hi Anon, Thanks for your reply. I'll try to figure out how to use Import/Export pragma or Ada asm. I learned Ada when I was still in Uni, one of the course used it, which is called concurrent and distributed system. I can use Ada's high level features, but I never used its low level power and it's hard to find examples on web resources. Joe anon wrote: > But Ada was never meant to be use as a Stand-Alone program without > some kind of interface code from the BOOT ROM to the main procedure. > > So unless you purchase an Ada compile, which can produce Stand-Alone > code you must write a bootloader for your Ada program. This bootloader > is normally written in either C or Assembly., This is because the Free > GNAT Ada Compiler/Binder/Linker does not include a way of creating > Stand-Alone code. > > As for low-level code, you have two options. The first is to use the > pragma Import/Export statement. While the second is to use the > Ada ASM instruction and build your assembly routines. > > The Best thing is go to your local book store and see if they have any > books on Ada. The other is to check out http://www.adapower.com > > > > > In , Xianzheng Zhou writes: >> Hello all, >> I'm a new to Ada and very interested in learning this language. >> Currently, I'm trying to write a small program in ada compiled by gnat, >> to boot an ordinary PC, something like grub. I'm wonderring whether >> ada can do this low-level task and how may I use the gnat progma to >> achieve this. Please advise if you know how to do this. >> >> Many thanks. >> >> Joe >