Only a single external program may be executed at any time, there is no memory protection and the program may alter any part of the system it chooses (intentionally or otherwise). Because of this errors in programs are generally immediately fatal so care must be taken to handle error situations appropriately.
External commands are executed as a separate ABLE task with their own stack and heap distinct from that of ABLE itself. This ensures that ABLE should continue executing correctly even if an external command causes an abort. A simple abort handler is provided which should return execution to ABLE in the event of an uncaught exception.
Programs are executed with the MMU (where available) running. A logical memory mapping of all physical memory is presented starting at address 0. Programs are loaded at address 0x8000 and execution starts at an offset of four bytes (0x8004). To be automatically recognised as an external program a magic value (0xAB1E0001) is used as the first four bytes of the file.
Apart from the magic number programs are a flat statically linked executable. If the tools and libraries provided by Simtec Electronics are used, generating appropriate output from standard C and assembler is straightforward.
Programs are entered with register 0 containing the argument count, register 1 containing the argument string vector and register 2 containing the environment pointer. The link register contains the address to return to. This calling convention is effectively the result of an function call to the program using the Arm Procedure Call Standard (APCS).
Calls to ABLE functions are performed using a SoftWare Interrupt (SWI) interface the parameters to these called functions are in the APCS format. The available functions and their interfaces are covered in the ABLE libc documentation.
If more details are required than provided here please contact Simtec Electronics support to discuss your requirements.