Technical details

Changes to existing SWIs

If a filing system's free space routine does not recognise a reason code passed to it, it should return with all registers preserved.

A new reason code has been defined in RISC OS 3.6 for the filing system's free space routine (as registered using this call). The new reason code (4) returns the free space on the disc in 64 bits, rather than the 32 bits allowed by reason code 2:

Reason code 4- Get 64 bit free space for device

On entry

On exit

Details

This entry point is called to get the free space for a device. You should fill in the buffer pointed to by R2 with the following information:

Offset

Meaning

0

bits 0 - 31 of total size of device (0 if unchanged from last time read)

4

bits 32 - 63 of total size of device (0 if unchanged from last time read)

8

bits 0 - 31 of free space on device

12

bits 32 - 63 of free space on device

16

bits 0 - 31 of used space on device

20

bits 32 - 63 of used space on device

From RISC OS 3.6 onwards, the Free module calls this reason code to find the free space, rather than calling reason code 2. If R0 is non-zero on exit (ie unaltered), or if an error is generated, the Free module then calls reason code 2. Thus when returning an error from this reason code, your free space routine must also return the same error for reason code 2 before the Free module believes it to be an error.