AMX 86 Frozen Dessert Maker User Manual


 
24
K
A
DAK
General AMX Operation
When an AMX system is launched for temporary execution, it executes until one of your
application tasks calls the AMX exit procedure
ajexit requesting an orderly shutdown
of the AMX system (see Chapter 3.11). The
ajexit caller can return two parameters to
the procedure that launched AMX. One of these parameters is an integer which is
received as errcode from the ajentr call. The other is a double word parameter stored
in the variable provided in the call to ajentr.
In the following example, the integer result is stored in variable errcode and the double
word parameter is recorded in variable resultp.
/* Start AMX for temporary execution */
#include "amx831sd.h" /* AMX Structure Definitions */
void main()
{
struct amxupts FAR *uptp; /* User Parameter Table pointer */
int errcode;
char *resultp;
:
:
ajupt(&uptp); /* Fetch pointer to UPT */
/* Start AMX: exit allowed, */
/* vectors alterable and */
/* interrupts disabled
errcode = ajentr(AMLPTMP+AMLPVA, uptp, &resultp);
:
Interpret your termination status (errcode) and, if necessary,
look at your results referenced by the pointer returned in
pointer variable resultp.
:
}