Re: [ARMini-support] Errors/freezes (longish)

  • From: Andrew Pinder <Andrew.Pinder@xxxxxxxxxxxxx>
  • To: armini-support@xxxxxxxxxxxxx
  • Date: Mon, 26 Mar 2012 00:58:15 +0100

In message <527638930dchris@xxxxxxxxxxxxxxxxxxxxx>
 on 26 Mar 2012 Chris Johnson <chris@xxxxxxxxxxxxxxxxxxxxx> wrote:

> In article <5276302b04chris@xxxxxxxxxxxxxxxxxxxxx>,
>    Chris Johnson <chris@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> I think I have eliminated OS_FSControl.

> Well, I am thinking again.

> There is a function which canonicalises the drive name containing the
> following (I have manually uncrunched the original to make it more
> friendly):

> DEF FN1(N%)    (N% is the drive number 0-2)
> LOCAL i%
> D$="SCSI::"+STR$ N%+".$"
> SYS"XOS_FSControl",37,D$,C%,,,256 TO ;H%
> IF(H% AND 1) THEN
>   J$=":"+STR$ N%
> ELSE
>  REM extract drive name eg Armini from the contents of C% buffer
> ...

Way back under RISC OS 2 the drive name was displayed on the iconbar.  
So is this the same code being reused?  Why not just call the original 
code, which I would suspect is somewhere in the ROM?

> Its calling the X version of the SWI, so errors do not raise the
> normal error handler. If there is an error (H% has bit 0 set) it
> simply retains control and sets the drive name to :0, :1 or :2
> depending on N%, and the processing carries on. :0, :1 or :2 then
> appears under the respective icon.

> However, under normal circumstances, the card reader is empty. The
> call to SYS"XOS_FSControl" does indeed return an error, viz. 'The
> disc drive is empty'.

> I am wondering if when SYS"XOS_FSControl" returns an error, it
> doesn't free the temporary memory it has claimed, which is where the
> memory leak is coming from.

There would be the same issue for an empty floppy drive under RISC OS 
2.  This suggests that the memory leak is specific to the !NewIcons 
code rather than original drive-name reading routines.


Regards

Andrew
-- 
Andrew Pinder
---
To alter your preferences or leave the group, 
visit //www.freelists.org/list/armini-support
List-related queries to support@xxxxxxxxxxxx

Other related posts: