The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: hutch-- on July 07, 2005, 01:59:53 AM

Title: Please test these conversions from MSVCRT
Post by: hutch-- on July 07, 2005, 01:59:53 AM
Greg Lyon has just finished a set of numeric to string conversion macros using the MSVCRT dll which will be a very useful set of additions to the preprocessor code that MASM32 uses with it macros. The attached test piece that Greg wrote test up fine on my own box but if anyone had some spare time, it would be most appreciated if they could do some tests on these macros with a range of values as verification.

[attachment deleted by admin]
Title: Re: Please test these conversions from MSVCRT
Post by: ToutEnMasm on July 08, 2005, 06:00:56 PM
Hello,
I have made a new console,compiled OK
That is what I see with a pentium III  and XP SP2
      ToutEnMasm
255
-1

65535
-1

4294967295
-1

18446744073709551615
-1

123.456787
456.789012
789.012346

Press any key to continue...
Title: Re: Please test these conversions from MSVCRT
Post by: Phoenix on July 08, 2005, 07:25:59 PM
Hello,

same results here...... (W2K SP4, Athlon64)

Title: Re: Please test these conversions from MSVCRT
Post by: Faiseur on July 08, 2005, 09:18:32 PM
Same result, Windows XP SP1, PIV.

Title: Re: Please test these conversions from MSVCRT
Post by: GregL on July 08, 2005, 11:28:34 PM
Updated:



[attachment deleted by admin]
Title: Re: Please test these conversions from MSVCRT
Post by: Mark Jones on July 09, 2005, 03:21:55 AM
Here is the AMD XP SP2 result of the new test:


255
0

127
-128

FF
0

65535
0

32767
-32768

FFFF
0

4294967295
0

2147483647
-2147483648

FFFFFFFF
0

18446744073709551615
0

9223372036854775807
-9223372036854775807

FFFFFFFFFFFFFFFF
0

340282346638528860000000000000000000000.000000
-0.000000

17976931348623157000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000.000000
-0.000000

17976931348623157000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000.000000
-0.000000

Press any key to continue...
Title: Re: Please test these conversions from MSVCRT
Post by: Vortex on July 09, 2005, 07:15:59 AM
Same result with the new upload on my P4 Win Xp Sp2
Title: Re: Please test these conversions from MSVCRT
Post by: Rifleman on July 09, 2005, 03:55:16 PM
Same results on my AMD Athlon XP SP2
Same results on my test box, AMD K6 WinME

PBrennick
Title: Re: Please test these conversions from MSVCRT
Post by: Mark Jones on July 09, 2005, 07:42:15 PM
Hmm, perhaps hash all the results into a MD5 sum and post that as the answer? Much easier to compare. :bg
Title: Re: Please test these conversions from MSVCRT
Post by: roticv on July 10, 2005, 03:37:59 AM
The range is wrong.

Signed value of a byte ranges from -127 to 127. Where did the -128 come from? It can't fit into a byte. The same goes for the rest of the "min" value.
Title: Re: Please test these conversions from MSVCRT
Post by: hutch-- on July 10, 2005, 04:19:40 AM
Victor,

I just ran this test on unsigned and signed byte conversion feeding both 0 to 255 with this result.


        0       0
        1       1
        2       2
        3       3
        4       4
        5       5
        6       6
        7       7
        8       8
        9       9
        10      10

  snip ----------

       124     124
       125     125
       126     126
       127     127
       128     -128
       129     -127
       130     -126
       131     -125

  snip ----------

        246     -10
        247     -9
        248     -8
        249     -7
        250     -6
        251     -5
        252     -4
        253     -3
        254     -2
        255     -1
Title: Re: Please test these conversions from MSVCRT
Post by: roticv on July 10, 2005, 04:50:30 AM
Sorry, I just found out my mistake.  :toothy