home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / documentation / documents / a252free < prev    next >
Internet Message Format  |  1999-04-27  |  4KB

  1. From: RMokady@acorn.co.uk (Ran Mokady)
  2. Date: 17 Nov 92 11:17:52 GMT
  3.  
  4.  
  5.  The Free module provides two SWIs which enable any filing system to provide
  6. a RISC OS 3 style free space display:
  7.  
  8.  
  9. Free_Register (&444c0)
  10. In:
  11.    R0 = filing system number.
  12.    R1 = address of routine to call to get free space information
  13.    R2 = R12 value on entry to above routine
  14. Out:
  15.    Registers preserved.
  16.  
  17.    The routine pointed to by R1 will be called in USR mode, with the return
  18. address already pushed on the stack. 
  19.  
  20.    Since the routine is executed in USR mode, you should not use the
  21. provided stack, if you need any stack space, you will need to allocate it
  22. yourself. (It is safe to assume that the stack will be deep enough to hold
  23. the entry registers).
  24.  
  25.    The routine will be called with the following reason codes in R0:
  26.  
  27.  
  28. NoOp (0)
  29.  
  30.  In:
  31.     R0 =0
  32.  Out:
  33.     -
  34.  
  35.   This should just return to the caller.
  36.  
  37. GetDeviceName (1)
  38.  
  39.  In:
  40.     R0 = 1
  41.     R1 = filing system number
  42.     R2 = pointer to buffer
  43.     R3 = pointer to device name / id.
  44.  
  45.  Out:
  46.     R0 = length of name
  47.     [R2] name to use in window.
  48.  
  49.  This reason code is used to find the name to use in the window. For example
  50. it is used on ADFS drives to convert the drive number to the disc name.
  51.  
  52.  
  53. GetFreeSpace (2)
  54.  
  55.  In:
  56.     R0 = 2
  57.     R1 = filing system number
  58.     R2 = pointer to 3 word buffer
  59.     R3 = pointer to device name / id.
  60.  
  61.  Out:
  62.  
  63.     R0-R3 preserved.
  64.  
  65.     [R2]   Total size of device (0 if unchanged from last call)
  66.     [R2+4] Free space on device 
  67.     [R2+8] Used space on device
  68.  
  69.  
  70. CompareDevice
  71.  
  72.  In:
  73.     R0 = 3
  74.     R1 = filing system number
  75.     R2 = pointer to file name
  76.     R3 = pointer to device name / id
  77.     R6 = pointer to special field
  78.  
  79.  Out:
  80.  
  81.     R0-R3,R6 preserved.
  82.     Z set if R2 & R6 result in a file on the device pointed to by R3.
  83.  
  84.  
  85.     This call can simply return with Z set if the filing system (e.g.
  86. RAMFS) is a fast one (i.e. if the time to process reason call 2 is less than
  87. that required to process this call).
  88.   
  89.  
  90. ------------------------------------------------------------------------------
  91.  
  92. Free_DeRegister (&444c1)
  93.  
  94. In:
  95.   R0 = filing system number
  96.   R1 = address of routine 
  97.   R2 = R12 value on entry to above routine
  98.   
  99. Out:
  100.   Registers preserved.
  101.  
  102.   This is used to remove the support after it has been registered with
  103. Free_Register.
  104.  
  105.  
  106.         Hope this helps,
  107.  
  108.         Ran.
  109.  
  110. -----                    
  111. RMokady@acorn.co.uk          |
  112. Ran Mokady                   |  "We're children, Needing other children
  113. Senior Software Engineer     |   And yet letting our grown up pride
  114. Technical Support            |   Hide all the need inside
  115. Acorn Computers              |   Acting more like children than children"
  116. Cambridge, UK.               |
  117.  
  118.  
  119. From: /G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/@mhs-relay.ac.uk
  120. Date: 18 Nov 92 16:31:18 GMT
  121. Organization: Yale CS Mail/News Gateway
  122.  
  123. OS_FSControl 49 - reads free space on the disc or image file that holds a
  124. specified object.
  125.  
  126. Entry:  r0 = 49
  127.         r1 = pinter to name of object (null terminated)
  128. Exit:   r0 = free space
  129.         r1 = largest creatable object
  130.         r2 = disc size
  131.  
  132. If you pass adfs::4.$.PC.Drive_C.DRDOS.TMP in r1, the information returned
  133. in r0-r2 will be for the PC hard disk image Drive_C and not ADFS drive 4.
  134.  
  135. You can intercept the *Free call made by IDEFSFiler with:
  136.  
  137. *SetMacro Alias$Free If "<Wimp$State>"="desktop" then ShowFree -FS
  138. <FileSwitch$TemporaryFilingSystem> %0 else %Free %0
  139.  
  140. This should be enough for you to bolt interactive free space display on top
  141. of any RISC OS 2 filing system you may have, unless IDEFSFiler does a *%Free
  142. rather than *Free in which case you'd have to sit on OS_CLI in some way :-(.
  143.  
  144. Owen.
  145.