
The READ command can be used to read chunks of data from open files. After reading a chunk, the file pointer is moved behind that chunk so that a subsequent READ can get the next few bytes instantly. Read data is sent to the currently selected I/O interface.
READ requires two arguments. The first one is a file handle that must already be opened for reading, and the second, last argument is the number of bytes that should be read from the file.
ERR_OK (0) if everything's gone well.
ERR_ARGUMENT (4) if the supplied handle is not a valid handle from the file handle space (0...100).
ERR_NOT_OPEN (28) if the given handle is not assigned to an open file.
ERR_NO_READ (29) if the file is open but has no read access.
ERR_FS_... (13...25) file system errors if the file system runs into trouble while reading from the file.
READ 1 100
Reads the next 100 byte from a file that is open as handle #1
If the file pointer has advanced behind the last byte, READ returns ERR 33 (End of File). Before READ can be used, the file must be opened. See also OPEN.