274
K
A
DAK
AMX 86 Procedures
ajmxsnd ajmxsndPurpose Send Message to Message Exchange
Used by n Task n IS P n Timer Procedure n Restart Procedure n Exit Procedure
Setup AMXID exchange;
char msg[AMXMSZ];
int priority;
int status;
.
.
status = ajmxsnd(exchange, priority, msg);
AX BX DX ES:SI
Where exchange is the message exchange id acquired by a call to ajmxcre.
priority is the priority of the message.
(0 = highest, 3 = lowest)
msg is an array name or pointer to AMXMSZ consecutive bytes that form the
message to be copied to the message exchange. The message may be
any AMXMSZ byte structure. AMXMSZ is configured in the User
Parameter File. If msg does not reside in the data segment, use
procedure ajmxsndf with a FAR pointer to the msg.
Results Interrupts are disabled and then restored to their state at the time of the
call.
Status is returned.
AEROK = Call successful
AERNSX = Invalid message exchange id
AERNME = No free message envelope
AERMBF = Message queue (mailbox) is full
AERNMB = No message queue (mailbox) of the specified priority
If one or more tasks are waiting at the exchange for a message, the
message will be given immediately to the task waiting at the head of the
exchange's wait queue. Task rescheduling occurs immediately if
necessary.
See Also ajmxsndp, ajmxwat, ajmxget