From: Xianzheng Zhou <joe@lgsolutions.com.au>
Subject: Re: Help writing ada booting kernel
Date: Mon, 16 Jul 2007 21:01:40 +1000
Date: 2007-07-16T21:01:40+10:00 [thread overview]
Message-ID: <f7fj6l$7ri$1@aioe.org> (raw)
In-Reply-To:
hi Wiktor,
Thanks for your explanation:)
I was actually trying to write a kernel like this(not grub, I used grub
as an example since I need to figure out how to do standalone booting
program). This is a good example exactly what I was looking for.
Joe
Wiktor Moskwa wrote:
> On 16.07.2007, Xianzheng Zhou <joe@lgsolutions.com.au> wrote:
>> In the example, int.S and boot.S are in assembly code. Is there a way to
>> write this part in Ada?
>>
>
> In boot.S you need a way to pass values of two registers (EAX and EBX)
> to the main procedure through stack - that's where Ada expects parameters.
> The code in int.S can't be put in procedures because interrupt handlers
> don't behave like procedures (stack frame has different format).
>
> If a compiler supported "bare x86" target it wouldn't probably be
> a problem. For example if you compile something for AVR microcontroler
> using AVR-GCC, interrupt handlers are ordinary blocks of code wrapped
> in special macros - all necessary assembly code is generated by the
> compiler.
>
next prev parent reply other threads:[~2007-07-16 11:01 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
2007-07-16 1:59 ` Xianzheng Zhou
2007-07-16 6:07 ` Wiktor Moskwa
2007-07-16 11:01 ` Xianzheng Zhou [this message]
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