FRead Function (ROM Call 0x3E0)

AMS 2.00 or higher files.h

unsigned short FRead (void *buffer, unsigned short bytesToRead, FILES *fsPtr);

Read a given number of bytes from an open file.

FRead reads bytesToRead bytes from the open file fsPtr (which may be opened in either read or write mode) into buffer. fsPtr must be a pointer to a FILES structure previously opened with FOpen. buffer must be a pointer to a buffer at least bytesToRead bytes long.

FRead returns FS_OK if the file read was successful or FS_EOF if it read past the end of the file.


Uses: FGetC


See also: FOpen, FWrite, FGetC, FSetPos