Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,662 of 4,675    |
|    Terje Mathisen to John    |
|    Re: DJB2    |
|    10 Nov 18 18:08:57    |
      From: terje.mathisen@nospicedham.tmsw.no              Kerr-Mudd,John wrote:       > On Sat, 10 Nov 2018 11:39:48 GMT, "R.Wieser"       > wrote:       >       >> Kerr,       >>       >>> Have I read this correctly?       >>       >> I doon't think so.       >>       >>> or is it (maybe I'm answering my own question) that the       >>> algorithm is based on 32bit values.       >>       >> Possibly, although I do not see anything special being done with the       >> upper two bytes.       >>       >> The problem is that you have degraded the hash to an 8-bit value, by       >> multiplying AL by BL. In short, the multiplication ignores the "15"       >> from your "1505" value.       >>       >> It just needs a 16 bit multiplication (AX by BX. Mind DX though, it       >> gets overwritten).       >>       >> Regards,       >> Rudy Wieser       >>       >>       >>       >       > Doh!, thanks for that.       >       You can of course use IMUL if you have a semi-modern CPU. This avoids       overwriting the DX contents.              Terje              --       - |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca