
CHAPTER 4 RX78K/IV SYSTEM CALL LIST
51
4.2.10 snd_msg (Send Message to Mailbox)
isnd_msg (Send Message to Mailbox for Interrupt)
[Function]
Sends a message.
[Remarks]
Sends a message at the address pk_msg to a mail box indicated by mbxid. If a task exists that is waiting for
the message, the top address of the sent message is returned, and the task is placed in the READY state. In
this case, the message is not sent to the mail box.
If there is no task waiting for the message, the task issuing “snd_msg” is not placed in the WAIT state. This
system call only sends a message to a mail box, and execution of the task continues. In other words,
message transmission is carried out asynchronously.
The first 2 bytes of the transmitting message are used as the link area of the queue. Therefore, be sure to
store the message from the 3rd byte and onward.
[System call ID number]
snd_msg = 19
[Parameter]
mbxid (Mailbox Identifier)
Mail box ID (Mailbox top address)
- 24 bits (large model)
- 16 bits (small model)
- 24 bits (large model)
- 16 bits (small model)
pk_msg (Message Packet)
Transmission message top address
[Return parameter]
E_OK
Normal termination
[Assembler format]
On issuing snd_msg
[Large model]
MOV
MOVW
MOV
MOVW
MOV
CALLT
[Small model]
MOV
MOVW
MOVW
CALLT
bnk0_b, #19
bnk0_up, #mbxid
bnk0_d, #mbxid
bnk0_vp, #pk_msg
bnk0_e, #pk_msg
[40H]
:
bnk0_b, #19
bnk0_up, #mbxid
bnk0_vp, #pk_msg
[40H]
:
C register = return parameter
C register = return parameter
On issuing isnd_msg
[Large model]
MOVG
MOVG
CALLT
[Small model]
MOVW
MOVW
CALLT
UUP, #mbxid
VVP, #pk_msg
[4CH]
:
UP, #mbxid
VP, #pk_msg
[4CH]
:
C register = return parameter
C register = return parameter