AMX 86 Procedures
K
A
DAK
319
ajtkcre ajtkcre
Purpose Create a New Task
Used by n Task o IS P o Timer Procedure n Restart Procedure n Exit Procedure
Setup #include "amx831sd.h"
.
.
struct amxtdts tdt;
AMXID taskid;
int status;
.
.
status = ajtkcre(&tdt, &taskid);
AX ES:BX DX=
Where &tdt is a pointer to the task's definition. All fields in structure tdt must
be valid before ajtkcre is called.
The structure amxtdts is defined in header file AMX831SD.H (see
Appendix D). The fields in the task definition structure correspond to
the parameters you must enter in the Task Definition window to
predefine a task using the Configuration Manager (see Chapter 14.7).
The task attributes in structure member amtdtat must be set to 0 to
create a Large model task or to 1 to create a Medium model task. If
you create a Medium model task, the task's stack MUST be located in
the DGROUP data segment.
&taskid is a pointer to storage for the task id of the created task.
Results Interrupts are disabled and then restored to their state at the time of the
call.
Status is returned.
AEROK = Call successful
AERNTC = No free Task Control Block available
AERITP = Invalid task priority (0 or > 127)
AERMBZ = Invalid task mailbox depth (<0 or > 32767)
If the task cannot be created, taskid will be undefined.
See Also ajtkdel