GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-91
WRITE^ITC^MESSAGE[X]
If the receiving task is a LINE^HANDLER task, it detects the message by a call to
WAIT^EVENT, which returns E^IMSG. A call to ^LISTEN(1, 0, 0) returns the IOCB
address. After the message is processed, a call to DEALLOCATEIOCB releases the
IOCB.
If the receiving task is a DEVICE^HANDLER task, the message is picked up either with
a call to ^AWAITIO[X], or with a call to WAIT^EVENT, as described previously.
tcb input
INT .EXT:ref
is a pointer to the TCB for the destination task.
buffer input
is a pointer to a buffer containing a message.
write-count input
INT:value
is the number of bytes to write.
The following condition code settings are valid:
Example
This example sends a buffer from one DEVICE^HANDLER task to all other
DEVICE^HANDLER tasks:
INT .EXT DEST^DCB (DCB^TEMPLATE);
INT .EXT MY^TCB (TCB^TEMPLATE);
INT .EXT DEST^TCB (TCB^TEMPLATE);
INT SIZE;
INT .BUF;
SIZE := 13;
CALL WRITE^ITC^MESSAGE[X] ( tcb !
i
,buffer !
i
,write-count ); !
i
INT:ref (Use with WRITE^ITC^MESSAGE.)
INT .EXT:ref (Use with WRITE^ITC^MESSAGEX.)
= CCE indicates that the write operation was successfully initiated.
< CCL indicates either an unsuccessful attempt to allocate an IOCB, or a file error.