home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / acorn / tech / 682 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  3.5 KB

  1. Path: 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
  2. From: RMokady@acorn.co.uk (Ran Mokady)
  3. Newsgroups: comp.sys.acorn.tech
  4. Subject: Re: Getting 3rd Party Filing Systems To Use Showfree
  5. Message-ID: <20195@acorn.co.uk>
  6. Date: 17 Nov 92 11:17:52 GMT
  7. References: <1992Nov16.212802.8912@black.ox.ac.uk>
  8. Sender: rmokady@acorn.co.uk
  9. Organization: Acorn Computers Ltd, Cambridge, England
  10. Lines: 131
  11.  
  12. In article <1992Nov16.212802.8912@black.ox.ac.uk> u91pag@ecs.ox.ac.uk (Paul Gilkerson) writes:
  13.  
  14. >
  15. >What I want to know is if there is anyone out there who knows anything
  16. >about showfree and how it works, or if anyone has solved the same
  17. >problem before.
  18. >
  19. >I would appreciate any replies.
  20.  
  21.  
  22.  The Free module provides two SWIs which enable any filing system to provide
  23. a RISC OS 3 style free space display:
  24.  
  25.  
  26. Free_Register (&444c0)
  27. In:
  28.    R0 = filing system number.
  29.    R1 = address of routine to call to get free space information
  30.    R2 = R12 value on entry to above routine
  31. Out:
  32.    Registers preserved.
  33.  
  34.    The routine pointed to by R1 will be called in USR mode, with the return
  35. address already pushed on the stack. 
  36.  
  37.    Since the routine is executed in USR mode, you should not use the
  38. provided stack, if you need any stack space, you will need to allocate it
  39. yourself. (It is safe to assume that the stack will be deep enough to hold
  40. the entry registers).
  41.  
  42.    The routine will be called with the following reason codes in R0:
  43.  
  44.  
  45. NoOp (0)
  46.  
  47.  In:
  48.     R0 =0
  49.  Out:
  50.     -
  51.  
  52.   This should just return to the caller.
  53.  
  54. GetDeviceName (1)
  55.  
  56.  In:
  57.     R0 = 1
  58.     R1 = filing system number
  59.     R2 = pointer to buffer
  60.     R3 = pointer to device name / id.
  61.  
  62.  Out:
  63.     R0 = length of name
  64.     [R2] name to use in window.
  65.  
  66.  This reason code is used to find the name to use in the window. For example
  67. it is used on ADFS drives to convert the drive number to the disc name.
  68.  
  69.  
  70. GetFreeSpace (2)
  71.  
  72.  In:
  73.     R0 = 2
  74.     R1 = filing system number
  75.     R2 = pointer to 3 word buffer
  76.     R3 = pointer to device name / id.
  77.  
  78.  Out:
  79.  
  80.     R0-R3 preserved.
  81.  
  82.     [R2]   Total size of device (0 if unchanged from last call)
  83.     [R2+4] Free space on device 
  84.     [R2+8] Used space on device
  85.  
  86.  
  87. CompareDevice
  88.  
  89.  In:
  90.     R0 = 3
  91.     R1 = filing system number
  92.     R2 = pointer to file name
  93.     R3 = pointer to device name / id
  94.     R6 = pointer to special field
  95.  
  96.  Out:
  97.  
  98.     R0-R3,R6 preserved.
  99.     Z set if R2 & R6 result in a file on the device pointed to by R3.
  100.  
  101.  
  102.     This call can simply return with Z set if the filing system (e.g.
  103. RAMFS) is a fast one (i.e. if the time to process reason call 2 is less than
  104. that required to process this call).
  105.   
  106.  
  107. ------------------------------------------------------------------------------
  108.  
  109. Free_DeRegister (&444c1)
  110.  
  111. In:
  112.   R0 = filing system number
  113.   R1 = address of routine 
  114.   R2 = R12 value on entry to above routine
  115.   
  116. Out:
  117.   Registers preserved.
  118.  
  119.   This is used to remove the support after it has been registered with
  120. Free_Register.
  121.  
  122.  
  123.         Hope this helps,
  124.  
  125.  
  126. >Thanks,
  127. >             
  128. >Paul.
  129. >
  130. >
  131. > ************  Paul Gilkerson  *****  u91pag@ecs.ox.ac.uk   ************
  132.  
  133.  
  134.         Ran.
  135.  
  136. -----                    
  137. RMokady@acorn.co.uk          |
  138. Ran Mokady                   |  "We're children, Needing other children
  139. Senior Software Engineer     |   And yet letting our grown up pride
  140. Technical Support            |   Hide all the need inside
  141. Acorn Computers              |   Acting more like children than children"
  142. Cambridge, UK.               |
  143.