<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 09 Sep 2006 23:28:52 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Re: Bugs in ArmCoPro OS

>Message-ID: <4e638bc4e7info@...>
 
Sprow <info@...> wrote:
> > A%=&04, Y%=&00: Disk space used
> > A%=&05, Y%=&00: Disk free space
> 
> OS_Args SWI definition. The free/used space ones do sound sensible, as
> referenced in <62D9C34C5CEE40979EF87D1FB18A016.MAI@...>
 
You've found a reference? All I can find are my own hand-typed API
references from about 1987.
 
> > > Your function args0 is naughty:
 
The newly uploaded version of FSTest now uses:
 
DEFFNargs0(A%,Y%,ptr%):IF?(TOP-3)=0:E%=Y%:Y%=0
IFPAGE<&8000:X%=&70:!X%=ptr%:=(USR&FFDA)AND&FF
SYS"OS_Args",A%,Y%,ptr% TO A%,Y%,ptr%:!X%=ptr%:=A%
 
Admittedly, it's sort-of broken as it has external side effects,
but it's written specifically for the test program which needs to
collect both !X% and A%.
 
> For example OS_Word 14, the SWI definition has some subreason codes not
> implemented on 8 bit machines, so I check this and postprocess the results.
> I think this is far more useful than just blindly passing the call onto the
 
True. If you can add extra functionality, you may as well. When I
wrote bits of HADFS there were extra calls I could easily add with
a handful of instructions, so in they went.
 
> On those grounds I've adjusted the logic so R2 is always updated based on
> the result from the host (leaving the choice of whether to corrupt it or not
> up to the filing system), but only update R0 when R0=0 and R1=0 on entry per
> the SWI definition.
> 
> I think the loss of other esoteric reason codes R1=0 wont cause much loss of
> sleep,
 
I can't think of any time I've needed to read the libfs number,
but I do have programs that rely on other calls returning values
in A.
 
HADFS returns the version number with OSARGS &FD, and HUtils and
HEdit have code along the lines of:
 
dv%=2:IFFNhadfs_ver>42 THEN dv%=3
 
HEdit looks@... &FE and if the return<>&FE uses that as the
drive number to start editing.
 
I have several programs that do things like:
 
A%=3:!X%=extent:A%=(USR&FFDA)AND&FF
IF A%=3 THEN set extent in a different manner
 
I have one program that does:
A%=5:A%=(USR&FFDA)AND&FF
IF A%=5 THEN read free space in a different manner
 
I also know of quite a few programs (eg, TreeCopy, CopyFiles,
MultiCopy, etc.) that do things like:
 
X%?0=ch%:X%!1=data%:X%!5=num%:A%=2:A%=USR(OSGBPB)AND&FF
IFA%=2:REPEAT:BPUT#ch%,?data%:data%=data%+1:num%=num-1:UN.num%<1
 

-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
BBC BASIC for Windows and Internationalisation
  See http://mdfs.net/Software/BBCBasic/Windows/ProgTips




<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>