Prev: OctaOS
Next: DIV overflow
From: Herbert Kleebauer on 28 Mar 2007 03:25 Guga wrote: > > i think i finally got it working.. It seems that the function can > works without any size multiple of 32 bits. So it seems to be working > on 32bits, 64 bits, 96 bits, 128 bits and so on. (well.. not sure > yet.. if it is really working.. i have no way how to check some test > number) > > I used the mul routine only. The code is a total mess. so i�ll post it > here if it is really running ok. > > In the meanwhile.. can someone pls tell me, if this ascii decimal > number: "1699504104824251512520704" have the following hexadecimal > form of: > > 0167E2__04D586300__00000000 Yes, but try it also with a value which generates an overflow: 4294967299 Why don't you also implement the reverse: binary -> decimal then you can convert the number back and compare it with the original number.
From: /o//annabee on 28 Mar 2007 03:29 P� Wed, 28 Mar 2007 09:07:54 +0200, skrev Herbert Kleebauer <klee(a)unibwm.de>: > Frank Kotler wrote: >> Herbert Kleebauer wrote: > >> Okay, I see what you mean (I think). In case some other examinees (I >> mean "dear readers") wish to participate, I won't post my answer yet. > > That's the advantage of my syntax: I can post the missing line > and still nobody will understand it: > > addcq.l #0,r1 addcarryque.long 0 to register 1 ?? is that ecx? adc ecx 1??? Why dont you just tell him how, where and why he can use Matahari to see what it means.
From: /o//annabee on 28 Mar 2007 03:31 P� Wed, 28 Mar 2007 09:29:26 +0200, skrev /\\o//\annabee <Wannabee(a)thewannabee.org>: > P� Wed, 28 Mar 2007 09:07:54 +0200, skrev Herbert Kleebauer > <klee(a)unibwm.de>: > >> Frank Kotler wrote: >>> Herbert Kleebauer wrote: >> >>> Okay, I see what you mean (I think). In case some other examinees (I >>> mean "dear readers") wish to participate, I won't post my answer yet. >> >> That's the advantage of my syntax: I can post the missing line >> and still nobody will understand it: >> >> addcq.l #0,r1 > > addcarryque.long 0 to register 1 ?? add curry to Qpagetti I get it, its a new recipe!
From: Guga on 28 Mar 2007 03:41 On Mar 27, 11:12 pm, "Guga" <Guga...(a)gmail.com> wrote: > On Mar 27, 8:53 am, "Guga" <Guga...(a)gmail.com> wrote: > > > > > > > On Mar 27, 12:28 am, Frank Kotler <fbkot...(a)verizon.net> wrote: > > > > Guga wrote: > > > > ... > > > > > I can´t understand the logic of using shld > > > > Randy is doing *hex* ascii to integer. The "shld 4" does a multi-dword > > > multiply by *16*. > > > > I *completely* misunderstood what you were trying to do. The code from > > > Nasm64developer is to convert a "float string" (can contain '.', 'e', > > > etc. plus decimal digits) to IEEE???(whatever that number is... 754) > > > floating-point format. Still an "interesting" project, perhaps, but not > > > what you want, at all! > > > > With my New Improved (mis)Understanding, this looks a lot easier. I'm > > > not sure what you'd do with a tbyte/tword integer, but if you can > > > multiply a tword by ten, you've got it made. Might be worth developing > > > an "arbitrary size" multiply, rather than specifically tword. Lemme > > > think on this a little... > > > > Best, > > > Frank > > > "With my New Improved (mis)Understanding, this looks a lot easier. I'm > > not sure what you'd do with a tbyte/tword integer, but if you can > > multiply a tword by ten, you've got it made. Might be worth developing > > an "arbitrary size" multiply, rather than specifically tword. Lemme > > think on this a little..." > > > Tks frank :) > > > an arbitraty size ? > > > How ? > > > I 1st thought in making loops inside the alldecmul to get the > > remainders, but then.. i got stuck because i couldn´t knew how to get > > the remainders for the tword, and put them on different registers then > > edx:eax. > > > I mean.. if using the convertino to 80 bit.. 3 registers can hold the > > value, 128 bits, it may be 4 registers (or putting the generated data > > on a structure with the proper size) > > > Best Regards, > > > Guga- Hide quoted text - > > > - Show quoted text - > > Ok, guys > > i think i finally got it working.. It seems that the function can > works without any size multiple of 32 bits. So it seems to be working > on 32bits, 64 bits, 96 bits, 128 bits and so on. (well.. not sure > yet.. if it is really working.. i have no way how to check some test > number) > > I used the mul routine only. The code is a total mess. so i´ll post it > here if it is really running ok. > > In the meanwhile.. can someone pls tell me, if this ascii decimal > number: "1699504104824251512520704" have the following hexadecimal > form of: > > 0167E2__04D586300__00000000 > > The "__" mark i just posted here to make it easier to see the 4 byte > chain. > > Best Regards, > > Guga- Hide quoted text - > > - Show quoted text - Wahooo it seems to be working:):):):):)) I´m too tired to make the computations by hand for that sort of number.. so a check here: http://www.subnetonline.com/tools/dechexbin.html Makes me think that my code is correct. The convertion i got from: 1699504104824251512520704 = 0167E2__04D586300__00000000 that is the same as on the site. But.. when i input this: 7458784146511699504104824251512520704 = my resultant code is 059C8273__06B2C5BFC__0F549DDB__0E000000 that is different from the site. the site it results: 7458784146511699504104824251512520704 = 059C8273__06B2C5C00__00000000__00000000 So.. or mine is more precise, or his is correct. which one is correct ? Best Regards, Guga
From: /o//annabee on 28 Mar 2007 03:44
På Wed, 28 Mar 2007 09:12:09 +0200, skrev Guga <GugaGTG(a)gmail.com>: > Ok, guys > > i think i finally got it working.. It seems that the function can > works without any size multiple of 32 bits. So it seems to be working > on 32bits, 64 bits, 96 bits, 128 bits and so on. (well.. not sure > yet.. if it is really working.. i have no way how to check some test > number) Use Calc. It can do those numbers. > I used the mul routine only. The code is a total mess. so i´ll post it > here if it is really running ok. > > In the meanwhile.. can someone pls tell me, if this ascii decimal > number: "1699504104824251512520704" have the following hexadecimal > form of: > > 0167E2__04D586300__00000000 > > The "__" mark i just posted here to make it easier to see the 4 byte > chain. > > > Best Regards, > > Guga > |