comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Protected Objects and Interrupt Handlers
Date: Thu, 25 Feb 2016 19:49:59 +0000
Date: 2016-02-25T19:49:59+00:00	[thread overview]
Message-ID: <lybn74o9i0.fsf@pushface.org> (raw)
In-Reply-To: nanead$d28$1@loke.gir.dk

Tero Koskinen <tero.koskinen@iki.fi> writes:

> For example in the normal case, you can have all the startup code in C
> (or in Ada, which is then exported to C)

Actually, very little even needs exporting to C! I had one that I've
given convention Asm (it's invoked by the linker script), but I'm not at
all sure it needs it.

Mind you,

   procedure Program_Initialization
   with
     Export,
     Convention => Asm,
     External_Name => "program_initialization",
     No_Return;
   pragma Machine_Attribute (Program_Initialization, "naked");

   procedure Program_Initialization is
   begin
      --  _estack: the first address after the top of stack space
      System.Machine_Code.Asm ("ldr sp, =_estack", Volatile => True);
      Complete_Program_Initialization;
   end Program_Initialization;

probably isn't going to cause much trouble anyway.

  reply	other threads:[~2016-02-25 19:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 22:25 Protected Objects and Interrupt Handlers Jere
2016-02-23 23:09 ` Simon Wright
2016-02-24 14:38   ` Jere
2016-02-24 18:29     ` Simon Wright
2016-02-24 21:37       ` Jere
2016-02-25 15:14 ` Maciej Sobczak
2016-02-25 15:59   ` Simon Wright
2016-02-26  3:20     ` Dennis Lee Bieber
2016-02-26  8:12       ` Simon Wright
2016-02-27 18:06     ` Maciej Sobczak
2016-02-25 16:02   ` Simon Wright
2016-02-25 17:40     ` Tero Koskinen
2016-02-25 19:49       ` Simon Wright [this message]
2016-03-13  8:10         ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox