Guardian Procedure Calls Reference Manual

If $RECEIVE is opened with receive-depth = 0, only READ[X] can be called;
READUPDATE[X|XL] and REPLY[X] fail with error 2 ("operation not allowed on this type of
file").
Using the message-tag
If more than one message is queued by the application process (that is, receive-depth>
1), a message tag associated with each incoming message must be obtained in a call to the
FILE_GETRECEIVEINFOL_ (or FILE_GETRECEIVEINFO_ or LASTRECEIVE or RECEIVEINFO)
procedure immediately following each call to READUPDATE[X|XL]. To direct a reply back to
the originator of the message, the message tag associated with the incoming message returns
to the system in the message-tag parameter to the REPLY[X|XL] procedure. If messages are
not queued (that is, sync-or-receive-depth = 1), the message-tag is not needed.
Error handling
The error-return parameter can be used to return an error indication to the requester in
response to the open, CONTROL, SETMODE, and CONTROLBUF, system messages. The error
returns to the requester when the associated I/O procedure finishes.
Considerations for REPLYX and REPLYXL
The buffer and count written may be in the user stack segment or in an extended data segment.
They cannot be in the user's code space.
If the buffer or count transferred is in a selectable extended data segment, the segment must
be in use at the time of the call. Flat segments allocated by a process are always accessible
to the process.
The transfer size is the same as for procedure REPLY.
If the extended address of the buffer is odd, bounds checking rounds the address to the next
lower word boundary and checks an extra byte. The odd address is used for the transfer.
Errors for REPLYX and REPLYXL
In addition to the errors currently returned from REPLY, error 22 is returned from REPLYX and REPLYXL
in these cases:
The address of a parameter is extended, but either the extended data segment is invalid or
the address is for a selectable segment that is not in use at the time of the call.
The address of a parameter is extended, but it is an absolute address and the caller is not
privileged.
Example
CALL REPLY ( OUT^BUFFER , 512 );
Related Programming Manual
For programming information about the REPLY[X] procedure, see the Guardian Programmer's
Guide.
REPLY[X|XL] Procedures 1245