<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 25 Oct 2006 12:55:55 +0100
From   : navalenigma@... (Steve O'Leary)
Subject: (no subject)

> From: kortink@...> To: bbc-micro@cloud9.co.uk> Date: Wed, 
25 Oct 2006 13:38:23 +0200> Subject: Re: [BBC-Micro] ADFS sector checksums> 
No, you start at index 254, not index 0.> [snip]> > Either you start 0 or 
start 255. There's no difference> in the result unless you never consume 
a generated carry> in the second case, i.e. if all your bytes except the 
very> last one are zero (if the last one is not, it will generate> a carry, 
but this is never consumed).> > I.e.> > FF C=0 .. <+ 00> .. <+ 01> = 00 
C=1 <+ 00> = 01 C=0> 00 C=0 .. <+ 00> .. <+ 01> = 01 C=0 <+ 00> = 01 C=0> 
> i.e. same result, while in the pathetic case :> > FF C=0 .. <+ 00> .. 
<+ 00> = FF C=0 <+ 01> = 00 C=1> 00 C=0 .. <+ 00> .. <+ 00> = 00 C=0 <+ 
01> = 01 C=0> > i.e. different result.> > Acorn probably intended to start 
0, but some fan of> obscure programming realised that it's the same as> 
starting 255 since there's always a non-zero byte> before the last one is 
added in (and since Y already> starts 255 and loops 'NE', TYA then saves 
one byte,> compared to LDA#0). Whoopee.> > There's one case where this fails, 
and that's where> there's no free space left on the drive, so it's> /possible/ 
for all but the last byte (at index 0) to> be zero in sector 1 (while there's 
always a non-zero> disc size in sector 0).> > > John KortinkThanks for that 
detail.  Apologies for my emails going a bit weird for some people when 
I'm quoting, I did the last one normally and still went wrong. Although 
they display OK for me. Something to do with it not being plain text I guess
but at the moment I cannot seem to force a plain text mode. I'm looking into
it. Didn't used to be like this.
_________________________________________________________________
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d
An HTML attachment was scrubbed...
URL: http://lists.cloud9.co.uk/pipermail/bbc-micro/attachments/20061025/9d7eefb8/attachment-0001.html


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