Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)

250 Chapter9
Intrinsics Reference (cont)
FREAD
Returns the record that was read. This structure
should be large enough to hold all of the information to
be transferred.
length 16-bit signed integer by value (required)
The number of halfwords or bytes to be transferred. If
this value is positive, it signifies the length in
halfwords; if negative, in bytes. A zero indicates that no
transfer is to take place.
NOTE
Whether you specify the value of length as halfwords or bytes, the
actual physical transfer is done on a byte-by-byte basis for an
asynchronous device. If the number of bytes input exceeds the value
specified, the read will terminate on byte count.
Condition Codes
CCE The information was read.
CCG The logical end-of-data was encountered during
reading.
CCL The information was not read because an error
occurred: a terminal read was terminated by a special
character or timeout interval, as specified in the
FCONTROL intrinsic.
Additional Discussion
See Accessing Files Programmer’s Guide. See also discussion of IOWAIT
and IODONTWAIT in this manual.