4 Receiving Control Messages

DTASK_DTASK() firstly calls DTASK_PRCNAM() to get the name by which the task is to register with the ADAM message system. This will be the name set in ICL_TASK_NAME by the controlling task – DTASK_PRCNAM() does not involve the message system. The task then registers with this name by calling AMS_INIT() (from DTASK_INIT()).

A loop is then entered, which continues until a bad STATUS is found. Within the loop most errors will be handled, but an MSP error probably means that no more messages can be sent or received so the task will exit.

Within the loop: