Date : Tue, 12 Sep 2006 15:22:02 +0100 (BST)
From : Greg Cook <debounce@...>
Subject: Re: Bugs in ArmCoPro OS
On Mon, 11 Sep 2006 18:21:47 +0100, Sprow <info@...> wrote:
> In article <060909235504@...>,
> Jonathan Graham Harston <jgh@...> wrote:
[...]
> > 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
>
> Ah, well there you should be looking at the carry flag, that always
> works:
>
> X%?0=ch%:X%!1=data%:X%!5=num%:A%=2:C%=1:C%=USR(OSGBPB)AND&1000000
> IFC%<>0:REPEAT:BPUT#ch%,?data%:data%=data%+1:num%=num-1:UN.num%<1
>
> note that I set C on calling, since the cassette filing system on the
> BBC B
> returns using just an RTS from GBPB. They corrected it by the Master
> to
> return C=1.
I suppose it's good practice generally to preset a failure value in the
result register(s) before calling. Similarly with OSWORD &7F.
> I can't find anything on paper to suggest GBPB corrupts A, so those
> programs
> must run slowly using BGET!
Try the DFS User Guide. "On exit: A=0 implies operation attempted."
(The Advanced User Guide claims A is preserved. I'm going with the
official doc.)
Application Note 050 confirms on the Master 512 (in the 80186 API, and
it must hold on the I/O processor too.)
Greg Cook
debounce@...
http://homepages.tesco.net/~rainstorm/
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and
ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html