Ada, interruption, layout and link
Mildred Ki'Lya
ml.mildred593 at gmail.com
Wed Mar 24 18:19:57 UTC 2010
On 03/24/2010 05:46 PM, Nicolas Boulay wrote:
> I have quickly see that Ada have a way to describe memory layout (like
> mapping) and to declare interrupt handler.
>
> Does anybody have a manual which explain how it is done ?
>
> Lisaac have the section mapping and interrupt. but miss "bit" layout.
> I would like to see the Ada syntaxe.
>
for My_Type'Size use 3; -- 3 bits wide
for Record_Type use
record
Field_1 at Byte_Num * Word range Low_Bit .. High_Bit;
...
end record;
Where Byte_Num is the offset in bytes (starting at 0) and Low_Bit ..
High_Bit is the bit range in the byte.
As for interrupt handlers, they are just functions with the pragma
Interrupt_Handler. And to attach them to an interrupt, the standard
package Ada.Interrupts can be used.
http://en.wikibooks.org/wiki/Ada_Programming/Representation_clauses
http://en.wikibooks.org/wiki/Ada_Programming/Attributes/%27Size
http://en.wikibooks.org/wiki/Ada_Programming/Attributes/%27Component_Size
http://www.adaic.org/standards/05rm/html/RM-13-3.html
http://www.adaic.org/standards/05rm/html/RM-13-5-1.html
http://www.adaic.org/standards/05rm/html/RM-C-3-1.html#I6677
http://www.adaic.org/standards/05rm/html/RM-C-3-2.html#I6697
/usr/lib/gcc/*linux/*/adainclude/a-interr.ads
Mildred
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20100324/1815ec13/attachment.pgp>
More information about the Lisaac-devel
mailing list