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!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!amsnews11.chello.com!nuzba.szn.dk!pnx.dk!news.ecp.fr!aioe.org!not-for-mail From: Xianzheng Zhou Newsgroups: comp.lang.ada Subject: Re: Help writing ada booting kernel Date: Tue, 17 Jul 2007 19:15:40 +1000 Organization: Aioe.org NNTP Server Message-ID: References: <02Rmi.172256$Sa4.82577@bgtnsc05-news.ops.worldnet.att.net> 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 User-Agent: Thunderbird 1.5.0.12 (X11/20070604) X-Original-Bytes: 4018 Xref: g2news1.google.com comp.lang.ada:16498 Date: 2007-07-17T19:15:40+10:00 List-Id: That was quite a time-consuming approach, I guess I'll leave it in assembly code for the time being until it's getting necessary to change it:) Thanks for your detailed suggestion anyway. anon wrote: > 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 , Xianzheng Zhou 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 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. >>> >