Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ada port of the osdev.org bare bones tutorial (mostly done)

92 views
Skip to first unread message

Lucretia

unread,
Jun 13, 2012, 4:12:10 PM6/13/12
to
Hi,

I have created this port and it currently works for PC, you can get more info here: http://www.archeia.com/ada-bare-bones-port.html and also I put up a screenshot here http://imagebin.org/216278.

Luke.

Shark8

unread,
Jun 13, 2012, 4:46:26 PM6/13/12
to
Nice!

Stepan Bujnak

unread,
Jun 15, 2012, 8:24:22 AM6/15/12
to
Just last week I was checking out whether there is something about Ada on the osdev.org wiki. Thanks for the article and definitely looking forward to read about Raspberry PI bare bones.

Lucretia

unread,
Jun 15, 2012, 9:06:47 AM6/15/12
to
On Friday, June 15, 2012 1:24:22 PM UTC+1, Stepan Bujnak wrote:

> Just last week I was checking out whether there is something about Ada on the osdev.org wiki. Thanks for the article and definitely looking forward to read about Raspberry PI bare bones.

No problem, like I mention in the tutorial, it's asked about a lot on #Ada and also here. There was a thread on here recently where someone requested it, I thought, as I'd done it before, it was worth doing and would also force me to get started on TAMP as I could use it as a starting block. Also, anyone else can use it as a starting block as the code is under BSD, apart from the library code of course.

Luke.

Lucretia

unread,
Jun 15, 2012, 9:14:06 AM6/15/12
to
I've also posted a bug to GCC's bug tracker as I'm lead to believe it's possible to declare and use your own exceptions with local exception handling, but it's failing.

I don't know if AdaCore people still read this, but it would be interesting to know if it is possible or not and if it is can I get a patch?

Luke.

Robert A Duff

unread,
Jun 15, 2012, 5:46:28 PM6/15/12
to
Lucretia <lague...@googlemail.com> writes:

> I don't know if AdaCore people still read this, but it would be
> interesting to know if it is possible or not and if it is can I get a
> patch?

I am an AdaCore person. I read this newsgroup once in a while.
Not very often.

AdaCore doesn't harvest bug reports from here, nor offer free
support, but if you send a bug report to AdaCore, we will fix
it, assuming it really is a bug. Quickly, if you are a supported
customer, or slowly, if it's a report from the "general public".

I didn't follow this thread, so I've no idea what the alleged
bug is.

- Bob

Patrick

unread,
Jun 15, 2012, 6:22:43 PM6/15/12
to
Thanks Lucretia!

This will be a big help-Patrick

Lucretia

unread,
Jun 15, 2012, 6:41:44 PM6/15/12
to
On Friday, June 15, 2012 10:46:28 PM UTC+1, Robert A Duff wrote:

> it, assuming it really is a bug. Quickly, if you are a supported
> customer, or slowly, if it's a report from the "general public".

P.S: I'm too skint to be a paying customer, I'm an individual not a company and my project is exactly that, mine - and open source.

Luke.

Lucretia

unread,
Jun 15, 2012, 6:40:17 PM6/15/12
to
On Friday, June 15, 2012 10:46:28 PM UTC+1, Robert A Duff wrote:

> I am an AdaCore person. I read this newsgroup once in a while.
> Not very often.
>
> AdaCore doesn't harvest bug reports from here, nor offer free
> support, but if you send a bug report to AdaCore, we will fix
> it, assuming it really is a bug. Quickly, if you are a supported
> customer, or slowly, if it's a report from the "general public".
>
> I didn't follow this thread, so I've no idea what the alleged
> bug is.

Hi, the bug is whether a configurable runtime allows declaration of own exceptions or if we are limited to using the language defined ones. The compiler allows declaring one, but tries to use a-except when trying to raise one, i have posted a bug report to gnu, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53684.

How do I send in bug reports to AdaCore? Just using the contact page? It's just that there is a minimal test case linked to that bug which I wouldn't be able to send via your page.

Thanks for the reply,
Luke.

Robert A Duff

unread,
Jun 15, 2012, 8:54:42 PM6/15/12
to
Lucretia <lague...@googlemail.com> writes:

> P.S: I'm too skint to be a paying customer, I'm an individual not a
> company and my project is exactly that, mine - and open source.

That's OK, AdaCore will still accept bug reports from you.
Just send email to rep...@adacore.com. I think there are
instructions about that in the installation somewhere.

I saw your other message, but I don't really know whether it's a bug
or not.

- Bob

anon

unread,
Jun 16, 2012, 12:29:06 AM6/16/12
to
Try this:

--
-- This pragma allows exceptions to be handled by routines or by
-- the catch all Last_Chance_Hander.
--
pragma Restrictions ( No_Exception_Registration ) ;

--
-- These pragmas stops exceptions on many fronts.
--
-- pragma Restrictions ( No_Exceptions ) ;
-- pragma Restrictions ( No_Exception_Handlers ) ;
-- pragma Restrictions ( No_Exception_Propagation ) ;



----------------------------------------------------------------------
-- Last_Chance_Handler: Displays a Exception Termination Message. --
-- Shutdowns run-time-system. --
-- Halts processor. --
----------------------------------------------------------------------

-----------------------------------------------------------------
-- compile/bind/link with "--RTS=x86" for x86 Bare Bones --
-- Run-Time System. --
-----------------------------------------------------------------

with Ada.Characters.Latin_1 ; -- for ESC character
-- with Ada.Text_IO ; -- Must have full exception
-- working to use
with System ;
with System.IO ;

procedure Teste is

use Ada.Characters.Latin_1 ;
-- use Ada.Text_IO ;

use System ;
use IO ;

Hello_Error : exception ;

begin

--
-- Clear Screen and Display Title message using
-- VT100 / VT52 ANSI escape sequences
--
-- Works on most OSs including Linux.
--
Put ( ESC & "[2J" ) ; -- clear screen
Put ( ESC & "[12;30H" ) ; -- set screen location
Put ( ESC & "[31;40;01m" ) ; -- set text color to Red/Black
Put ( "Bare Bone: " ) ;
Put ( ESC & "[37;40;00m" ) ; -- reset color
Put_Line ( "Hello" ) ;
New_Line ;

--
-- Without a Exception handler the following will cause
-- the last chance handler to be executed, directly.
--
raise Hello_Error ;
-- raise Program_Error ;


-- Exception Handler:
--
-- The first two handlers will raise another exception that
-- will be handled by the Last_Chance_Handler.
--
-- The third handler will not propagate the exception.
-- In turn, the Last_Chance_Hander will not be executed.
--
--
exception
--
when Hello_Error =>
Put_Line ( "Exception Error: Hello" ) ;
raise ;
--
when Program_Error =>
Put_Line ( "Exception Error: Program" ) ;
raise ;
--
when others =>
Put_Line ( "Exception Error: All Others" ) ;

end Teste ;


Lucretia <lague...@googlemail.com> wrote in
news:1ca9d254-a12a-4ec3...@googlegroups.com:
0 new messages