comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Help writing ada booting kernel
Date: Mon, 16 Jul 2007 21:02:52 GMT
Date: 2007-07-16T21:02:52+00:00	[thread overview]
Message-ID: <02Rmi.172256$Sa4.82577@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: f7fk6i$agf$2@aioe.org

It is possible but you have to know the linker that you are using. 
Then you must:

    Rewrite the bootloader aka the asm packages in ada.
	Secondly define a procedure to handle Ada elaborate schemes
        Must define a file system for your program if you need to load 
        any data files.

    Then create a linker build file aka the linker script file 
	which defines the programs external variable and procedures.
           (For GNAT Ada it has a lot of variable and routines, that 
            must be defined)

    Afterward use either boch or qemu to test and debug.  

As for another kernel type of sample type the Toy_Lovelace packages 
1..6. Package 2 builds on package 1, and so go. But he still uses a 
couple of assembly routines. Also it is based on the SimpleOS (SOS) 
version written in C/Assembly so if you know C you can learn from 
looking a both set of packages and programs.  The only problem is no 
documentation for the Toy_Lovelace version and and most variable are 
in french. The SOS's documentation is in PDF format written in 
French. The SOS was a set of articles that were published in a Linux 
Mag, French version 2004-2006. Do a google search on "Simple OS" 
(SOS) to find the packages.  The SOS web page as links for the Ada 
Toy_Lovelace kernels.

For what you are trying to do. You should allocate 8 hrs a day for the 
next 2 months. just to get a simple program to work. More complex try 
1 year. The reason is there are no documention or sample code you can 
build from.  And C does not follow Ada elaboration, etc. schemes.

As for the Time table well I know because I am wriiting a True Pure 
Ada-OS. And this code will not be a redesigned of a Posix or Linux 
based kernel.  It will only run only Pure Ada-83/95 recompled code 
(at the moment Ada-83/95 only).  

In <f7fk6i$agf$2@aioe.org>, Xianzheng Zhou <joe@lgsolutions.com.au> writes:
>Just wonderring, is it possible to replace int.S and boot.S using ada 
>asm inline assembly instruction?
>
>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.
>> 




  parent reply	other threads:[~2007-07-16 21:02 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
2007-07-16 11:18       ` Xianzheng Zhou
2007-07-16 12:21         ` Wiktor Moskwa
2007-07-16 21:02         ` anon [this message]
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