Entry | |
---|---|
R1 | File handle used by your filing system/image filing system |
R2 | Pointer to buffer |
R3 | Number of bytes to read into buffer |
R4 | File offset from which to get data |
Exit | |
---|---|
- |
This entry point is used by FileSwitch to request that you read a number of bytes from an open file, and place them in memory.
The file handle is guaranteed by FileSwitch not to be a directory, but not necessarily to have had read access granted at the time of the open – see the last case given below.
The memory address is not guaranteed to be of any particular alignment. You should if possible optimise your filing system’s transfers to word-aligned locations in particular, as FileSwitch’s and most clients do tend to be word-aligned. The speed of your transfer routine is vital to filing system performance.
The number of bytes to read, and the file offset from which to read data are guaranteed to be a multiple of the buffer size for this file. The file offset will be within the file’s extent.
This call is made by FileSwitch for several purposes:
Note that FileSwitch holds no buffered data immediately after a file has been opened.