Aseba Specification 004

The contributor centre is in English only.

AS004: Memory layout for the bytecode

This specification describes the layout for the memory space of the bytecode, as generated by the Aseba compiler.

Current implementation since commit cd634bbc.
Design by
St├ęphane Magnenat and Philippe R├ętornaz
Written by
Florian Vaussard

The bytecode is generated by the compiler, based on the Aseba text language and the target's description. A summary of the program memory space is shown below (click on it to enlarge).


The program is composed of a number of segments. The initialization segment has the special event ID ASEBA_EVENT_INIT. The address of the corresponding bytecode is pushed at address 0x0000 (reset vector). If other event handlers are implemented, both for local and global events, their ID and address are put in the events vector, and corresponding bytecodes for the handlers are pushed after the one of ASEBA_EVENT_INIT. The events vector is used to resolve the bytecode address when an event is received by the target.

FInally, the bytecodes for subroutines are pushed at the end of the program memory. The jump address is statically resolved by the compiler at link time.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License