The calling code should:
- Put the feature identifier into r0 (this number is ignored by the kernel and passed unchanged to the callee)
- Encode any parameters into the thread transfer block
- Access the target "object" address using the specific instruction required by the kernel (currently LDR r14, [r14], so load r14 with the object's address and execute the instruction)
The callee is entered with:
- r0 containing the value from the caller (nominally the feature number/identifier),
- r11 pointing to the thread transfer block,
- r12 containing the object identifier, as provided by code in the destination map when exporting the object handler, and
- r14 containing the address to which the code should jump in order to return from the call.
Objects local to the caller memory map will be defined by a handler (code) address and object identifier pair, which will be replaced by the kernel with a single pointer to an imported object. Objects that have been imported into the caller can also be passed as parameters or results of calls, and the kernel will give the recipient access to these values as well.
The next task will be to add interrupt handling and multi-threading.