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]
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...
Hello,
same results here...... (W2K SP4, Athlon64)
Same result, Windows XP SP1, PIV.
Updated:
[attachment deleted by admin]
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...
Same result with the new upload on my P4 Win Xp Sp2
Same results on my AMD Athlon XP SP2
Same results on my test box, AMD K6 WinME
PBrennick
Hmm, perhaps hash all the results into a MD5 sum and post that as the answer? Much easier to compare. :bg
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.
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
Sorry, I just found out my mistake. :toothy