www.riscos.com Technical Support: |
|
This module enables an interactive free space display from the desktop.
Any filing system that wishes to display an interactive free space display should register with this module. In doing so, the filing system provides the address of a routine that accepts a variety of reason codes, each of which provides support for this module.
When the Free entry is selected from the filing system's menu, its desktop filer should issue the command:
*ShowFree -fs fs_name device
This module will then display the free space left.
The Free module is not available in RISC OS 2.
Provides an interactive free space display for a filing system
R0 = filing system number
R1 = address of routine to call to get free space info
R2 = R12 on entry to the above routine
Registers preserved
Interrupts are enabled
Fast interrupts are enabled
Processor is in SVC mode
SWI is not re-entrant
This call adds the filing system to the list of filing systems known by the Free module. The Free module automatically deals with the following filing systems: ADFS, RamFS, NetFS, NFS, SCSIFS.
R1 contains the address of the entry point for a set of support routines, which the Free module uses to help it to provide an interactive free space display for the filing system. The entry point is called in User mode, with the Free module's private stack, the top of which contains the return address. You cannot assume the depth of this stack, and should not use it save to pull the return address. Alternatives are:
The routine should exit using the instruction:
The entry point may be called with the following reason codes:
--
--
This entry point is a No Op, and you should just return with all registers preserved.
R0 = 1
R1 = filing system number
R2 = pointer to buffer
R3 = pointer to device name / ID
R0 = length of name
R1-R3 preserved
This entry point is called to get the name of a device. You should place the device name in the buffer pointed to by R2, and the length of the name in R0.
R0 = 2
R1 = filing system number
R2 = pointer to 3 word buffer
R3 = pointer to device name / ID
R0 - R3 preserved
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 | total size of device (0 if unchanged from last time read) |
4 | free space on device |
8 | used space on device |
R0 = 3
R1 = filing system number
R2 = pointer to filename
R3 = pointer to device ID
R6 = pointer to special field
R0 - R3, R6 preserved
Z set if R2 & R6 result in a file on the device pointed to by R3
This entry point is called to compare a device ID with a filename and special field. This call can simply return with Z set if the filing system is a fast filing system (eg RAMFS).
Removes the filing system from the list of filing systems known by the Free module
R0 = filing system number
R1 = address of routine (as passed to Free_Register)
R2 = R12 value (as passed to Free_Register)
R0 preserved
Interrupts are enabled
Fast interrupts are enabled
Processor is in SVC mode
SWI is not re-entrant
This call removes the filing system from the list of filing systems known by the Free module.
None
Shows within a desktop window the amount of free space on a device
*ShowFree -fs fs_name device
fs_name - name of the filing system used to access the device
device - name of the device for which to show free space
*ShowFree shows within a desktop window the amount of free space on a device. It is used by desktop filers such as ADFSFiler
This command will only work on filing systems registered using the SWI Free_Register.
*ShowFree -fs adfs HardDisc4
None