AMX 86 Procedures
K
A
DAK
277
ajmxwat ajmxwat
Purpose Wait for a Message from a Message Exchange
Used by n Task o IS P o Timer Procedure o Restart Procedure n Exit Procedure
Setup AMXID exchange;
char msg[AMXMSZ];
long timeout;
unsigned int priority;
.
.
status = ajmxwat(exchange, msg, timeout, priority);
AX BX ES:SI DX:CX DI
Where exchange is the message exchange id acquired by a call to ajmxcre.
msg is an array name or pointer to AMXMSZ consecutive bytes of storage
into which the message will be copied if it is available. The message
storage variable may be any AMXMSZ byte structure. AMXMSZ is
configured in the User Parameter File.
timeout is the maximum interval measured in AMX system ticks which
the caller is prepared to wait for a message. Timeout must be
positive. If timeout = 0, the caller will wait forever for a message to
arrive.
priority is the priority at which the caller wishes to wait (0 = highest).
To wait in FIFO order, have all callers use the same value for
priority.
Results Interrupts are disabled and enabled and then restored to their state at the
time of the call.
Status is returned.
AEROK = Call successful
AERNSX = Invalid message exchange id
AERTMO = Timed out before message available
AERTMV = Invalid timeout interval (<0)
See Also ajmxget, ajmxsnd