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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Help writing ada booting kernel Reply-To: anon@anon.org (anon) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <02Rmi.172256$Sa4.82577@bgtnsc05-news.ops.worldnet.att.net> Date: Mon, 16 Jul 2007 21:02:52 GMT NNTP-Posting-Host: 12.64.204.118 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1184619772 12.64.204.118 (Mon, 16 Jul 2007 21:02:52 GMT) NNTP-Posting-Date: Mon, 16 Jul 2007 21:02:52 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:16493 Date: 2007-07-16T21:02:52+00:00 List-Id: 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. >>