3 DTASK_APPLIC

DTASK_APPLIC() is called by any of the DTASK routines which need to activate the user’s application code.

The code for DTASK_APPLIC is built into the ADAM task linking scripts, alink and ilink, and is modified by them to call the user’s top-level subroutine.

DTASK_APPLIC copies information about the current action into the TASK common blocks, runs the user’s code, runs down the parameter system if required and retrieves values, such as the action sequence number, the action value string, the delay before next action entry and the application request which may have been set by the user’s code. These are passed back to the ADAM fixed part for appropriate action.

The code for DTASK_APPLIC differs between alink and ilink in that the process of closing down the parameter system, thus updating ‘GLOBAL’ parameters and resetting all parameters to the ‘ground’ state, does not occur with an ilinked task. (It may also be prevented with an alinked task by setting the environment variable ADAM_TASK_TYPE to ‘I’ in the task’s process when the task is run.)

As can be seen from the above, although the user’s code will probably differ markedly in structure between A-tasks, A-task monoliths, I-tasks and control tasks, as far as the ADAM fixed part is concerned there is very little difference between them. (There are further differences in the way the parameter subsystem handles things. These are triggered by the structure of the task’s interface module.)