Showing changes from revision #0 to #1:
Added | Removed | Changed
This entry point is used to implement multiple get byte and put byte operations on unbuffered files. It is only ever called if you set bit 28 of the file information word on return from FSEntry_Open, and you need not otherwise provide it. FileSwitch will instead use multiple calls to FSEntry_PutBytes and FSEntry_GetBytes to implement these operations.
Put multiple bytes to an unbuffered file
Entry | |
---|---|
R0 | 1 or 2 |
R1 | File handle used by your filing system |
R2 | Pointer to buffer |
R3 | Number of bytes to put to file |
R4 | (if R0=1) Sequential file pointer to use for start of block |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Address of byte after the last one transferred from buffer |
R3 | Number of bytes not transferred |
R4 | Initial file pointer + number of bytes transferred |
This entry point is called by FileSwitch to request that your filing system transfer data from memory to the file at either the specified file pointer (R0 = 1), or the current one (R0 = 2). If the specified pointer is beyond the end of the file, then you must fill the file
with zeros between the current file extent and the specified pointer before the bytes are transferred.
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.
Read bytes from an open file
Entry | |
---|---|
R0 | 3 or 4 |
R1 | File handle used by your filing system |
R2 | Pointer to buffer |
R3 | Number of bytes to gett to file |
R4 | (if R0=3) Sequential file pointer to use for start of block |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Address of byte after the last one transferred to buffer |
R3 | Number of bytes not transferred |
R4 | Initial file pointer + number of bytes transferred |
This entry point is called by FileSwitch to request that your filing system transfer data from a file to memory, either from the specified file pointer (R0 = 3), or from the current
one (R0 = 4).
If the specified pointer is greater than or equal to the current file extent then you must not update the sequential file pointer, nor must you return an error.
The file handle is guaranteed by FileSwitch not to be a directory and to have had read access granted at the time of the open.
Your filing system must not try to keep its own EOF-error-on-next-read flag – instead it is FileSwitch’s responsibility to keep the EOF-error-on-next-read flag. Unlike FSEntry_GetBytes, FileSwitch will set the C bit before it returns to its caller if your filing system returns a non-zero value in R3 – so your filing system need not handle this
either.