GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-47
^LISTEN
For a message from $RECEIVE (message-flag is a nonzero value) the IOCB is as
follows:
The calling task should perform the requested operation and then call ^REPLY,
passing iocb.msgtag as the tag parameter.
For an I/O completion that is not an intertask message or a message from
$RECEIVE (i-o-message is a nonzero value) the IOCB is as follows:
Where multiple I/O operations of this type are outstanding simultaneously on a
LINE file, a loop should be executed as shown in the following example:
WHILE (@IOCB := ^LISTEN(0, LINE, 0)) DO
BEGIN
.
handle I/O completion
.
END;
iocb.syncid Sync ID of request
iocb.state 5 = I/O pending
iocb.optype 12 = ^READUPDATE operation
iocb.iocnt Length of request in bytes
iocb.cnt Maximum reply size
iocb.bufaddrx Buffer address where request resides. This will be a buffer
parameter to ^READUPDATE(0,..) or GDSX supplied buffer, if
the buffer parameter was omitted.
iocb.histag Nowait tag from call to ^READUPDATE(0...)
iocb.file 0
iocb.msgtag Message tag for request
iocb.rcbaddr Address of requester control block for opener making this
request.
iocb.state 5 = I/O pending
iocb.optype Type of operation completing
iocb.iocnt Count transferred from AWAITIO[X]
iocb.bufaddr[x] Buffer address from AWAITIO[X]
iocb.histag Nowait tag from when I/O was initiated
iocb.file File number
iocb.err Guardian file error