Date : Fri, 16 Sep 2011 22:07:06 +0100
From : jgh@... (J.G.Harston)
Subject: Sometimes they come back... OSWORD &7F question
Carlo wrote:
> J.G.Harston wrote:
> > DEFFNdisk(addr%,cmd%,drv%,trk%,sec%,num%,den%):LOCALfs%
> > fs%=FNfs:IFfs%<>4:*FX143,18,4
> > REPEATX%?0=drv%+den%*24+8:X%!1=addr%:X%?5=3-7*(cmd%>127)
> > X%?6=cmd%:X%?7=trk%:X%?8=sec%:X%?9=num%OR&20
> >
A%=127:CALL&FFF1:A%=X%?10:UNTILA%<>&10:IFfs%<>4:OSCLI"FX143,18,"+STR$ fs%
> > =A%
>
> In particular, it works perfectly with DFS 2.24+, while 2.29+ and
> 2.45+ seem to return incorrectly from the OSWORD CALL; the
Yes, I've found that 2.29 and 2.45 mess up the stack somehow, I've
been digging away through the code. Disassemblies available at
http://mdfs.net/Info/Comp/BBC/DFS
> A%=X%?10
> works only with the three-byte commands (sector read, write). I'd
> suggest that it be changed like this:
> A%=X%?(X%?5+7)
D'oh! I've updated the library and wiki article. :)
--
J.G.Harston - jgh@... - mdfs.net/jgh
There are three food groups: brown, green and ice cream.