Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6581 > unrolled thread

SYS "XOS_Find",&80

Started byPaul Stewart <phorefaux@gmail.com>
First post2025-12-30 22:36 +0000
Last post2025-12-31 13:43 +0000
Articles 5 — 2 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  SYS "XOS_Find",&80 Paul Stewart <phorefaux@gmail.com> - 2025-12-30 22:36 +0000
    Re: SYS "XOS_Find",&80 Martin <News04@avisoft.f9.co.uk> - 2025-12-30 23:33 +0000
      Re: SYS "XOS_Find",&80 Paul Stewart <phorefaux@gmail.com> - 2025-12-30 23:57 +0000
      Re: SYS "XOS_Find",&80 Paul Stewart <phorefaux@gmail.com> - 2025-12-31 13:16 +0000
        Re: SYS "XOS_Find",&80 Paul Stewart <phorefaux@gmail.com> - 2025-12-31 13:43 +0000

#6581 — SYS "XOS_Find",&80

FromPaul Stewart <phorefaux@gmail.com>
Date2025-12-30 22:36 +0000
SubjectSYS "XOS_Find",&80
Message-ID<662a8a935c.Paul@phorefaux>
Hi all,

Hoping someone can help point out my mistake.
Issue with SYS"XOS_Find",&80.

Using SYS "XOS_Find",&80 to create a file, which is working fine.
Just trying to trap errors when it is unable to create the file.
Before I create the file I am using OS_File 17 to check if it exists 
first, which again is working okay.

My bit of code is:
SYS "XOS_Find",&80,fname$ TO fhandle%;flags%
IF (flags% AND 1)<>0 SYS "OS_GenerateError",fhandle%

If I then try an save to say a readonly ShareFS share, it generates 
expected error:

30 Dec 22:16:12 100   Message  : Shared disc is read only at line 157

This I can trap and program continues to function.

If I try an save to Resources (yes I know it is readonly and nobody should 
be attempting to save to it, but just for completeness) I receive the 
following error:


30 Dec 22:08:05 100   Message  : Internal error: abort on instruction 
fetch at &2

With this error the program dies directly after running SYS 
"XOS_Find",&80,fname$ TO fhandle%;flags%

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [next] | [standalone]


#6582

FromMartin <News04@avisoft.f9.co.uk>
Date2025-12-30 23:33 +0000
Message-ID<5c938f708eNews04@avisoft.f9.co.uk>
In reply to#6581
In article <662a8a935c.Paul@phorefaux>,
   Paul Stewart <phorefaux@gmail.com> wrote:
> Hi all,

> Hoping someone can help point out my mistake.
> Issue with SYS"XOS_Find",&80.

> Using SYS "XOS_Find",&80 to create a file, which is working fine.
> Just trying to trap errors when it is unable to create the file.
> Before I create the file I am using OS_File 17 to check if it exists 
> first, which again is working okay.

> My bit of code is:
> SYS "XOS_Find",&80,fname$ TO fhandle%;flags%
> IF (flags% AND 1)<>0 SYS "OS_GenerateError",fhandle%

> If I then try an save to say a readonly ShareFS share, it generates 
> expected error:

> 30 Dec 22:16:12 100   Message  : Shared disc is read only at line
> 157

> This I can trap and program continues to function.

> If I try an save to Resources (yes I know it is readonly and nobody
> should be attempting to save to it, but just for completeness) I
> receive the following error:


> 30 Dec 22:08:05 100   Message  : Internal error: abort on
> instruction fetch at &2

> With this error the program dies directly after running SYS 
> "XOS_Find",&80,fname$ TO fhandle%;flags%

Using RISC OS 5.31 on a Titanium, I get the expected
  Error  : &00000113
  Message: The filing system Resources: is read only

Maybe an old bug in RISC OS 4.42?

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

[toc] | [prev] | [next] | [standalone]


#6583

FromPaul Stewart <phorefaux@gmail.com>
Date2025-12-30 23:57 +0000
Message-ID<aa9991935c.Paul@phorefaux>
In reply to#6582
In message <5c938f708eNews04@avisoft.f9.co.uk>
          Martin <News04@avisoft.f9.co.uk> wrote:

> In article <662a8a935c.Paul@phorefaux>,
>    Paul Stewart <phorefaux@gmail.com> wrote:
>> Hi all,

>> Hoping someone can help point out my mistake.
>> Issue with SYS"XOS_Find",&80.

>> Using SYS "XOS_Find",&80 to create a file, which is working fine.
>> Just trying to trap errors when it is unable to create the file.
>> Before I create the file I am using OS_File 17 to check if it exists
>> first, which again is working okay.

>> My bit of code is:
>> SYS "XOS_Find",&80,fname$ TO fhandle%;flags%
>> IF (flags% AND 1)<>0 SYS "OS_GenerateError",fhandle%

>> If I then try an save to say a readonly ShareFS share, it generates
>> expected error:

>> 30 Dec 22:16:12 100   Message  : Shared disc is read only at line
>> 157

>> This I can trap and program continues to function.

>> If I try an save to Resources (yes I know it is readonly and nobody
>> should be attempting to save to it, but just for completeness) I
>> receive the following error:


>> 30 Dec 22:08:05 100   Message  : Internal error: abort on
>> instruction fetch at &2

>> With this error the program dies directly after running SYS
>> "XOS_Find",&80,fname$ TO fhandle%;flags%

> Using RISC OS 5.31 on a Titanium, I get the expected
>   Error  : &00000113
>   Message: The filing system Resources: is read only

> Maybe an old bug in RISC OS 4.42?

Didn't think about that.  Assumed it was me!

I'll try it on my Pinebook and see what happens.

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [prev] | [next] | [standalone]


#6584

FromPaul Stewart <phorefaux@gmail.com>
Date2025-12-31 13:16 +0000
Message-ID<2fccda935c.Paul@phorefaux>
In reply to#6582
In message <5c938f708eNews04@avisoft.f9.co.uk>
          Martin <News04@avisoft.f9.co.uk> wrote:

> In article <662a8a935c.Paul@phorefaux>,
>    Paul Stewart <phorefaux@gmail.com> wrote:
>> Hi all,

>> Hoping someone can help point out my mistake.
>> Issue with SYS"XOS_Find",&80.

>> Using SYS "XOS_Find",&80 to create a file, which is working fine.
>> Just trying to trap errors when it is unable to create the file.
>> Before I create the file I am using OS_File 17 to check if it exists
>> first, which again is working okay.

>> My bit of code is:
>> SYS "XOS_Find",&80,fname$ TO fhandle%;flags%
>> IF (flags% AND 1)<>0 SYS "OS_GenerateError",fhandle%

>> If I then try an save to say a readonly ShareFS share, it generates
>> expected error:

>> 30 Dec 22:16:12 100   Message  : Shared disc is read only at line
>> 157

>> This I can trap and program continues to function.

>> If I try an save to Resources (yes I know it is readonly and nobody
>> should be attempting to save to it, but just for completeness) I
>> receive the following error:


>> 30 Dec 22:08:05 100   Message  : Internal error: abort on
>> instruction fetch at &2

>> With this error the program dies directly after running SYS
>> "XOS_Find",&80,fname$ TO fhandle%;flags%

> Using RISC OS 5.31 on a Titanium, I get the expected
>   Error  : &00000113
>   Message: The filing system Resources: is read only

> Maybe an old bug in RISC OS 4.42?
Indeed it does appear to be a bug in 4.42.  Works okay on my Pinebook and 
under RISC OS 6 on VRPC.




-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [prev] | [next] | [standalone]


#6585

FromPaul Stewart <phorefaux@gmail.com>
Date2025-12-31 13:43 +0000
Message-ID<743fdd935c.Paul@phorefaux>
In reply to#6584
In message <2fccda935c.Paul@phorefaux>
          Paul Stewart <phorefaux@gmail.com> wrote:

>>> "XOS_Find",&80,fname$ TO fhandle%;flags%

>> Using RISC OS 5.31 on a Titanium, I get the expected
>>   Error  : &00000113
>>   Message: The filing system Resources: is read only

>> Maybe an old bug in RISC OS 4.42?
> Indeed it does appear to be a bug in 4.42.  Works okay on my Pinebook and
> under RISC OS 6 on VRPC.

Before asking if anyone could recommend another way of doing this, I have 
looked up OS_File, which I am using to test if object exists.

Have found this does the job ok:

SYS"XOS_File",11,fname$,&dfe,,0 TO fhandle%;flags%

Bit of code I am testing with: -

ON ERROR PROCmessage_box(0,REPORT$+" at line "+STR$ ERL,2,"Test"):END
fname$="resources:$.Export"
REM fname$="CDFS::$.Export"
REM fname$="Share::A9_Directory.$.Export": REM read only
REM fname$="Mem::MemphisA9.$.Export"

REM this errors when attempting to write to resoucefs.  Bug if 4.42
REM SYS "XOS_Find",&80,fname$ TO fhandle%;flags%
REM

SYS"XOS_File",11,fname$,&dfe,,0 TO fhandle%;flags%: REM create a file with 
filetype CSV (&dfe) that is 0 bytes in size
IF (flags% AND 1)<>0  THEN
errmess$=""
    addr%=4
    WHILE fhandle%?addr%<>0
         errmess$+=CHR$ fhandle%?addr%
         addr%+=1
    ENDWHILE
    PROCmessage_box(0, errmess$,2,"Test")
ELSE
REM MODE MODE: PRINT fhandle%
ENDIF
END
:
DEF PROCmessage_box(faultcode%,message$,type%,title$)
    REM
    REM response: 0 if no key click, 1 if OK selected, 2 if Cancel 
selected
    LOCAL fault%()
    DIM fault% 100
    !fault%=faultcode%
    $(fault%+4)=message$
    SYS"Wimp_ReportError",fault%,type%,title$ TO ,response%
ENDPROC
:






-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web