240
K
A
DAK
AMX 86 Procedures
ajhook ajhookPurpose Install Task Scheduler Hooks
Used by n Task o IS P o Timer Procedure o Restart Procedure n Exit Procedure
Setup struct { int (*uhstart)();
int (*uhend)();
int (*uhsuspend)();
int (*uhresume)();
} userhooks;
.
.
ajhook((void FAR *)&userhooks); /* Install hooks */
ES:BX
.
.
ajhook(NULL); /* Remove hooks */
ES:BX=0
Where &userhooks is a FAR pointer to an array of four pointers to your scheduler
procedures.
Your procedures are called by the AMX Task Scheduler whenever
tasks start, end, suspend or resume execution.
To inhibit the AMX Task Scheduler from any further calls to your
procedures, call ajhook with a NULL (0L) pointer having a null
selector as illustrated.
Results Interrupts are untouched.