Showing changes from revision #0 to #1:
Added | Removed | Changed
Start executing at the start point of code in a module
&00 |
R0 | pointer to command string, including module name |
R12 | pointer to private word for currently preferred instantiation of the module |
Doesn’t return unless error occurs |
This is the offset to the code to call if the module is to be entered as the current application. An offset of zero implies that the module cannot be started up as an application, ie it is purely a service module and contains only a filing system or * Commands, etc.
This field need not actually be an offset. If it cannot be interpreted as such, ie it is not a multiple of four, or any bits are set in the top byte, then calling this field will actually execute what is assumed to be an instruction at word 0 in the module. This allows applications to have a branch at this position and hence be run directly, eg for testing. Once entered, a module may get the command line using OS_GetEnv.
Whenever the module is entered via this field, it becomes the preferred instantiation. Therefore R11 does not refer to the instantiation number.
You must exit using OS_Exit, or by starting another application without setting up an exit handler. Start code is used by OS_Module with Run or Enter reason codes.