[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] C bit



> > (neither has bigger size), than the divisor. So to calculate the remainder
> > of a division by constant 5, the "normal" divu.w can be used, which is 2
> 
> For the sake of simplicity, assume that we have a divu.b instruction and
> want to calculate 257 modulo 5.
> It's obvious that the result is really 2, but the divu.b instruction would
> only see the lower 8 bits, that is 1. 1 modulo 5 != 2...
> 
> That is, you need to use the complete number to get the correct modulo result.
<...>
> 
> This is really the same thing as trying to figure out the remainder of
> 130/13 by only looking at 30/13.

Well, you just don't seem to know that divu.w divides long dividend by a
word divisor. Congratulations.

--
Konrad M.Kokoszkiewicz
|mail: draco@atari.org                  |  Atari Falcon030 user   |
|http://www.obta.uw.edu.pl/~draco/      | Moderator gregis LATINE |
|http://draco.atari.org                 |       (loquentium)      |

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.