GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-90
WRITE^ITC^MESSAGE[X]
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;
@BUF := GETLOCALPOOL(0, SIZE); !Get a buffer.
I := 2; ! TCB #0 and #1 are always the monitor and listener
! tasks, so we start at I=2.
@MY^DCB := DCBTBL[INTERNAL^TERM^NO];
@MY^TCB := MY^DCB.TCBADDR;
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.