<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 15 Mar 2006 00:45:12 +0100
From   : John Kortink <kortink@...>
Subject: Re: Web site: Mainly Master 512

On Tue, 14 Mar 2006 22:45:21 -0000, "David Harper" wrote:

>John Kortink wrote:
>
>>>> Could you correct the Free Space Map info regarding the
>>>> checksum. Most people don't seem to get this right. It's
>>>> not a plain sum but a sum /with carry/, which means that
>>>> every addition includes the carry from the last one
>>>> (starting with no carry). I.e. a sum as resulting from :
>>>> ... <code - corrected by later posting>
>
>>>You're right. Correction made.
>
>>Perhaps you could make clear as well that the last
>>carry-out is not added. I've seen that as well in
>>some code.
>
>OK. I have re-worded it again, so I hope it is clear. (The wording is 
>starting to get unwieldy, but I would prefer not to have to include a 
>section of code in order to explain.)

I don't know. To those that can actually make use of
such low level information, a snippet of code is
likely to be clearer and less ambiguous.

Or avoid 6502 assembly and perhaps use a bit of pseudo
code like

sum = 0
carry = 0
for first 255 bytes of sector data
  sum = sum + sector data byte + carry
  if sum < 256 then carry = 0 else carry = 1 and sum = sum - 256
next


John Kortink

-- 

Email    : kortink@...         
Homepage : http://www.inter.nl.net/users/J.Kortink

GoMMC, the ultimate BBC B/B+/Master storage system :
http://web.inter.nl.net/users/J.Kortink/home/hardware/gommc
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>