🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.tech
Article #550

Re: Getting 3rd Party Filing Systems To Use Showfree

#550
From: Ran Mokady
Date: Tue, 17 Nov 1992 11:17
131 lines
3682 bytes
In article <1992Nov16.212802.8912@black.ox.ac.uk> u91pag@ecs.ox.ac.uk (Paul Gilkerson) writes:

>
>What I want to know is if there is anyone out there who knows anything
>about showfree and how it works, or if anyone has solved the same
>problem before.
>
>I would appreciate any replies.


 The Free module provides two SWIs which enable any filing system to provide
a RISC OS 3 style free space display:


Free_Register (&444c0)
In:
   R0 = filing system number.
   R1 = address of routine to call to get free space information
   R2 = R12 value on entry to above routine
Out:
   Registers preserved.

   The routine pointed to by R1 will be called in USR mode, with the return
address already pushed on the stack. 

   Since the routine is executed in USR mode, you should not use the
provided stack, if you need any stack space, you will need to allocate it
yourself. (It is safe to assume that the stack will be deep enough to hold
the entry registers).

   The routine will be called with the following reason codes in R0:


NoOp (0)

 In:
    R0 =0
 Out:
    -

  This should just return to the caller.

GetDeviceName (1)
 
 In:
    R0 = 1
    R1 = filing system number
    R2 = pointer to buffer
    R3 = pointer to device name / id.

 Out:
    R0 = length of name
    [R2] name to use in window.

 This reason code is used to find the name to use in the window. For example
it is used on ADFS drives to convert the drive number to the disc name.


GetFreeSpace (2)

 In:
    R0 = 2
    R1 = filing system number
    R2 = pointer to 3 word buffer
    R3 = pointer to device name / id.

 Out:

    R0-R3 preserved.

    [R2]   Total size of device (0 if unchanged from last call)
    [R2+4] Free space on device 
    [R2+8] Used space on device


CompareDevice

 In:
    R0 = 3
    R1 = filing system number
    R2 = pointer to file name
    R3 = pointer to device name / id
    R6 = pointer to special field

 Out:

    R0-R3,R6 preserved.
    Z set if R2 & R6 result in a file on the device pointed to by R3.


    This call can simply return with Z set if the filing system (e.g.
RAMFS) is a fast one (i.e. if the time to process reason call 2 is less than
that required to process this call).
  

------------------------------------------------------------------------------

Free_DeRegister (&444c1)

In:
  R0 = filing system number
  R1 = address of routine 
  R2 = R12 value on entry to above routine
  
Out:
  Registers preserved.

  This is used to remove the support after it has been registered with
Free_Register.


        Hope this helps,


>Thanks,
>             
>Paul.
>
>
> ************  Paul Gilkerson  *****  u91pag@ecs.ox.ac.uk   ************


        Ran.

-----                    
RMokady@acorn.co.uk          |
Ran Mokady                   |  "We're children, Needing other children
Senior Software Engineer     |   And yet letting our grown up pride
Technical Support            |   Hide all the need inside
Acorn Computers              |   Acting more like children than children"
Cambridge, UK.               |
Technical Details
Message-ID: <20195@acorn.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!acorn!RMokady
References: <1992Nov16.212802.8912@black.ox.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!acorn!RMokady
From: RMokady@acorn.co.uk (Ran Mokady)
Newsgroups: comp.sys.acorn.tech
Subject: Re: Getting 3rd Party Filing Systems To Use Showfree
Message-ID: <20195@acorn.co.uk>
Date: 17 Nov 92 11:17:52 GMT
References: <1992Nov16.212802.8912@black.ox.ac.uk>
Sender: rmokady@acorn.co.uk
Organization: Acorn Computers Ltd, Cambridge, England
Lines: 131