AMX 86 Procedures
K
A
DAK
279
ajproc ajprocajprocq ajprocq
Purpose Call Software Procedure
You can use this procedure to call any software procedure which, because
of register setup requirements, cannot otherwise be called from C.
Used by n Task n IS P n Timer Procedure n Restart Procedure n Exit Procedure
Setup #include "amx831sd.h"
.
.
void someproc();
struct amxregs regarray;
unsigned int regeax:
.
.
regeax = ajproc(someproc, &regarray);
or
regeax = ajprocq(someproc, &regarray);
Where someproc is the name of the FAR procedure which you wish to call. The
procedure must end with a FAR return.
regarray is a structure containing the processor register values which are
required for the particular software procedure being called. Ajproc
requires that all of the segment registers in regarray be initialized
with valid selectors. Ajprocq unconditionally copies the contents of
the current hardware segment registers into the segment registers in
regarray. General register values which are not required by the
procedure do not have to be provided.
If registers DS and/or ES are not required by procedure someproc, set their
values to 0 in regarray.
The structure amxregs is defined in header file AMX831SD.H (see
Appendix D).
regeax is the value which was in register AX when the called procedure
ended.