comp.lang.ada
 help / color / mirror / Atom feed
From: Wiktor Moskwa <wiktorDOTmoskwa@gmail.com>
Subject: Re: Help writing ada booting kernel
Date: Sun, 15 Jul 2007 14:44:49 +0000 (UTC)
Date: 2007-07-15T14:44:49+00:00	[thread overview]
Message-ID: <f7dbt1$snm$1@atlantis.news.tpi.pl> (raw)
In-Reply-To: f7d8vk$4tt$1@aioe.org

On 15.07.2007, Xianzheng Zhou <joe@lgsolutions.com.au> 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/

-- 
Wiktor Moskwa



  reply	other threads:[~2007-07-15 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-15 13:55 Help writing ada booting kernel Xianzheng Zhou
2007-07-15 14:44 ` Wiktor Moskwa [this message]
2007-07-16  1:59   ` Xianzheng Zhou
2007-07-16  6:07     ` Wiktor Moskwa
2007-07-16 11:01       ` Xianzheng Zhou
2007-07-16 11:18       ` Xianzheng Zhou
2007-07-16 12:21         ` Wiktor Moskwa
2007-07-16 21:02         ` anon
2007-07-17  9:15           ` Xianzheng Zhou
2007-07-16  3:02 ` anon
2007-07-16 11:16   ` Xianzheng Zhou
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox