Showing changes from revision #0 to #1:
Added | Removed | Changed
Entry | |
---|---|
R1 | File handle used by your filing system/image filing system |
R2 | Pointer to buffer from which to read data |
R3 | Number of bytes or data to read from buffer and put to file |
R4 | File offset from which to put data |
Exit | |
---|---|
- |
This entry point is called by FileSwitch to request that you take a number of bytes, and place them in the file at the specified file offset.
The file handle is guaranteed by FileSwitch not to be a directory, and to have had write access granted at the time of the open.
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 write, and the file offset at which to write data are guaranteed to be a multiple of the buffer size for this file. The final write will be within the file’s extent, so it will not need extending.
This call is made by FileSwitch for several purposes:
Note that FileSwitch holds no buffered data immediately after a file has been opened.
Entry | |
---|---|
R0 | Byte to put to file (top 24 bits zero) |
R1 | File handle used by your filing system |
Exit | |
---|---|
- |
This entry point is called by FileSwitch to request that you put a single byte to an unbuffered file at the position given by the file’s sequential file pointer. You must advance the sequential pointer by one. If the sequential pointer is equal to the file extent when this call is made, you must increase the allocated space of the file by at least one byte to accommodate the data – although it will be more efficient to increase the allocated space in larger chunks (256 bytes/1k is common).
The file handle is guaranteed by FileSwitch not to be a directory, and to have had write access granted at the time of the open.
If your filing system does not support FSEntry_GBPB, then FileSwitch will call this entry the necessary number of times to complete its client’s request.