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!news1.google.com!news.glorb.com!news2.arglkargh.de!feeder.erje.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 11:59:03 +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:16479 Date: 2007-07-16T11:59:03+10:00 List-Id: Hi Wiktor, Thanks for your reply. That really helps. This is exactly the example I need. :) In the example, int.S and boot.S are in assembly code. Is there a way to write this part in Ada? Wiktor Moskwa wrote: > On 15.07.2007, Xianzheng Zhou wrote: >> 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. > > Hi, > > First of all if you want to experiment with writing a native program > don't write your own bootloader, please :-) > GRUB multiboot specification is a good place to start if you don't > want to waste a lot of time fighting with weird x86 architecture. > > By learning Ada this way you will miss many features that Ada run-time > provides (tasking, secondary stack, exceptions, standard library, etc.). > > If you still want to try, I can provide a piece of code to start with. > Some time ago I wanted to experiment with native programs, you can > download the results - it's a small native program that starts in > protected mode, loads GDTR, enables memory paging and prints few > things directly to VGA memory. > It compiles with GNAT GPL and can be tested with bochs or qemu. > Feel free to ask if something is not clear in the code or build script. > > http://hoborg.zapto.org/AdaExpOs.tgz > > For something serious you can check out Marte OS: http://marte.unican.es/ >