AMX 86 Procedures
K
A
DAK
219
ajcfstkjmp ajcfstkjmp
Purpose Switch Stacks and Jump to a New Procedure
This procedure is provided for AMX portability.
Used by n Task o IS P o Timer Procedure o Restart Procedure n Exit Procedure
Setup Prototype is in file
AMX831CF.H.
#include "AMX831CF.H"
void cdecl ajcfstkjmp(void *vp, void *stackp,
void (*procp)());
Where vp is a pointer which is passed as a parameter to the new procedure.
stackp is a pointer to a properly aligned block of memory for use as a
stack. For the 80x86 family, the stack must be 16-bit word aligned.
Stackp must point to the top of the memory block since the processor
stack builds downward.
procp is a pointer to the new procedure which is prototyped as follows:
void cdecl newfunc(void *vp);
For portability using different C compilers, cast your procedure pointer
as (void (*)())newfunc in your call to ajcfstkjmp.
Interrupts o Disabled o Enabled o Restored
Returns There is no return from ajcfstkjmp. Use ajcfjset and ajcfjlong if
there is a requirement to return to the original stack.
Interrupts are not touched by ajcfstkjmp.
Restrictions The new procedure referenced by procp must never return. The
procedure can call ajend to end the calling task.
Example See the example provided with ajcfjset and ajcfjlong.
See Also ajcfjlong, ajcfjset, ajend