86
K
A
DAK
AMX Timing Control
The following conditions exist when your Time/Date Scheduling Procedure is called by
the Time/Date Manager
Interrupts are enabled.
All registers are free for use.
DS,ES DGROUP segment
SS:SP AMX Kernel Stack ready for use
BP Offset of parameters on stack
The direction flag is set to forward.
The Scheduling Procedure can be written as a Large or Medium model C procedure as
follows:
#include "amx831sd.h" /* AMX Structure Definitions */
void cdecl tdshed( /* Scheduling Procedure */
int dummy) /* Dummy parameter */
{struct amxtds *ptdp; /* Pointer to time/date */
ptdp = (struct amxtds *)&dummy;
:
Perform required tests and initiate
actions if it is time for them
:
}
Note that function tdshed is declared to receive a dummy integer parameter. The
function actually receives an entire amxtds time/date structure passed by value.
However, not all C compilers support this facility. Therefore, we recommend that you
use a local pointer variable ptdp to gain access to the time/date structure as illustrated
above.